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 11:03:14 +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/t1290855710vi0ia4uwv7xdx02.htm/, Retrieved Sat, 27 Nov 2010 12:02:00 +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/t1290855710vi0ia4uwv7xdx02.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 «
0 24 0 25 0 17 0 18 0 18 0 16 1 20 1 16 1 18 1 17 1 23 1 30 1 23 1 18 1 15 1 12 1 21 1 15 1 20 1 31 1 27 1 34 1 21 1 31 1 19 1 16 1 20 1 21 1 22 1 17 1 24 1 25 1 26 1 25 1 17 1 32 1 33 1 13 1 32 1 25 1 29 1 22 1 18 1 17 1 20 1 15 1 20 1 33 1 29 1 23 1 26 1 18 1 20 1 11 1 28 1 26 1 22 1 17 1 12 1 14 1 17 1 21 1 19 1 18 1 10 1 29 1 31 1 19 1 9 1 20 1 28 1 19 1 30 1 29 1 26 1 23 1 13 1 21 1 19 1 28 1 23 1 18 1 21 1 20 1 23 1 21 1 21 1 15 1 28 1 19 1 26 1 10 1 16 1 22 1 19 1 31 1 31 1 29 1 19 1 22 1 23 1 15 1 20 1 18 1 23 1 25 1 21 1 24 1 25 1 17 1 13 1 28 1 21 1 25 1 9 1 16 1 19 1 17 1 25 1 20 1 29 1 14 1 22 1 15 1 19 1 20 1 15 1 20 1 18 1 33 1 22 1 16 1 17 1 16 1 21 1 26 1 18 1 18 1 17 1 22 1 30 1 30 1 24 1 21 1 21 1 29 1 31 1 20 1 16 1 22 1 20 1 28 1 38 1 22 1 20 1 17 1 28 1 22 1 31
 
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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = + 19.6666666666666 + 1.99346405228764Month[t] + e[t]


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


