Home » date » 2010 » Nov » 26 »

multiple regression model 3

*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 10:20:52 +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/t1290766854ku88gxiwe9giqig.htm/, Retrieved Fri, 26 Nov 2010 11:20:54 +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/t1290766854ku88gxiwe9giqig.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 14 0 11 0 12 0 24 26 0 1 25 25 11 11 7 7 8 8 25 23 23 1 17 17 6 6 17 17 8 8 30 25 25 0 18 0 12 0 10 0 8 0 19 23 0 1 18 18 8 8 12 12 9 9 22 19 19 1 16 16 10 10 12 12 7 7 22 29 29 1 20 20 10 10 11 11 4 4 25 25 25 1 16 16 11 11 11 11 11 11 23 21 21 1 18 18 16 16 12 12 7 7 17 22 22 1 17 17 11 11 13 13 7 7 21 25 25 0 23 0 13 0 14 0 12 0 19 24 0 1 30 30 12 12 16 16 10 10 19 18 18 1 23 23 8 8 11 11 10 10 15 22 22 1 18 18 12 12 10 10 8 8 16 15 15 0 15 0 11 0 11 0 8 0 23 22 0 0 12 0 4 0 15 0 4 0 27 28 0 1 21 21 9 9 9 9 9 9 22 20 20 0 15 0 8 0 11 0 8 0 14 12 0 0 20 0 8 0 17 0 7 0 22 24 0 1 31 31 14 14 17 17 11 11 23 20 20 1 27 27 15 15 11 11 9 9 23 21 21 0 34 0 16 0 18 0 11 0 21 20 0 1 21 21 9 9 14 14 13 13 19 21 21 0 31 0 14 0 10 0 8 0 18 23 0 0 19 0 11 0 11 0 8 0 20 28 0 1 16 16 8 8 15 15 9 9 23 24 24 1 20 20 9 9 15 15 6 6 25 24 24 0 21 0 9 0 13 0 9 0 19 24 0 0 22 0 9 0 16 0 9 0 24 23 0 1 17 17 9 9 13 13 6 6 22 23 23 0 24 0 10 0 9 0 6 0 25 29 0 1 25 25 16 16 18 18 16 16 26 24 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 6.64886266317348 + 1.00060504318254G[t] + 0.357831221394554CM[t] -0.0605931223005844`CM*G`[t] -0.474063883689896D[t] + 0.160074708225534`D*G`[t] -0.0192549611452811PE[t] + 0.307813649819778`PE*G`[t] + 0.0940545498504233PC[t] -0.128018935601633`PC*G`[t] + 0.526291068222185O[t] -0.156397668244835`O*G`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.648862663173484.0271991.6510.100890.050445
G1.000605043182544.8924330.20450.8382310.419116
CM0.3578312213945540.0866654.12896.1e-053.1e-05
`CM*G`-0.06059312230058440.115787-0.52330.6015470.300774
D-0.4740638836898960.172618-2.74630.0067850.003393
`D*G`0.1600747082255340.2294850.69750.4865750.243288
PE-0.01925496114528110.171933-0.1120.9109840.455492
`PE*G`0.3078136498197780.2174271.41570.158990.079495
PC0.09405454985042330.2281310.41230.6807370.340368
`PC*G`-0.1280189356016330.278779-0.45920.6467640.323382
O0.5262910682221850.1313224.00769.7e-054.9e-05
`O*G`-0.1563976682448350.159899-0.97810.3296410.164821


