Home » date » 2010 » Nov » 26 »

WS8: model 1

*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: Fri, 26 Nov 2010 13:29:55 +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/26/t12907785571ykwqt6mhd7tbml.htm/, Retrieved Fri, 26 Nov 2010 14:35:57 +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/26/t12907785571ykwqt6mhd7tbml.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 14 2 18 2 11 1 12 2 16 2 18 2 14 2 14 2 15 2 15 1 17 2 19 1 10 2 16 2 18 1 14 1 14 2 17 1 14 2 16 1 18 2 11 2 14 2 12 1 17 2 9 1 16 2 14 2 15 1 11 2 16 1 13 2 17 2 15 1 14 1 16 1 9 1 15 2 17 1 13 1 15 2 16 1 16 1 12 2 12 2 11 2 15 2 15 2 17 1 13 2 16 1 14 1 11 2 12 1 12 2 15 2 16 2 15 1 12 2 12 1 8 1 13 2 11 2 14 2 15 1 10 2 11 1 12 2 15 1 15 1 14 2 16 2 15 1 15 1 13 2 12 2 17 2 13 1 15 1 13 1 15 1 16 2 15 1 16 2 15 2 14 1 15 2 14 2 13 2 7 2 17 2 13 2 15 2 14 2 13 2 16 2 12 2 14 1 17 1 15 2 17 1 12 2 16 1 11 2 15 1 9 2 16 1 15 1 10 2 10 2 15 2 11 2 13 1 14 2 18 1 16 2 14 2 14 2 14 2 14 2 12 2 14 2 15 2 15 2 15 2 13 1 17 2 17 2 19 2 15 1 13 1 9 2 15 1 15 1 15 2 16 1 11 1 14 2 11 2 15 1 13 2 15 1 16 2 14 1 15 2 16 2 16 1 11 1 12 1 9 2 16 2 13 1 16 2 12 2 9 2 13 2 13 2 14 2 19 2 13 2 12 2 13
 
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 time16 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 12.6172699237137 + 0.874533354974842x[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.61726992371370.63347119.917700
x0.8745333549748420.3739022.33890.0205750.010287


Multiple Linear Regression - Regression Statistics
Multiple R0.181826835929637
R-squared0.0330609982641832
Adjusted R-squared0.0270176295033342
F-TEST (value)5.47062401327624
F-TEST (DF numerator)1
F-TEST (DF denominator)160
p-value0.0205749436237584
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.30582339712113
Sum Squared Residuals850.6914461938


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11414.3663366336634-0.366336633663402
21814.36633663366343.63366336633664
31114.3663366336634-3.36633663366337
41213.4918032786885-1.49180327868852
51614.36633663366341.63366336633663
61814.36633663366343.63366336633663
71414.3663366336634-0.366336633663366
81414.3663366336634-0.366336633663366
91514.36633663366340.633663366336634
101514.36633663366340.633663366336634
111713.49180327868853.50819672131148
121914.36633663366344.63366336633663
131013.4918032786885-3.49180327868853
141614.36633663366341.63366336633663
151814.36633663366343.63366336633663
161413.49180327868850.508196721311475
171413.49180327868850.508196721311475
181714.36633663366342.63366336633663
191413.49180327868850.508196721311475
201614.36633663366341.63366336633663
211813.49180327868854.50819672131148
221114.3663366336634-3.36633663366337
231414.3663366336634-0.366336633663366
241214.3663366336634-2.36633663366337
251713.49180327868853.50819672131148
26914.3663366336634-5.36633663366337
271613.49180327868852.50819672131148
281414.3663366336634-0.366336633663366
291514.36633663366340.633663366336634
301113.4918032786885-2.49180327868852
311614.36633663366341.63366336633663
321313.4918032786885-0.491803278688525
331714.36633663366342.63366336633663
341514.36633663366340.633663366336634
351413.49180327868850.508196721311475
361613.49180327868852.50819672131148
37913.4918032786885-4.49180327868852
381513.49180327868851.50819672131148
391714.36633663366342.63366336633663
401313.4918032786885-0.491803278688525
411513.49180327868851.50819672131148
421614.36633663366341.63366336633663
431613.49180327868852.50819672131148
441213.4918032786885-1.49180327868852
451214.3663366336634-2.36633663366337
461114.3663366336634-3.36633663366337
471514.36633663366340.633663366336634
481514.36633663366340.633663366336634
491714.36633663366342.63366336633663
501313.4918032786885-0.491803278688525
511614.36633663366341.63366336633663
521413.49180327868850.508196721311475
531113.4918032786885-2.49180327868852
541214.3663366336634-2.36633663366337
551213.4918032786885-1.49180327868852
561514.36633663366340.633663366336634
571614.36633663366341.63366336633663
581514.36633663366340.633663366336634
591213.4918032786885-1.49180327868852
601214.3663366336634-2.36633663366337
61813.4918032786885-5.49180327868852
621313.4918032786885-0.491803278688525
631114.3663366336634-3.36633663366337
641414.3663366336634-0.366336633663366
651514.36633663366340.633663366336634
661013.4918032786885-3.49180327868853
671114.3663366336634-3.36633663366337
681213.4918032786885-1.49180327868852
691514.36633663366340.633663366336634
701513.49180327868851.50819672131148
711413.49180327868850.508196721311475
721614.36633663366341.63366336633663
731514.36633663366340.633663366336634
741513.49180327868851.50819672131148
751313.4918032786885-0.491803278688525
761214.3663366336634-2.36633663366337
771714.36633663366342.63366336633663
781314.3663366336634-1.36633663366337
791513.49180327868851.50819672131148
801313.4918032786885-0.491803278688525
811513.49180327868851.50819672131148
821613.49180327868852.50819672131148
831514.36633663366340.633663366336634
841613.49180327868852.50819672131148
851514.36633663366340.633663366336634
861414.3663366336634-0.366336633663366
871513.49180327868851.50819672131148
881414.3663366336634-0.366336633663366
891314.3663366336634-1.36633663366337
90714.3663366336634-7.36633663366337
911714.36633663366342.63366336633663
921314.3663366336634-1.36633663366337
931514.36633663366340.633663366336634
941414.3663366336634-0.366336633663366
951314.3663366336634-1.36633663366337
961614.36633663366341.63366336633663
971214.3663366336634-2.36633663366337
981414.3663366336634-0.366336633663366
991713.49180327868853.50819672131148
1001513.49180327868851.50819672131148
1011714.36633663366342.63366336633663
1021213.4918032786885-1.49180327868852
1031614.36633663366341.63366336633663
1041113.4918032786885-2.49180327868852
1051514.36633663366340.633663366336634
106913.4918032786885-4.49180327868852
1071614.36633663366341.63366336633663
1081513.49180327868851.50819672131148
1091013.4918032786885-3.49180327868853
1101014.3663366336634-4.36633663366337
1111514.36633663366340.633663366336634
1121114.3663366336634-3.36633663366337
1131314.3663366336634-1.36633663366337
1141413.49180327868850.508196721311475
1151814.36633663366343.63366336633663
1161613.49180327868852.50819672131148
1171414.3663366336634-0.366336633663366
1181414.3663366336634-0.366336633663366
1191414.3663366336634-0.366336633663366
1201414.3663366336634-0.366336633663366
1211214.3663366336634-2.36633663366337
1221414.3663366336634-0.366336633663366
1231514.36633663366340.633663366336634
1241514.36633663366340.633663366336634
1251514.36633663366340.633663366336634
1261314.3663366336634-1.36633663366337
1271713.49180327868853.50819672131148
1281714.36633663366342.63366336633663
1291914.36633663366344.63366336633663
1301514.36633663366340.633663366336634
1311313.4918032786885-0.491803278688525
132913.4918032786885-4.49180327868852
1331514.36633663366340.633663366336634
1341513.49180327868851.50819672131148
1351513.49180327868851.50819672131148
1361614.36633663366341.63366336633663
1371113.4918032786885-2.49180327868852
1381413.49180327868850.508196721311475
1391114.3663366336634-3.36633663366337
1401514.36633663366340.633663366336634
1411313.4918032786885-0.491803278688525
1421514.36633663366340.633663366336634
1431613.49180327868852.50819672131148
1441414.3663366336634-0.366336633663366
1451513.49180327868851.50819672131148
1461614.36633663366341.63366336633663
1471614.36633663366341.63366336633663
1481113.4918032786885-2.49180327868852
1491213.4918032786885-1.49180327868852
150913.4918032786885-4.49180327868852
1511614.36633663366341.63366336633663
1521314.3663366336634-1.36633663366337
1531613.49180327868852.50819672131148
1541214.3663366336634-2.36633663366337
155914.3663366336634-5.36633663366337
1561314.3663366336634-1.36633663366337
1571314.3663366336634-1.36633663366337
1581414.3663366336634-0.366336633663366
1591914.36633663366344.63366336633663
1601314.3663366336634-1.36633663366337
1611214.3663366336634-2.36633663366337
1621314.3663366336634-1.36633663366337


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.8271208033374380.3457583933251240.172879196662562
60.8421540005557980.3156919988884040.157845999444202
70.7711095714351180.4577808571297650.228890428564882
80.686645734266830.6267085314663390.313354265733169
90.5775980848950570.8448038302098860.422401915104943
100.4680311126628520.9360622253257050.531968887337148
110.5987596912386160.8024806175227690.401240308761384
120.7324621659539550.5350756680920910.267537834046046
130.8116233000142330.3767533999715340.188376699985767
140.7552513782274990.4894972435450020.244748621772501
150.7639353578780070.4721292842439860.236064642121993
160.7064865332510130.5870269334979750.293513466748987
170.6416289747078460.7167420505843090.358371025292154
180.5994881219362040.8010237561275920.400511878063796
190.5301888850903070.9396222298193860.469811114909693
200.4629933670891530.9259867341783050.537006632910847
210.6274587974811470.7450824050377070.372541202518853
220.7752607186137190.4494785627725620.224739281386281
230.7389721824213540.5220556351572920.261027817578646
240.7746832006427110.4506335987145770.225316799357289
250.7940993872478220.4118012255043560.205900612752178
260.9398626513533440.1202746972933120.0601373486466562
270.9307253758503750.1385492482992500.0692746241496248
280.9108812814356060.1782374371287880.0891187185643941
290.885607423814010.2287851523719790.114392576185990
300.9060616711485850.1878766577028290.0939383288514147
310.8882016108859070.2235967782281850.111798389114093
320.8653488910180730.2693022179638530.134651108981927
330.8621419030636670.2757161938726650.137858096936333
340.8303067916453970.3393864167092050.169693208354603
350.7942282535593320.4115434928813360.205771746440668
360.7838793417489730.4322413165020550.216120658251027
370.8890549555757340.2218900888485310.110945044424266
380.8696262596712740.2607474806574510.130373740328725
390.8668762458982240.2662475082035520.133123754101776
400.8407404282809440.3185191434381120.159259571719056
410.817108270137770.3657834597244580.182891729862229
420.792005738531870.415988522936260.20799426146813
430.787723404600790.4245531907984210.212276595399210
440.7735818791227610.4528362417544770.226418120877239
450.7886286727690590.4227426544618830.211371327230941
460.8366103629823620.3267792740352760.163389637017638
470.805599112075860.388801775848280.19440088792414
480.7714470942363720.4571058115272570.228552905763628
490.7729738400020150.4540523199959690.227026159997985
500.7392637583855190.5214724832289620.260736241614481
510.7133409133471280.5733181733057440.286659086652872
520.6722558441477220.6554883117045570.327744155852278
530.6869887775860590.6260224448278820.313011222413941
540.699248794242130.6015024115157410.300751205757870
550.6776725441917550.644654911616490.322327455808245
560.6362092394962940.7275815210074110.363790760503706
570.6086787813365630.7826424373268750.391321218663437
580.5652450540982230.8695098918035540.434754945901777
590.5405608752729150.918878249454170.459439124727085
600.5525878869796540.8948242260406910.447412113020346
610.7488848042673380.5022303914653250.251115195732662
620.712154355805070.5756912883898610.287845644194931
630.7600002327693490.4799995344613030.239999767230651
640.7247376145099780.5505247709800450.275262385490022
650.6876300777091210.6247398445817580.312369922290879
660.7349454532258430.5301090935483140.265054546774157
670.7774692437357420.4450615125285160.222530756264258
680.7563400074033030.4873199851933950.243659992596697
690.7218072768454920.5563854463090150.278192723154508
700.7001185103813170.5997629792373670.299881489618683
710.6617512673034260.6764974653931470.338248732696573
720.6393777481524980.7212445036950040.360622251847502
730.599244454038750.8015110919224990.400755545961249
740.5740481235751660.8519037528496670.425951876424834
750.5312928082198470.9374143835603070.468707191780153
760.5351978640784320.9296042718431370.464802135921568
770.5468561479415630.9062877041168730.453143852058437
780.5186450138741950.962709972251610.481354986125805
790.4925420812377070.9850841624754140.507457918762293
800.4496712460288190.8993424920576390.55032875397118
810.4237735135399130.8475470270798260.576226486460087
820.4311517923158320.8623035846316650.568848207684168
830.3906770306546570.7813540613093140.609322969345343
840.398708802115360.797417604230720.60129119788464
850.3592249925980950.7184499851961910.640775007401905
860.3193276236516050.6386552473032110.680672376348395
870.2973364371146140.5946728742292280.702663562885386
880.2606258697955220.5212517395910440.739374130204478
890.2373368048716190.4746736097432390.76266319512838
900.6210100181821090.7579799636357830.378989981817891
910.6342389772118120.7315220455763760.365761022788188
920.6054039775772350.789192044845530.394596022422765
930.5644205428256940.8711589143486120.435579457174306
940.5200121183115540.9599757633768910.479987881688446
950.4895484578805480.9790969157610960.510451542119452
960.4670477358826490.9340954717652980.532952264117351
970.4675833268441360.9351666536882710.532416673155864
980.4229754765184140.8459509530368270.577024523481586
990.488995747645470.977991495290940.51100425235453
1000.4681291044175150.936258208835030.531870895582485
1010.4829317231025860.9658634462051720.517068276897414
1020.4516922240175440.9033844480350870.548307775982456
1030.4298652856861110.8597305713722220.570134714313889
1040.4298784594634660.8597569189269320.570121540536534
1050.3882946518158640.7765893036317290.611705348184136
1060.5073293580675360.9853412838649270.492670641932464
1070.4861850991470820.9723701982941640.513814900852918
1080.4607024649917970.9214049299835940.539297535008203
1090.5177451082722480.9645097834555050.482254891727752
1100.6322748098168860.7354503803662280.367725190183114
1110.5896803304504070.8206393390991850.410319669549593
1120.6395228636413960.7209542727172080.360477136358604
1130.6085583635235850.7828832729528310.391441636476415
1140.5623307097647950.875338580470410.437669290235205
1150.6358881796990770.7282236406018460.364111820300923
1160.6481183408594840.7037633182810310.351881659140516
1170.600545710036690.798908579926620.39945428996331
1180.5511865417769890.8976269164460220.448813458223011
1190.500768825928050.99846234814390.49923117407195
1200.4500813126910690.9001626253821380.549918687308931
1210.4502110084976060.9004220169952110.549788991502394
1220.3999710777572460.7999421555144920.600028922242754
1230.3533067545278170.7066135090556350.646693245472183
1240.3086224101942430.6172448203884860.691377589805757
1250.2664989117199910.5329978234399820.733501088280009
1260.2370865322849460.4741730645698930.762913467715054
1270.304248557015150.60849711403030.69575144298485
1280.3179570138823520.6359140277647040.682042986117648
1290.4925580046186270.9851160092372550.507441995381373
1300.4449431695590550.889886339118110.555056830440945
1310.3891148901709090.7782297803418190.610885109829091
1320.5241354461744770.9517291076510470.475864553825523
1330.4755248457338310.9510496914676610.524475154266169
1340.4463097313940920.8926194627881840.553690268605908
1350.4226996140313340.8453992280626680.577300385968666
1360.4097726987962820.8195453975925630.590227301203718
1370.401922775777380.803845551554760.59807722422262
1380.3471062822272970.6942125644545930.652893717772703
1390.3810212330985730.7620424661971460.618978766901427
1400.3304908701684150.660981740336830.669509129831585
1410.2718796697897150.5437593395794290.728120330210285
1420.2283863486494650.456772697298930.771613651350535
1430.2591008689053320.5182017378106650.740899131094668
1440.2045355030029150.4090710060058310.795464496997085
1450.2094328816938590.4188657633877190.79056711830614
1460.2006109834334910.4012219668669820.799389016566509
1470.1995693626098720.3991387252197440.800430637390128
1480.1625198872744730.3250397745489460.837480112725527
1490.1188487661693740.2376975323387480.881151233830626
1500.2934063232345080.5868126464690170.706593676765492
1510.3131087903124410.6262175806248820.686891209687559
1520.2327797174027700.4655594348055390.76722028259723
1530.1652892041192510.3305784082385020.834710795880749
1540.1190802191762810.2381604383525610.88091978082372
1550.2966517404139460.5933034808278910.703348259586054
1560.2029970897073110.4059941794146210.79700291029269
1570.1252204259260810.2504408518521610.87477957407392


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 level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/10w7oi1290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/10w7oi1290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/1p6961290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/1p6961290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/2p6961290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/2p6961290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/3zf891290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/3zf891290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/4zf891290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/4zf891290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/5zf891290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/5zf891290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/6sp7c1290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/6sp7c1290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/7ly7f1290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/7ly7f1290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/8ly7f1290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/8ly7f1290778175.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/9ly7f1290778175.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t12907785571ykwqt6mhd7tbml/9ly7f1290778175.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