Home » date » 2010 » Nov » 27 »

Workshop 8 Regression Analysis of Time Series

*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: Sat, 27 Nov 2010 09:27:19 +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/27/t1290849966zdamsrymgzk8rox.htm/, Retrieved Sat, 27 Nov 2010 10:26:06 +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/27/t1290849966zdamsrymgzk8rox.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 etc...
 
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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = -0.125352338445453 + 0.770919334854652Doubtsaboutactions[t] + 0.295573231590158Parentalexpectations[t] + 0.202170447707957Parentalcritism[t] + 0.543024225850058Personalstandards[t] -0.106005802041174Organization[t] + 0.710976996869086M1[t] -3.28910468985948M2[t] -1.88963794952092M3[t] -2.50928059794326M4[t] -3.67319749042358M5[t] -3.05184560496288M6[t] -2.23347749338627M7[t] -3.60826296671053M8[t] -2.67397849068801M9[t] -1.16907499510196M10[t] -2.84270762453105M11[t] + 0.00455965834326353t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.1253523384454533.415074-0.03670.9707720.485386
Doubtsaboutactions0.7709193348546520.139195.538600
Parentalexpectations0.2955732315901580.1349212.19070.0301150.015058
Parentalcritism0.2021704477079570.1772441.14060.2559570.127978
Personalstandards0.5430242258500580.0969385.601800
Organization-0.1060058020411740.108083-0.98080.3283780.164189
M10.7109769968690861.744070.40770.6841460.342073
M2-3.289104689859481.725559-1.90610.0586710.029335
M3-1.889637949520921.731896-1.09110.2770980.138549
M4-2.509280597943261.779088-1.41040.1606150.080307
M5-3.673197490423581.758558-2.08880.0385270.019264
M6-3.051845604962881.773031-1.72130.0873970.043699
M7-2.233477493386271.806722-1.23620.2184380.109219
M8-3.608262966710531.765463-2.04380.0428340.021417
M9-2.673978490688011.755091-1.52360.1298590.06493
M10-1.169074995101961.749617-0.66820.5051050.252553
M11-2.842707624531051.799076-1.58010.1163260.058163
t0.004559658343263530.0079370.57450.5665660.283283