Multiple Linear Regression - Regression Statistics
Multiple R0.0665874887665842
R-squared0.00443389366023998
Adjusted R-squared-0.00190729173045923
F-TEST (value)0.699221578782946
F-TEST (DF numerator)1
F-TEST (DF denominator)157
p-value0.404316242205358
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.72827389810518
Sum Squared Residuals5151.66013071895


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12419.66666666666684.3333333333332
22519.66666666666665.33333333333339
31719.6666666666666-2.66666666666661
41819.6666666666666-1.66666666666661
51819.6666666666666-1.66666666666661
61619.6666666666666-3.66666666666661
72021.6601307189542-1.66013071895425
81621.6601307189542-5.66013071895425
91821.6601307189542-3.66013071895425
101721.6601307189542-4.66013071895425
112321.66013071895421.33986928104575
123021.66013071895428.33986928104575
132321.66013071895421.33986928104575
141821.6601307189542-3.66013071895425
151521.6601307189542-6.66013071895425
161221.6601307189542-9.66013071895425
172121.6601307189542-0.660130718954249
181521.6601307189542-6.66013071895425
192021.6601307189542-1.66013071895425
203121.66013071895429.33986928104575
212721.66013071895425.33986928104575
223421.660130718954212.3398692810458
232121.6601307189542-0.660130718954249
243121.66013071895429.33986928104575
251921.6601307189542-2.66013071895425
261621.6601307189542-5.66013071895425
272021.6601307189542-1.66013071895425
282121.6601307189542-0.660130718954249
292221.66013071895420.339869281045751
301721.6601307189542-4.66013071895425
312421.66013071895422.33986928104575
322521.66013071895423.33986928104575
332621.66013071895424.33986928104575
342521.66013071895423.33986928104575
351721.6601307189542-4.66013071895425
363221.660130718954210.3398692810458
373321.660130718954211.3398692810458
381321.6601307189542-8.66013071895425
393221.660130718954210.3398692810458
402521.66013071895423.33986928104575
412921.66013071895427.33986928104575
422221.66013071895420.339869281045751
431821.6601307189542-3.66013071895425
441721.6601307189542-4.66013071895425
452021.6601307189542-1.66013071895425
461521.6601307189542-6.66013071895425
472021.6601307189542-1.66013071895425
483321.660130718954211.3398692810458
492921.66013071895427.33986928104575
502321.66013071895421.33986928104575
512621.66013071895424.33986928104575
521821.6601307189542-3.66013071895425
532021.6601307189542-1.66013071895425
541121.6601307189542-10.6601307189542
552821.66013071895426.33986928104575
562621.66013071895424.33986928104575
572221.66013071895420.339869281045751
581721.6601307189542-4.66013071895425
591221.6601307189542-9.66013071895425
601421.6601307189542-7.66013071895425
611721.6601307189542-4.66013071895425
622121.6601307189542-0.660130718954249
631921.6601307189542-2.66013071895425
641821.6601307189542-3.66013071895425
651021.6601307189542-11.6601307189542
662921.66013071895427.33986928104575
673121.66013071895429.33986928104575
681921.6601307189542-2.66013071895425
69921.6601307189542-12.6601307189542
702021.6601307189542-1.66013071895425
712821.66013071895426.33986928104575
721921.6601307189542-2.66013071895425
733021.66013071895428.33986928104575
742921.66013071895427.33986928104575
752621.66013071895424.33986928104575
762321.66013071895421.33986928104575
771321.6601307189542-8.66013071895425
782121.6601307189542-0.660130718954249
791921.6601307189542-2.66013071895425
802821.66013071895426.33986928104575
812321.66013071895421.33986928104575
821821.6601307189542-3.66013071895425
832121.6601307189542-0.660130718954249
842021.6601307189542-1.66013071895425
852321.66013071895421.33986928104575
862121.6601307189542-0.660130718954249
872121.6601307189542-0.660130718954249
881521.6601307189542-6.66013071895425
892821.66013071895426.33986928104575
901921.6601307189542-2.66013071895425
912621.66013071895424.33986928104575
921021.6601307189542-11.6601307189542
931621.6601307189542-5.66013071895425
942221.66013071895420.339869281045751
951921.6601307189542-2.66013071895425
963121.66013071895429.33986928104575
973121.66013071895429.33986928104575
982921.66013071895427.33986928104575
991921.6601307189542-2.66013071895425
1002221.66013071895420.339869281045751
1012321.66013071895421.33986928104575
1021521.6601307189542-6.66013071895425
1032021.6601307189542-1.66013071895425
1041821.6601307189542-3.66013071895425
1052321.66013071895421.33986928104575
1062521.66013071895423.33986928104575
1072121.6601307189542-0.660130718954249
1082421.66013071895422.33986928104575
1092521.66013071895423.33986928104575
1101721.6601307189542-4.66013071895425
1111321.6601307189542-8.66013071895425
1122821.66013071895426.33986928104575
1132121.6601307189542-0.660130718954249
1142521.66013071895423.33986928104575
115921.6601307189542-12.6601307189542
1161621.6601307189542-5.66013071895425
1171921.6601307189542-2.66013071895425
1181721.6601307189542-4.66013071895425
1192521.66013071895423.33986928104575
1202021.6601307189542-1.66013071895425
1212921.66013071895427.33986928104575
1221421.6601307189542-7.66013071895425
1232221.66013071895420.339869281045751
1241521.6601307189542-6.66013071895425
1251921.6601307189542-2.66013071895425
1262021.6601307189542-1.66013071895425
1271521.6601307189542-6.66013071895425
1282021.6601307189542-1.66013071895425
1291821.6601307189542-3.66013071895425
1303321.660130718954211.3398692810458
1312221.66013071895420.339869281045751
1321621.6601307189542-5.66013071895425
1331721.6601307189542-4.66013071895425
1341621.6601307189542-5.66013071895425
1352121.6601307189542-0.660130718954249
1362621.66013071895424.33986928104575
1371821.6601307189542-3.66013071895425
1381821.6601307189542-3.66013071895425
1391721.6601307189542-4.66013071895425
1402221.66013071895420.339869281045751
1413021.66013071895428.33986928104575
1423021.66013071895428.33986928104575
1432421.66013071895422.33986928104575
1442121.6601307189542-0.660130718954249
1452121.6601307189542-0.660130718954249
1462921.66013071895427.33986928104575
1473121.66013071895429.33986928104575
1482021.6601307189542-1.66013071895425
1491621.6601307189542-5.66013071895425
1502221.66013071895420.339869281045751
1512021.6601307189542-1.66013071895425
1522821.66013071895426.33986928104575
1533821.660130718954216.3398692810458
1542221.66013071895420.339869281045751
1552021.6601307189542-1.66013071895425
1561721.6601307189542-4.66013071895425
1572821.66013071895426.33986928104575
1582221.66013071895420.339869281045751
1593121.66013071895429.33986928104575


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.364858766057140.729717532114280.63514123394286
60.2971586065851390.5943172131702780.702841393414861
70.1752957630977480.3505915261954960.824704236902252
80.1222114278261490.2444228556522980.87778857217385
90.06657688315802640.1331537663160530.933423116841974
100.03548024124239360.07096048248478720.964519758757606
110.03887159804693870.07774319609387740.961128401953061
120.1989304053366440.3978608106732870.801069594663356
130.1461236716976860.2922473433953720.853876328302314
140.1114577359675190.2229154719350370.888542264032481
150.1169134299123840.2338268598247690.883086570087616
160.1782318119877090.3564636239754170.821768188012291
170.1330303182890250.2660606365780500.866969681710975
180.1210272685959150.2420545371918290.878972731404085
190.08651243039220710.1730248607844140.913487569607793
200.2505832481562510.5011664963125020.749416751843749
210.2793822046508540.5587644093017070.720617795349146
220.56540478406120.86919043187760.4345952159388
230.4981076126124110.9962152252248230.501892387387589
240.6051202044928210.7897595910143570.394879795507179
250.5550975365131790.8898049269736420.444902463486821
260.5485198774695290.9029602450609420.451480122530471
270.4893366126157170.9786732252314330.510663387384283
280.4278262448083410.8556524896166810.572173755191659
290.3691754881867970.7383509763735930.630824511813203
300.3449631078763150.6899262157526290.655036892123686
310.3034988511784150.6069977023568310.696501148821585
320.2736979059232550.547395811846510.726302094076745
330.2563213626554350.5126427253108710.743678637344565
340.2273667820748560.4547335641497120.772633217925144
350.2137316935212760.4274633870425520.786268306478724
360.322834599152910.645669198305820.67716540084709
370.4679141859853940.9358283719707880.532085814014606
380.5438485122764300.9123029754471390.456151487723570
390.6458709975540610.7082580048918780.354129002445939
400.608348029740140.783303940519720.39165197025986
410.6274453945446620.7451092109106770.372554605455338
420.5774806337910410.8450387324179180.422519366208959
430.5530091679268180.8939816641463650.446990832073182
440.541261232751180.9174775344976410.458738767248821
450.4964939614384040.9929879228768070.503506038561596
460.5185818030268160.9628363939463680.481418196973184
470.4733685060627790.9467370121255580.526631493937221
480.6052125118495190.7895749763009620.394787488150481
490.6263536948525480.7472926102949040.373646305147452
500.5803103165689310.8393793668621370.419689683431069
510.5544625564075090.8910748871849830.445537443592491
520.5303105383169190.9393789233661620.469689461683081
530.487970530615490.975941061230980.51202946938451
540.6106991033796880.7786017932406250.389300896620312
550.6156542159031060.7686915681937870.384345784096894
560.5923856162233940.8152287675532120.407614383776606
570.5457479783942980.9085040432114040.454252021605702
580.5328412529363320.9343174941273360.467158747063668
590.6199808697544320.7600382604911370.380019130245568
600.654523219951280.690953560097440.34547678004872
610.6394987885740610.7210024228518780.360501211425939
620.5954573008605530.8090853982788930.404542699139447
630.5594507529884450.881098494023110.440549247011555
640.5316184469464630.9367631061070750.468381553053537
650.6659767442169620.6680465115660760.334023255783038
660.6915925194391420.6168149611217160.308407480560858
670.7528342266908870.4943315466182270.247165773309113
680.723218330193970.5535633396120590.276781669806030
690.8465254883690460.3069490232619080.153474511630954
700.820167660453750.35966467909250.17983233954625
710.8262337661658850.347532467668230.173766233834115
720.8019715089679940.3960569820640110.198028491032006
730.8344253727759760.3311492544480480.165574627224024
740.8510901755687160.2978196488625670.148909824431284
750.8391645955423730.3216708089152540.160835404457627
760.8113609356405820.3772781287188360.188639064359418
770.8474032512767470.3051934974465050.152596748723253
780.8192739305237030.3614521389525930.180726069476297
790.7946285272455740.4107429455088530.205371472754426
800.8012900965135260.3974198069729490.198709903486474
810.7697851002082070.4604297995835870.230214899791793
820.748454771914850.5030904561703010.251545228085151
830.7111254889023580.5777490221952850.288874511097642
840.6742245979940260.6515508040119480.325775402005974
850.6342800055663130.7314399888673730.365719994433687
860.590965583482730.818068833034540.40903441651727
870.5464747065918510.9070505868162980.453525293408149
880.5613916526494270.8772166947011450.438608347350573
890.5704031620483260.8591936759033480.429596837951674
900.5344985797017810.9310028405964380.465501420298219
910.5143767905888720.9712464188222550.485623209411128
920.6529640355975350.6940719288049290.347035964402464
930.6523542715709760.6952914568580480.347645728429024
940.608583068217690.7828338635646210.391416931782311
950.5735832175141460.8528335649717070.426416782485854
960.6446942464575230.7106115070849540.355305753542477
970.7130709565402430.5738580869195140.286929043459757
980.7387918750761130.5224162498477750.261208124923887
990.7073547214454370.5852905571091250.292645278554563
1000.6654214016456890.6691571967086220.334578598354311
1010.6236441430372770.7527117139254460.376355856962723
1020.638428256905780.723143486188440.36157174309422
1030.5964327935730220.8071344128539560.403567206426978
1040.5685996159766650.8628007680466710.431400384023335
1050.5231277965357610.9537444069284770.476872203464239
1060.4906853480513660.9813706961027320.509314651948634
1070.4428995970506430.8857991941012860.557100402949357
1080.402824161411170.805648322822340.59717583858883
1090.3715798600722690.7431597201445380.62842013992773
1100.354455028637820.708910057275640.64554497136218
1110.4127104074093770.8254208148187540.587289592590623
1120.4207354216204450.841470843240890.579264578379555
1130.3729044982621740.7458089965243470.627095501737826
1140.3410087874673240.6820175749346480.658991212532676
1150.5303194608925890.9393610782148210.469680539107411
1160.5322624780801750.935475043839650.467737521919825
1170.4939105698043350.987821139608670.506089430195665
1180.4810454024691710.9620908049383420.518954597530829
1190.4424016595549440.8848033191098880.557598340445056
1200.3969131636345220.7938263272690440.603086836365478
1210.4200733384665870.8401466769331740.579926661533413
1220.4688954551629400.9377909103258790.53110454483706
1230.414933128542160.829866257084320.58506687145784
1240.4440668689915150.888133737983030.555933131008485
1250.4073306655631990.8146613311263970.592669334436801
1260.3627212322719780.7254424645439550.637278767728022
1270.3991951639536510.7983903279073030.600804836046349
1280.3562030077756140.7124060155512280.643796992224386
1290.3386951673346770.6773903346693550.661304832665323
1300.4612873162239530.9225746324479070.538712683776047
1310.4028348149844280.8056696299688570.597165185015572
1320.4239334018171670.8478668036343330.576066598182833
1330.428071751971780.856143503943560.57192824802822
1340.4640389766663930.9280779533327850.535961023333607
1350.4122118197632940.8244236395265870.587788180236706
1360.3632134739375290.7264269478750570.636786526062471
1370.3566693133152190.7133386266304380.643330686684781
1380.3555927412681940.7111854825363870.644407258731806
1390.3880817276180790.7761634552361590.611918272381921
1400.3332889714452840.6665779428905680.666711028554716
1410.3342277481591060.6684554963182110.665772251840894
1420.3396293412770540.6792586825541070.660370658722947
1430.2729087034814630.5458174069629270.727091296518537
1440.2258782436362610.4517564872725230.774121756363739
1450.1843489950479420.3686979900958850.815651004952058
1460.1651138706648570.3302277413297140.834886129335143
1470.1862587699665350.3725175399330700.813741230033465
1480.1483082014809860.2966164029619710.851691798519014
1490.1898281322857720.3796562645715440.810171867714228
1500.1389691106453570.2779382212907140.861030889354643
1510.1188232491427610.2376464982855230.881176750857239
1520.07774737062075570.1554947412415110.922252629379244
1530.3979173723924550.7958347447849090.602082627607545
1540.2603703959356250.5207407918712490.739629604064375


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/3lpp71290855782.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/3lpp71290855782.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/4wgos1290855782.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/4wgos1290855782.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/5wgos1290855782.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/27/t1290855710vi0ia4uwv7xdx02/5wgos1290855782.ps (open in new window)


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


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


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


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


 
Parameters (Session):
par1 = 2 ; par2 = Include Monthly 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