Multiple Linear Regression - Regression Statistics
Multiple R0.623538425311713
R-squared0.388800167840211
Adjusted R-squared0.342750865417213
F-TEST (value)8.44312828604408
F-TEST (DF numerator)11
F-TEST (DF denominator)146
p-value2.11740625033485e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.42879202788709
Sum Squared Residuals1716.4657564933


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.20033540436810.799664595631942
22521.88228318778813.11771681221189
33024.69969795905785.30030204094217
41920.0656394004575-1.06563940045752
52220.67283947823531.32716052176471
62223.2172477003945-1.21724770039454
72522.73996096544022.26003903455985
82319.51969509343203.48030490656796
91719.3385350459549-2.33853504595486
102122.0094817127892-1.00948171278925
111922.2062210467831-3.20622104678314
121923.7341169344749-4.7341169344749
131522.9461870992115-7.94618709921147
141617.3941561848707-1.39415618487066
152318.92066359059634.07933640940371
162723.87012547759223.12987452240781
172220.75478193400671.24521806599331
181415.0799445594441-1.07994455944413
192222.975009168361-0.975009168361003
202324.3977577855181-1.39775778551813
212321.60128625311071.39871374688932
222122.4439341637333-1.44393416373326
231922.4316112343517-3.43161123435168
241823.7693175112069-5.76931751120692
252023.5097348855076-3.50973488550761
262322.79350634595760.206493654042416
272523.77036272412271.22963727587727
281923.1239054503476-4.12390545034763
292422.89768072008421.10231927991584
302221.93163764951450.0683623504855209
312526.1496467669822-1.14964676698218
322623.58466119985342.41533880014656
332923.60609301966845.39390698033157
343225.04079534325966.95920465674041
352522.24419244700412.75580755299586
362924.58904003133274.41095996866733
372825.21202639828802.78797360171203
381715.53326311866121.46673688133885
392826.31735533841881.68264466158119
402922.43789347807846.56210652192159
412626.7717619565117-0.771761956511709
422523.60449367640521.39550632359481
431417.7597459527778-3.7597459527778
442522.83127810128922.16872189871082
452621.72942961062644.27057038937358
462020.0254729115729-0.0254729115729464
471821.7760006151216-3.77600061512159
483224.84241688366277.15758311633735
492524.82801820300080.171981796999167
502522.52560393574862.47439606425143
512321.27838131140131.72161868859874
522121.9756121974588-0.975612197458829
532024.0023423110419-4.00234231104186
541516.5489407322832-1.54894073228325
553024.82041908666725.17958091333277
562425.2136967791899-1.21369677918994
572624.22692510925241.77307489074756
582420.81264370131843.18735629868161
592222.6019735156847-0.601973515684749
601416.4988057281025-2.49880572810254
612422.23812659413691.76187340586312
622422.36767791710651.63232208289353
632423.68820762411940.311792375880633
642420.25043105713083.74956894286921
651917.84969878598431.15030121401567
663127.89697550863683.10302449136319
672227.1207369204232-5.1207369204232
682720.73531525304156.26468474695845
691917.23556756096021.76443243903984
702522.29011424697092.70988575302905
712024.8228294406094-4.82282944060944
722121.3379147072532-0.337914707253221
732727.3806373577635-0.380637357763491
742324.8875313004724-1.88753130047238
752525.9236847186639-0.923684718663894
762022.3048028084823-2.30480280848232
772222.7351814508955-0.735181450895488
782323.5812170311852-0.581217031185181
792524.20338498864210.79661501135793
802523.48883642366101.51116357633895
811723.6354773260822-6.63547732608216
821920.5550771129832-1.55507711298315
832524.23705304525670.762946954743252
841922.7681782856785-3.76817828567853
852021.9299036998312-1.92990369983115
862622.63334127880563.36665872119444
872321.22101933937251.77898066062755
882724.48335679319152.51664320680848
891720.1864517806465-3.18645178064651
901722.4294326278752-5.42943262787521
911920.034027614319-1.03402761431901
921719.5611321529523-2.56113215295232
932222.5712761469369-0.57127614693691
942124.1196806843661-3.11968068436606
953228.99334525618643.00665474381355
962123.8908065855408-2.8908065855408
972124.7417584656952-3.74175846569519
981820.6605156643364-2.66051566433641
991821.5563365981081-3.55633659810815
1002323.1025501030034-0.102550103003389
1011920.0832639962876-1.08326399628756
1022021.8295927359971-1.82959273599708
1032122.6142313584396-1.61423135843962
1042024.2332682879392-4.23326828793917
1051719.2372963735279-2.23729637352785
1061820.3155783697159-2.31557836971592
1071920.9172996003486-1.91729960034863
1082222.4071052135827-0.407105213582672
1091517.4804792532474-2.48047925324740
1101419.2545777542679-5.25457775426786
1111826.5470290665061-8.54702906650608
1122421.75793400543082.24206599456924
1133523.991131907947311.0088680920527
1142918.883085011027310.1169149889727
1152122.3522465116134-1.35224651161343
1162521.22534675749493.77465324250507
1172017.90785365130862.09214634869144
1182222.1464009951858-0.146400995185805
1191315.6547467676035-2.65474676760355
1202622.83719972719153.16280027280852
1211717.5001681270367-0.500168127036697
1222520.48704542767164.51295457232843
1232020.3710266060241-0.371026606024124
1241917.62799706121741.37200293878259
1252121.1205809989196-0.120580998919554
1262221.22329673224720.77670326775282
1272422.66000764694831.3399923530517
1282123.211232304497-2.21123230449700
1292625.21224200879950.787757991200534
1302420.77056086541283.22943913458719
1311620.5381252902889-4.53812529028889
1322322.40745442410270.592545575897344
1331820.8620827426893-2.86208274268930
1341622.0487509097304-6.04875090973041
1352621.92349370794994.0765062920501
1361919.5746801581445-0.574680158144459
1372117.48608106518823.51391893481176
1382122.1858994096046-1.18589940960459
1392218.67641485437513.32358514562488
1402319.64061854866653.35938145133349
1412924.92513184570984.0748681542902
1422120.33238844104740.667611558952556
1432120.01883371567830.98116628432175
1442322.47915276999750.520847230002501
1452723.09334663301993.90665336698006
1462525.665739034365-0.665739034365009
1472121.1025899837641-0.102589983764136
1481017.5450137047189-7.5450137047189
1492022.7748382661863-2.77483826618630
1502622.40242636314513.59757363685486
1512424.1709732057960-0.170973205796031
1522932.039524903068-3.03952490306797
1531919.637559433908-0.637559433907981
1542422.86785351639861.13214648360138
1551921.1918508495598-2.19185084955978
1562423.20285995410020.797140045899833
1572222.2332378774937-0.233237877493685
1581724.1770748831824-7.17707488318235


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9730889496670260.05382210066594760.0269110503329738
160.944555598137140.1108888037257210.0554444018628604
170.9021565840367180.1956868319265630.0978434159632816
180.841044719665430.317910560669140.15895528033457
190.8306284827350250.338743034529950.169371517264975
200.8180976776115220.3638046447769560.181902322388478
210.8019270213815030.3961459572369940.198072978618497
220.7667979232992430.4664041534015140.233202076700757
230.7212796054245180.5574407891509640.278720394575482
240.6855257492846920.6289485014306160.314474250715308
250.6774377513288140.6451244973423730.322562248671186
260.6012629974251550.797474005149690.398737002574845
270.5248838789732610.9502322420534780.475116121026739
280.4671654255944420.9343308511888830.532834574405558
290.4307495367947060.8614990735894120.569250463205294
300.3664308833940890.7328617667881770.633569116605911
310.3440309055805670.6880618111611330.655969094419433
320.357731091490870.715462182981740.64226890850913
330.4453851995520440.8907703991040890.554614800447956
340.5905632947991480.8188734104017050.409436705200852
350.551548700890860.896902598218280.44845129910914
360.6038753672319650.792249265536070.396124632768035
370.6470586627964570.7058826744070850.352941337203543
380.6116747965385190.7766504069229630.388325203461481
390.557712134980350.88457573003930.44228786501965
400.6732815167082290.6534369665835430.326718483291771
410.6181096227947570.7637807544104860.381890377205243
420.5642190718962270.8715618562075470.435780928103774
430.569156739699550.86168652060090.43084326030045
440.5276243849806330.9447512300387340.472375615019367
450.5597110079523470.8805779840953070.440288992047653
460.5036194580470920.9927610839058160.496380541952908
470.5117783230509710.9764433538980580.488221676949029
480.6150395776425980.7699208447148030.384960422357402
490.5650595159466040.8698809681067930.434940484053396
500.5332384392747670.9335231214504660.466761560725233
510.5261261995045650.947747600990870.473873800495435
520.4761149006947790.9522298013895590.523885099305221
530.5120943269821010.9758113460357990.487905673017899
540.470287002623560.940574005247120.52971299737644
550.6352549012330330.7294901975339340.364745098766967
560.5923816153738180.8152367692523640.407618384626182
570.5521672826797870.8956654346404260.447832717320213
580.535377333459950.9292453330801010.464622666540050
590.4872650149564290.9745300299128590.51273498504357
600.450441940013580.900883880027160.54955805998642
610.4117449701420450.823489940284090.588255029857955
620.3750696605161520.7501393210323040.624930339483848
630.3298530504945620.6597061009891240.670146949505438
640.3380696470408740.6761392940817480.661930352959126
650.2964143757505110.5928287515010230.703585624249489
660.3356043667282790.6712087334565580.664395633271721
670.3952814330774660.7905628661549330.604718566922534
680.5069506364853580.9860987270292840.493049363514642
690.4591955439566860.9183910879133720.540804456043314
700.4430382817906750.886076563581350.556961718209325
710.5157592910706740.9684814178586520.484240708929326
720.4673026536418810.9346053072837630.532697346358118
730.4224406304302150.8448812608604310.577559369569784
740.3887773372825680.7775546745651370.611222662717432
750.3539229077074240.7078458154148480.646077092292576
760.3284086195010940.6568172390021880.671591380498906
770.286756673546550.57351334709310.71324332645345
780.2512740966946710.5025481933893420.748725903305329
790.2159955664582010.4319911329164020.784004433541799
800.1899091057345870.3798182114691730.810090894265413
810.2987429631111950.597485926222390.701257036888805
820.2695848949776880.5391697899553750.730415105022312
830.2326671433366340.4653342866732690.767332856663366
840.2298240275202880.4596480550405760.770175972479712
850.2043879178614250.4087758357228490.795612082138575
860.2038207249259770.4076414498519550.796179275074023
870.1802764521379650.360552904275930.819723547862035
880.1668793610238550.3337587220477110.833120638976145
890.1603507096622450.3207014193244890.839649290337755
900.1943642080847270.3887284161694530.805635791915273
910.1649435187349980.3298870374699960.835056481265002
920.1470686047500520.2941372095001040.852931395249948
930.1231139931443720.2462279862887440.876886006855628
940.1131835387822210.2263670775644420.88681646121778
950.110495322710110.220990645420220.88950467728989
960.1009112340762970.2018224681525950.899088765923703
970.1018172100789110.2036344201578230.898182789921088
980.09026333878727560.1805266775745510.909736661212724
990.08857094773278930.1771418954655790.91142905226721
1000.06986743507527040.1397348701505410.93013256492473
1010.05524286804603080.1104857360920620.94475713195397
1020.04412077708468390.08824155416936780.955879222915316
1030.03481224204320400.06962448408640790.965187757956796
1040.0397822103796650.079564420759330.960217789620335
1050.03275430722880380.06550861445760770.967245692771196
1060.02907449493336680.05814898986673350.970925505066633
1070.02572654037749910.05145308075499820.9742734596225
1080.01887722796610530.03775445593221060.981122772033895
1090.01578866762403310.03157733524806610.984211332375967
1100.02187580589866370.04375161179732740.978124194101336
1110.1129681748750580.2259363497501170.887031825124942
1120.1101986593313250.2203973186626500.889801340668675
1130.4701347464560660.9402694929121320.529865253543934
1140.7974265726792040.4051468546415920.202573427320796
1150.7563583706893610.4872832586212780.243641629310639
1160.818215253307090.3635694933858190.181784746692910
1170.827109845294550.3457803094108990.172890154705449
1180.7917776109556960.4164447780886070.208222389044304
1190.7715715896362540.4568568207274920.228428410363746
1200.7423845959114090.5152308081771820.257615404088591
1210.6882764116219660.6234471767560670.311723588378034
1220.7091526702395520.5816946595208960.290847329760448
1230.65365408895570.6926918220885990.346345911044299
1240.6911642830183350.6176714339633290.308835716981665
1250.6413327096228850.717334580754230.358667290377115
1260.5951400311827430.8097199376345130.404859968817257
1270.5388837802984920.9222324394030150.461116219701508
1280.4744049933633250.948809986726650.525595006636675
1290.4126592419605650.825318483921130.587340758039435
1300.3922562839995520.7845125679991030.607743716000448
1310.398717392098240.797434784196480.60128260790176
1320.324834413604260.649668827208520.67516558639574
1330.2942806326520420.5885612653040830.705719367347958
1340.2464054040825500.4928108081650990.75359459591745
1350.1926114009763260.3852228019526520.807388599023674
1360.1415378933951740.2830757867903470.858462106604826
1370.1335201159186770.2670402318373540.866479884081323
1380.0888503826764020.1777007653528040.911149617323598
1390.06487164837089020.1297432967417800.93512835162911
1400.04580751869035160.09161503738070310.954192481309648
1410.05115131213911020.1023026242782200.94884868786089
1420.08612638574120650.1722527714824130.913873614258793
1430.04245464956384460.08490929912768930.957545350436155


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level30.0232558139534884OK
10% type I error level120.0930232558139535OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290766854ku88gxiwe9giqig/10pm0e1290766840.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290766854ku88gxiwe9giqig/10pm0e1290766840.ps (open in new window)


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


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


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/26/t1290766854ku88gxiwe9giqig/9pm0e1290766840.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/26/t1290766854ku88gxiwe9giqig/9pm0e1290766840.ps (open in new window)


 
Parameters (Session):
par1 = 10 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 10 ; 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