Multiple Linear Regression - Regression Statistics
Multiple R0.680421219467895
R-squared0.462973035902178
Adjusted R-squared0.398225104060596
F-TEST (value)7.15039110492259
F-TEST (DF numerator)17
F-TEST (DF denominator)141
p-value2.60091947978935e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.43942823848552
Sum Squared Residuals2778.90175493744


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12427.3368364920501-3.33683649205006
22519.89862337388205.10137662611804
31722.9068949393601-5.90689493936005
41819.0870604570095-1.08706045700949
51817.69043868005700.309561319943035
61618.3937899777426-2.39378997774259
72020.3677290586633-0.367729058663296
81620.5215904689572-4.52159046895723
91821.4377715612131-3.43777156121308
101721.242290769736-4.242290769736
112321.44143928883051.55856071116952
123024.34062761686165.65937238313841
132317.89850066313965.10149933686039
141817.57180668730510.428193312694878
151521.5596159493846-6.55961594938464
161217.457770842005-5.45777084200499
172117.52334841821913.47665158178087
181514.27116925216970.728830747830263
192019.73749014622900.262509853771029
203124.76850956522256.23149043477753
212724.19448694744492.80551305255513
223427.96818030311696.03181969688309
232118.93266570336252.06733429663749
243122.68634866567738.31365133432273
251921.9407199894101-2.94071998941006
261619.0699992162443-3.06999921624426
272021.724482058357-1.72448205835698
282117.86661859312113.13338140687888
292220.4151079850461.58489201495400
301718.4617400392555-1.46174003925550
312419.86633208297254.13366791702748
322528.8765390745664-3.87653907456635
332626.0020190996686-0.00201909966857823
342524.71665781817090.283342181829144
351722.3235648625207-5.32356486252067
363229.23823818672682.76176181327322
373325.98017714998057.01982285001949
381320.5505345585803-7.55053455858034
393228.03278262569083.96721737430916
402525.0704264313399-0.0704264313399201
412925.46174530773863.53825469226141
422221.04761319163890.95238680836113
431817.3976314081920.602368591808006
441720.2827798189262-3.28277981892623
452021.3686394675797-1.36863946757965
461521.2453575636257-6.24535756362572
472021.4291412027766-1.42914120277664
483329.59219969876923.40780030123084
492924.81995582584014.18004417415995
502325.3958184511985-2.39581845119854
512622.78422753956033.21577246043974
521818.5643551657614-0.564355165761443
532017.20886983246432.79113016753572
541110.72593135172070.274068648279334
552829.3670833028862-1.36708330288617
562621.66633243713014.33366756286987
572221.59047862271440.409521377285568
581721.1888892332046-4.18888923320459
591214.5534601467699-2.55346014676993
601423.0780791065479-9.07807910654787
611723.5508870088801-6.55088700888012
622120.12135200585690.878647994143073
631923.1409375453815-4.14093754538147
641822.3516986041967-4.35169860419672
651016.3485059422252-6.34850594222523
662922.9284404536166.07155954638399
673118.385084804872612.6149151951274
681921.4100633233004-2.41006332330042
69919.3733071919333-10.3733071919333
702023.2989911582597-3.29899115825969
712817.013459243365310.9865407566347
721920.1819445901327-1.18194459013272
733026.01538947927883.98461052072125
742926.08236455293102.91763544706896
752621.83733985679254.16266014320754
762319.21969948112793.78030051887212
771321.1542529402690-8.15425294026904
782121.7894404169690-0.789440416968963
791921.2409000284644-2.24090002846443
802821.41022274397176.58977725602832
812324.9404776635274-1.94047766352738
821815.04891077526392.95108922473605
832120.10657193635120.893428063648838
842024.2073562210113-4.20735622101126
852322.59680803286660.403191967133399
862119.91849638002811.0815036199719
872121.9275417455889-0.927541745588918
881522.2523992871160-7.25239928711596
892825.74737620833692.2526237916631
901916.90972656565582.09027343434418
912621.29163117975904.70836882024095
921011.8913995178294-1.89139951782944
931616.5691197955464-0.569119795546397
942222.3164119872438-0.316411987243773
951918.21774370563620.782256294363788
963131.2752758210745-0.275275821074489
973128.07354383885032.92645616114969
982923.97809128355025.02190871644975
991917.88507603718261.11492396281744
1002218.75066766533863.24933233466140
1012321.08990731496571.91009268503429
1021515.5355624652032-0.535562465203189
1032021.8510765528512-1.85107655285122
1041818.4346278902580-0.434627890257954
1052321.53163026725271.46836973274726
1062521.88524973366853.11475026633147
1072116.03044103904834.96955896095174
1082421.8968945246042.10310547539602
1092528.253382630281-3.25338263028099
1101718.5591190876350-1.55911908763502
1111315.2087873031292-2.20878730312918
1122818.42891737114499.57108262885511
1132118.68054563143382.31945436856619
1142527.4869808151687-2.48698081516871
115920.6890767669850-11.6890767669850
1161616.6753334845747-0.675333484574669
1171921.0932981425276-2.09329814252763
1181720.4432810831369-3.44328108313686
1192524.02293629077410.977063709225948
1202017.75642649921592.24357350078408
1212924.28165264051834.7183473594817
1221418.1193248928042-4.11932489280418
1232227.2621139507390-5.26211395073904
1241515.2949209187737-0.294920918773672
1251923.6368883879306-4.63688838793065
1262021.4849155058446-1.48491550584459
1271517.5544092830465-2.55440928304646
1282020.4752333426692-0.475233342669169
1291820.1029756071086-2.10297560710856
1303326.42835288926956.57164711073049
1312223.300171882512-1.30017188251202
1321619.041304708039-3.04130470803901
1331722.1258973592819-5.12589735928187
1341614.16903536202691.83096463797312
1352117.72425346432023.27574653567981
1362627.727103287484-1.72710328748400
1371819.8053204329258-1.80532043292579
1381822.3904862825775-4.39048628257748
1391718.6680996590357-1.66809965903566
1402223.4582287533804-1.45822875338038
1413024.12162076488975.87837923511026
1423028.47495402512961.52504597487039
1432429.9574591028377-5.9574591028377
1442124.0342628393382-3.0342628393382
1452128.674775882773-7.67477588277303
1462926.16780553018882.83219446981117
1473123.99932787605877.00067212394134
1482018.92836189558131.07163810441868
1491613.23769291838792.76230708161209
1502218.57420368243793.42579631756214
1512020.5834557260427-0.583455726042652
1522826.12913957921391.87086042078611
1533826.674174868593711.3258251314063
1542220.7424726601741.25752733982601
1552025.670945595215-5.67094559521501
1561720.6710415220018-3.67104152200176
1572827.45147300684970.548526993150266
1582223.3976286177686-1.39762861776856
1593127.00661910845483.99338089154524


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.8535413977038380.2929172045923230.146458602296162
220.7861351838942090.4277296322115820.213864816105791
230.6869894349808510.6260211300382970.313010565019149
240.5997066516684670.8005866966630650.400293348331533
250.5789860058725230.8420279882549540.421013994127477
260.6253575012539160.7492849974921680.374642498746084
270.5624252864619230.8751494270761540.437574713538077
280.4918960486265960.9837920972531910.508103951373404
290.4082787862759820.8165575725519630.591721213724018
300.3333182527610670.6666365055221330.666681747238933
310.2672960669919610.5345921339839210.73270393300804
320.3461466499578420.6922932999156840.653853350042158
330.2753024682995820.5506049365991640.724697531700418
340.2141785415571060.4283570831142130.785821458442894
350.2706583159599400.5413166319198790.72934168404006
360.2350269755562770.4700539511125550.764973024443723
370.2800344920598350.5600689841196690.719965507940165
380.3617179137079150.7234358274158310.638282086292085
390.3379041491065610.6758082982131210.662095850893439
400.2890346607021400.5780693214042790.71096533929786
410.2739440007727230.5478880015454470.726055999227277
420.2228857232585730.4457714465171470.777114276741427
430.2184548026541170.4369096053082330.781545197345883
440.1863532323249690.3727064646499390.81364676767503
450.1609420760666110.3218841521332210.83905792393339
460.1930136208195040.3860272416390070.806986379180496
470.1537102709310960.3074205418621930.846289729068904
480.1435725173804470.2871450347608950.856427482619553
490.1255160213768450.251032042753690.874483978623155
500.1025779066136710.2051558132273410.89742209338633
510.1148311372512170.2296622745024330.885168862748783
520.08932353835378570.1786470767075710.910676461646214
530.07414979004984140.1482995800996830.925850209950159
540.0559192715890590.1118385431781180.94408072841094
550.06669261431788790.1333852286357760.933307385682112
560.08289106416877440.1657821283375490.917108935831226
570.06490397125887810.1298079425177560.935096028741122
580.05958254018643310.1191650803728660.940417459813567
590.04755942986822580.09511885973645160.952440570131774
600.1983820441643980.3967640883287960.801617955835602
610.2492865506583690.4985731013167380.750713449341631
620.2260014313784770.4520028627569540.773998568621523
630.2085644617122930.4171289234245860.791435538287707
640.2145227639945470.4290455279890930.785477236005453
650.2624091077379050.524818215475810.737590892262095
660.283536710849780.567073421699560.71646328915022
670.6114375252228390.7771249495543210.388562474777161
680.5723363113837220.8553273772325560.427663688616278
690.7477553894921590.5044892210156820.252244610507841
700.7291295259164920.5417409481670170.270870474083508
710.9059277587023070.1881444825953860.094072241297693
720.8850528052501890.2298943894996230.114947194749811
730.8828113507657580.2343772984684840.117188649234242
740.8711648767749470.2576702464501050.128835123225053
750.8781492216414640.2437015567170720.121850778358536
760.8717285757783220.2565428484433570.128271424221678
770.9335146564818710.1329706870362580.066485343518129
780.9161068853242860.1677862293514270.0838931146757137
790.905051160184020.1898976796319600.0949488398159798
800.9291512943791370.1416974112417260.070848705620863
810.9167026163463910.1665947673072170.0832973836536085
820.9103919791219880.1792160417560240.0896080208780122
830.888731039596120.2225379208077590.111268960403880
840.883989040455540.2320219190889190.116010959544459
850.8583055586707860.2833888826584280.141694441329214
860.8326587072783920.3346825854432160.167341292721608
870.8021692800075640.3956614399848720.197830719992436
880.8734350428526080.2531299142947840.126564957147392
890.8495701732802810.3008596534394370.150429826719719
900.82437384965260.3512523006947990.175626150347400
910.8482053012617750.303589397476450.151794698738225
920.8211177522473880.3577644955052240.178882247752612
930.80253695879290.3949260824142020.197463041207101
940.7753946180494820.4492107639010360.224605381950518
950.7350962667298650.5298074665402690.264903733270135
960.6900218458422330.6199563083155340.309978154157767
970.6822497658922150.635500468215570.317750234107785
980.7163227862697920.5673544274604160.283677213730208
990.6716289574713540.6567420850572910.328371042528646
1000.6360522088301260.7278955823397470.363947791169874
1010.5967392049396350.8065215901207310.403260795060365
1020.5445756643017980.9108486713964040.455424335698202
1030.5399625285415920.9200749429168160.460037471458408
1040.4851859023100770.9703718046201540.514814097689923
1050.4395196008698780.8790392017397560.560480399130122
1060.4037104242797730.8074208485595450.596289575720227
1070.4447527394985290.8895054789970580.555247260501471
1080.4740763142973760.9481526285947510.525923685702624
1090.4523340858075610.9046681716151230.547665914192438
1100.4001971887591140.8003943775182290.599802811240886
1110.3695430569096710.7390861138193420.630456943090329
1120.734731872191260.5305362556174790.265268127808739
1130.7898504871679070.4202990256641870.210149512832093
1140.7829851997623790.4340296004752420.217014800237621
1150.8502837313942810.2994325372114380.149716268605719
1160.808770919288430.3824581614231390.191229080711569
1170.7867110791668480.4265778416663050.213288920833152
1180.7910518178167090.4178963643665820.208948182183291
1190.7809714211860680.4380571576278650.219028578813932
1200.8506327293025380.2987345413949230.149367270697462
1210.954281499114160.0914370017716820.045718500885841
1220.9365109024586540.1269781950826920.0634890975413462
1230.9608714610145760.0782570779708480.039128538985424
1240.9405447746914770.1189104506170470.0594552253085233
1250.937371612154450.1252567756911010.0626283878455503
1260.9092005161096470.1815989677807060.0907994838903531
1270.8700883561163290.2598232877673430.129911643883671
1280.819527124650770.3609457506984610.180472875349231
1290.9559218794031660.08815624119366760.0440781205968338
1300.9594086086886690.08118278262266280.0405913913113314
1310.9537896728602440.09242065427951150.0462103271397557
1320.9374334852211830.1251330295576330.0625665147788167
1330.9003847520725750.1992304958548510.0996152479274253
1340.8554874166511430.2890251666977130.144512583348857
1350.7775031812163280.4449936375673440.222496818783672
1360.667979690600190.6640406187996210.332020309399811
1370.6300435858093850.739912828381230.369956414190615
1380.7038152947919960.5923694104160080.296184705208004


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.0508474576271186OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/10jku41290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/10jku41290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/1u1fs1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/1u1fs1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/2u1fs1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/2u1fs1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/35aev1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/35aev1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/45aev1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/45aev1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/55aev1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/55aev1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/6gjvg1290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/6gjvg1290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/7rbv11290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/7rbv11290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/8rbv11290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/8rbv11290850027.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/9rbv11290850027.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290849966zdamsrymgzk8rox/9rbv11290850027.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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