Home » date » 2010 » Nov » 30 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 30 Nov 2010 13:02:50 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h.htm/, Retrieved Tue, 30 Nov 2010 14:01:51 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2 12 2 11 2 14 1 12 2 21 2 12 2 22 2 11 2 10 2 13 1 10 2 8 1 15 2 14 2 10 1 14 1 14 2 11 1 10 2 13 1 7 2 14 2 12 2 14 1 11 2 9 1 11 2 15 2 14 1 13 2 9 1 15 2 10 2 11 1 13 1 8 1 20 1 12 2 10 1 10 1 9 2 14 1 8 1 14 2 11 2 13 2 9 2 11 2 15 1 11 2 10 1 14 1 18 2 14 1 11 2 12 2 13 2 9 1 10 2 15 1 20 1 12 2 12 2 14 2 13 1 11 2 17 1 12 2 13 1 14 1 13 2 15 2 13 1 10 1 11 2 19 2 13 2 17 1 13 1 9 1 11 1 10 2 9 1 12 2 12 2 13 1 13 2 12 2 15 2 22 2 13 2 15 2 13 2 15 2 10 2 11 2 16 2 11 1 11 1 10 2 10 1 16 2 12 1 11 2 16 1 19 2 11 1 16 1 15 2 24 2 14 2 15 2 11 1 15 2 12 1 10 2 14 2 13 2 9 2 15 2 15 2 14 2 11 2 8 2 11 2 11 1 8 2 10 2 11 2 13 1 11 1 20 2 10 1 15 1 12 2 14 1 23 1 14 2 16 2 11 1 12 2 10 1 14 2 12 1 12 2 11 2 12 1 13 1 11 1 19 2 12 2 17 1 9 2 12 2 19 2 18 2 15 2 14 2 11 2 9 2 18 2 16
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 12.4457068657685 + 0.291998052264244x[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.44570686576850.87166614.278100
x0.2919980522642440.5144950.56750.5711410.28557


Multiple Linear Regression - Regression Statistics
Multiple R0.0448231217392387
R-squared0.00200911224245061
Adjusted R-squared-0.00422833080603424
F-TEST (value)0.322105104100101
F-TEST (DF numerator)1
F-TEST (DF denominator)160
p-value0.571140774666708
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.17284786290018
Sum Squared Residuals1610.71416977763


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11213.0297029702971-1.02970297029708
21113.0297029702970-2.02970297029703
31413.02970297029700.97029702970297
41212.7377049180328-0.737704918032786
52113.02970297029707.97029702970297
61213.0297029702970-1.02970297029703
72213.02970297029708.97029702970297
81113.0297029702970-2.02970297029703
91013.0297029702970-3.02970297029703
101313.0297029702970-0.0297029702970298
111012.7377049180328-2.73770491803279
12813.0297029702970-5.02970297029703
131512.73770491803282.26229508196721
141413.02970297029700.97029702970297
151013.0297029702970-3.02970297029703
161412.73770491803281.26229508196721
171412.73770491803281.26229508196721
181113.0297029702970-2.02970297029703
191012.7377049180328-2.73770491803279
201313.0297029702970-0.0297029702970298
21712.7377049180328-5.73770491803279
221413.02970297029700.97029702970297
231213.0297029702970-1.02970297029703
241413.02970297029700.97029702970297
251112.7377049180328-1.73770491803279
26913.0297029702970-4.02970297029703
271112.7377049180328-1.73770491803279
281513.02970297029701.97029702970297
291413.02970297029700.97029702970297
301312.73770491803280.262295081967214
31913.0297029702970-4.02970297029703
321512.73770491803282.26229508196721
331013.0297029702970-3.02970297029703
341113.0297029702970-2.02970297029703
351312.73770491803280.262295081967214
36812.7377049180328-4.73770491803279
372012.73770491803287.26229508196721
381212.7377049180328-0.737704918032786
391013.0297029702970-3.02970297029703
401012.7377049180328-2.73770491803279
41912.7377049180328-3.73770491803279
421413.02970297029700.97029702970297
43812.7377049180328-4.73770491803279
441412.73770491803281.26229508196721
451113.0297029702970-2.02970297029703
461313.0297029702970-0.0297029702970298
47913.0297029702970-4.02970297029703
481113.0297029702970-2.02970297029703
491513.02970297029701.97029702970297
501112.7377049180328-1.73770491803279
511013.0297029702970-3.02970297029703
521412.73770491803281.26229508196721
531812.73770491803285.26229508196721
541413.02970297029700.97029702970297
551112.7377049180328-1.73770491803279
561213.0297029702970-1.02970297029703
571313.0297029702970-0.0297029702970298
58913.0297029702970-4.02970297029703
591012.7377049180328-2.73770491803279
601513.02970297029701.97029702970297
612012.73770491803287.26229508196721
621212.7377049180328-0.737704918032786
631213.0297029702970-1.02970297029703
641413.02970297029700.97029702970297
651313.0297029702970-0.0297029702970298
661112.7377049180328-1.73770491803279
671713.02970297029703.97029702970297
681212.7377049180328-0.737704918032786
691313.0297029702970-0.0297029702970298
701412.73770491803281.26229508196721
711312.73770491803280.262295081967214
721513.02970297029701.97029702970297
731313.0297029702970-0.0297029702970298
741012.7377049180328-2.73770491803279
751112.7377049180328-1.73770491803279
761913.02970297029705.97029702970297
771313.0297029702970-0.0297029702970298
781713.02970297029703.97029702970297
791312.73770491803280.262295081967214
80912.7377049180328-3.73770491803279
811112.7377049180328-1.73770491803279
821012.7377049180328-2.73770491803279
83913.0297029702970-4.02970297029703
841212.7377049180328-0.737704918032786
851213.0297029702970-1.02970297029703
861313.0297029702970-0.0297029702970298
871312.73770491803280.262295081967214
881213.0297029702970-1.02970297029703
891513.02970297029701.97029702970297
902213.02970297029708.97029702970297
911313.0297029702970-0.0297029702970298
921513.02970297029701.97029702970297
931313.0297029702970-0.0297029702970298
941513.02970297029701.97029702970297
951013.0297029702970-3.02970297029703
961113.0297029702970-2.02970297029703
971613.02970297029702.97029702970297
981113.0297029702970-2.02970297029703
991112.7377049180328-1.73770491803279
1001012.7377049180328-2.73770491803279
1011013.0297029702970-3.02970297029703
1021612.73770491803283.26229508196721
1031213.0297029702970-1.02970297029703
1041112.7377049180328-1.73770491803279
1051613.02970297029702.97029702970297
1061912.73770491803286.26229508196721
1071113.0297029702970-2.02970297029703
1081612.73770491803283.26229508196721
1091512.73770491803282.26229508196721
1102413.029702970297010.9702970297030
1111413.02970297029700.97029702970297
1121513.02970297029701.97029702970297
1131113.0297029702970-2.02970297029703
1141512.73770491803282.26229508196721
1151213.0297029702970-1.02970297029703
1161012.7377049180328-2.73770491803279
1171413.02970297029700.97029702970297
1181313.0297029702970-0.0297029702970298
119913.0297029702970-4.02970297029703
1201513.02970297029701.97029702970297
1211513.02970297029701.97029702970297
1221413.02970297029700.97029702970297
1231113.0297029702970-2.02970297029703
124813.0297029702970-5.02970297029703
1251113.0297029702970-2.02970297029703
1261113.0297029702970-2.02970297029703
127812.7377049180328-4.73770491803279
1281013.0297029702970-3.02970297029703
1291113.0297029702970-2.02970297029703
1301313.0297029702970-0.0297029702970298
1311112.7377049180328-1.73770491803279
1322012.73770491803287.26229508196721
1331013.0297029702970-3.02970297029703
1341512.73770491803282.26229508196721
1351212.7377049180328-0.737704918032786
1361413.02970297029700.97029702970297
1372312.737704918032810.2622950819672
1381412.73770491803281.26229508196721
1391613.02970297029702.97029702970297
1401113.0297029702970-2.02970297029703
1411212.7377049180328-0.737704918032786
1421013.0297029702970-3.02970297029703
1431412.73770491803281.26229508196721
1441213.0297029702970-1.02970297029703
1451212.7377049180328-0.737704918032786
1461113.0297029702970-2.02970297029703
1471213.0297029702970-1.02970297029703
1481312.73770491803280.262295081967214
1491112.7377049180328-1.73770491803279
1501912.73770491803286.26229508196721
1511213.0297029702970-1.02970297029703
1521713.02970297029703.97029702970297
153912.7377049180328-3.73770491803279
1541213.0297029702970-1.02970297029703
1551913.02970297029705.97029702970297
1561813.02970297029704.97029702970297
1571513.02970297029701.97029702970297
1581413.02970297029700.97029702970297
1591113.0297029702970-2.02970297029703
160913.0297029702970-4.02970297029703
1611813.02970297029704.97029702970297
1621613.02970297029702.97029702970297


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.8903118821377850.219376235724430.109688117862215
60.8356780910701860.3286438178596280.164321908929814
70.9673595068058030.06528098638839430.0326404931941972
80.9670511082761310.06589778344773830.0329488917238691
90.971246421186870.05750715762625950.0287535788131297
100.9528446201745950.09431075965080920.0471553798254046
110.9310236652184450.1379526695631100.0689763347815549
120.9623444189260670.07531116214786650.0376555810739332
130.957549285036020.0849014299279610.0424507149639805
140.9364833060249630.1270333879500740.063516693975037
150.9322502226318160.1354995547363680.0677497773681841
160.9085128451118640.1829743097762710.0914871548881356
170.8778037594805820.2443924810388360.122196240519418
180.8523928855492830.2952142289014340.147607114450717
190.8369541720022720.3260916559954560.163045827997728
200.7899691572734120.4200616854531760.210030842726588
210.8508125232062040.2983749535875910.149187476793796
220.8122619814371770.3754760371256470.187738018562823
230.7694591686952630.4610816626094750.230540831304738
240.721877803341910.556244393316180.27812219665809
250.6707948177163180.6584103645673640.329205182283682
260.6966873082621230.6066253834757530.303312691737877
270.6454563996342790.7090872007314420.354543600365721
280.6113496234685420.7773007530629160.388650376531458
290.5581764349137560.8836471301724890.441823565086244
300.5076209182077340.9847581635845310.492379081792266
310.5375886364178310.9248227271643380.462411363582169
320.529518738424190.940962523151620.47048126157581
330.5165313395672940.9669373208654120.483468660432706
340.4768666463611240.9537332927222470.523133353638876
350.4251085248320670.8502170496641330.574891475167933
360.4644469726523590.9288939453047180.535553027347641
370.7138844563413520.5722310873172970.286115543658648
380.6677770347826050.664445930434790.332222965217395
390.6533535703592940.6932928592814120.346646429640706
400.6320739074089650.735852185182070.367926092591035
410.635824788625760.7283504227484810.364175211374241
420.5945837920717480.8108324158565040.405416207928252
430.6314922252572720.7370155494854560.368507774742728
440.5997018734542060.8005962530915890.400298126545794
450.5647381254677170.8705237490645660.435261874532283
460.5154101290829430.9691797418341130.484589870917057
470.5330142558925460.9339714882149090.466985744107454
480.4972529642912010.9945059285824030.502747035708799
490.4757441950129750.951488390025950.524255804987025
500.4359458336122650.871891667224530.564054166387735
510.4229806791395120.8459613582790230.577019320860488
520.3912557706923730.7825115413847460.608744229307627
530.4946911883287340.9893823766574680.505308811671266
540.455767914735880.911535829471760.54423208526412
550.4193563736650560.8387127473301120.580643626334944
560.3762220873488920.7524441746977850.623777912651108
570.3329703582417380.6659407164834760.667029641758262
580.3505936087674290.7011872175348590.649406391232571
590.334718630492420.669437260984840.66528136950758
600.3159642868529160.6319285737058330.684035713147084
610.5238273661801460.9523452676397080.476172633819854
620.4793872569153210.9587745138306420.520612743084679
630.4369655632914380.8739311265828770.563034436708562
640.3994072585421330.7988145170842660.600592741457867
650.3564964097423130.7129928194846250.643503590257687
660.3255481957947050.651096391589410.674451804205295
670.3574869483659920.7149738967319840.642513051634008
680.3176000257381960.6352000514763920.682399974261804
690.2784413876136260.5568827752272530.721558612386374
700.2484346350554990.4968692701109980.751565364944501
710.2143444672553810.4286889345107620.78565553274462
720.1968282271828620.3936564543657250.803171772817138
730.1670597799186390.3341195598372790.83294022008136
740.1593166055428740.3186332110857470.840683394457126
750.1406776120424920.2813552240849830.859322387957508
760.2201412912197830.4402825824395660.779858708780217
770.1881561735275610.3763123470551210.81184382647244
780.2072541121033350.414508224206670.792745887896665
790.1772540626685960.3545081253371910.822745937331404
800.1895190736741620.3790381473483250.810480926325838
810.1700865809154330.3401731618308670.829913419084567
820.1651059828516250.330211965703250.834894017148375
830.1826842726984500.3653685453969000.81731572730155
840.1577937910498370.3155875820996740.842206208950163
850.1346289111230000.2692578222459990.865371088877
860.1117534941387260.2235069882774530.888246505861274
870.09292102951723390.1858420590344680.907078970482766
880.07722711279516710.1544542255903340.922772887204833
890.06788325183689490.1357665036737900.932116748163105
900.2428217550469780.4856435100939560.757178244953022
910.2087297724059880.4174595448119750.791270227594012
920.1891505340655140.3783010681310270.810849465934486
930.1598981431118620.3197962862237250.840101856888138
940.1433956313642230.2867912627284450.856604368635777
950.1409333748609300.2818667497218600.85906662513907
960.1263855685821010.2527711371642020.873614431417899
970.1230873919038440.2461747838076870.876912608096156
980.1097756153314370.2195512306628740.890224384668563
990.09879404851313160.1975880970262630.901205951486868
1000.09943463487505960.1988692697501190.90056536512494
1010.09784811453141250.1956962290628250.902151885468587
1020.0954155356530080.1908310713060160.904584464346992
1030.07911666286751020.1582333257350200.92088333713249
1040.0717912431621450.143582486324290.928208756837855
1050.06920073130196320.1384014626039260.930799268698037
1060.1125048821065320.2250097642130630.887495117893468
1070.09985085917716360.1997017183543270.900149140822836
1080.09580050966349360.1916010193269870.904199490336506
1090.08345430916626930.1669086183325390.91654569083373
1100.4533408512130320.9066817024260640.546659148786968
1110.410686278690650.82137255738130.58931372130935
1120.3833873655832420.7667747311664850.616612634416758
1130.3537055066189280.7074110132378570.646294493381072
1140.3234526548193370.6469053096386730.676547345180663
1150.2838308019354070.5676616038708140.716169198064593
1160.2864130420098160.5728260840196320.713586957990184
1170.2496470227290690.4992940454581370.750352977270931
1180.2114381950267870.4228763900535740.788561804973213
1190.2294612819963680.4589225639927350.770538718003632
1200.2064551993396670.4129103986793340.793544800660333
1210.1853110406872280.3706220813744570.814688959312772
1220.1563508607143790.3127017214287590.84364913928562
1230.1364239074990850.272847814998170.863576092500915
1240.1769938471543020.3539876943086040.823006152845698
1250.1568828277123140.3137656554246270.843117172287686
1260.1388386362720420.2776772725440850.861161363727958
1270.2055503077478930.4111006154957870.794449692252107
1280.2045374413189840.4090748826379670.795462558681016
1290.1856336188305820.3712672376611640.814366381169418
1300.1510918960241990.3021837920483970.848908103975801
1310.1457764082784170.2915528165568350.854223591721583
1320.2466268027975400.4932536055950800.75337319720246
1330.252940112651390.505880225302780.74705988734861
1340.2162592368331510.4325184736663030.783740763166849
1350.1866270465173190.3732540930346380.813372953482681
1360.1494828574440990.2989657148881980.850517142555901
1370.5682059500231760.8635880999536490.431794049976824
1380.5109206027778330.9781587944443340.489079397222167
1390.484148946038380.968297892076760.51585105396162
1400.459600569061770.919201138123540.54039943093823
1410.3971066476435250.7942132952870510.602893352356475
1420.4206457189993280.8412914379986550.579354281000672
1430.3596123862926540.7192247725853090.640387613707346
1440.3165954059424590.6331908118849180.683404594057541
1450.2570962544416700.5141925088833410.74290374555833
1460.2502731986103640.5005463972207290.749726801389636
1470.2203768662063840.4407537324127670.779623133793616
1480.1647842038884780.3295684077769550.835215796111522
1490.1389068872109520.2778137744219050.861093112789048
1500.3634049143612010.7268098287224030.636595085638799
1510.3337527873830880.6675055747661760.666247212616912
1520.2903491708386130.5806983416772250.709650829161387
1530.2127838473812340.4255676947624690.787216152618766
1540.1826816565421270.3653633130842530.817318343457873
1550.2281841450819170.4563682901638330.771815854918083
1560.2502663460106470.5005326920212940.749733653989353
1570.1558250668272690.3116501336545380.844174933172731


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level60.0392156862745098OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/10x23l1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/10x23l1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/1q16r1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/1q16r1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/21b5u1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/21b5u1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/31b5u1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/31b5u1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/41b5u1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/41b5u1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/5uk4x1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/5uk4x1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/6uk4x1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/6uk4x1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/7ntm01291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/7ntm01291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/8x23l1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/8x23l1291122157.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/9x23l1291122157.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t12911220995l1ao9stm4mg09h/9x23l1291122157.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by