Home » date » 2010 » Nov » 23 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 12:35:22 +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/23/t1290515683ae3gbs0fr3y3kdv.htm/, Retrieved Tue, 23 Nov 2010 13:34:53 +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/23/t1290515683ae3gbs0fr3y3kdv.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 «
22.5 20 12 0 0 1 3 0 2 2 3 0 3 0 4 4.8 0 0 0.9 12 0 0 4 5 6 0 0 22.5 28 18 0 3 6 12 0 2 6 0 7 30 2 6 24 0 1 1 0 0 3 0 0 22.4 0 9 4 0 0 1.6 2 1 12 0 1 24 2 20 0 8 9 0 0 6 22.5 0 11 18 17 18 2.2 0 3 33 0 5 2.5 3 10 4 0 2 75 6 7 1.2 0 0 18 0 8 1.6 0 5 4 0 9 3 0 4 2 0 0 16.8 7 0 90 5 1 19.2 4 0 6 2 6 4.2 15 9 2 0 5 42.5 15 38 7.5 0 10 0 0 3 3.9 0 8 4 8 28 30 2 20 0 0 0 8 0 10 15 3 8 4 0 10 0 2 8 6 4 8 4.4 0 8 20 6 6 0 7 32 0 0 3 0 0 15 0 1 12 0 0 5 0 4 8 0 8 14 7 0 2 6 4 19 18 8 22 9 0 9 18 1 24 15 0 18 4.5 1 1 12 10 0 0 0 0 32 0 20 5 0 19 0 0 20 0 0 1 3 0 0 15 0 57 15 2 28 42 0 0 18 12 6 24 8 20 18 12 4 30 1 0 0 15 4 6 3 10 4.5 0 6 0 0 1 21 0 13 3.6 0 3 1.2 0 5 0 0 3 24 0 0 19.2 0 4 22.5 0 5 0 0 0 10.4 0 46 6 0 0 28 4 24 2.5 0 0 20 0 0 32 9 53 6 0 38 0 0 0 8 10 5 18 0 7 9 0 5 2 4 1 20 30 16 0 0 1 26 7 31 0 0 4 0 0 0 0 0 1 0 0 0 12 2 9 12 25 30 32 0 4 6 2 8 0 0 11 0 0 16 4 0 0 12.6 11 1 25.5 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'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Sport[t] = + 8.93855171769656 + 0.417448994564574Event[t] + 0.134345700937438`Tv `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.938551717696561.4218076.286800
Event0.4174489945645740.2021482.06510.0405610.020281
`Tv `0.1343457009374380.1017921.31980.188820.09441


Multiple Linear Regression - Regression Statistics
Multiple R0.22521342086788
R-squared0.0507210849390127
Adjusted R-squared0.0386283599063887
F-TEST (value)4.19434699806505
F-TEST (DF numerator)2
F-TEST (DF denominator)157
p-value0.0168041294646729
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.6370072181489
Sum Squared Residuals29196.9706412519


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.518.89968002023733.60031997976274
209.072897418634-9.072897418634
339.20724311957143-6.20724311957143
4210.1908987013903-8.19089870139028
539.4759345214463-6.47593452144631
64.88.93855171769656-4.13855171769656
70.913.9479396524714-13.0479396524714
8011.280076200642-11.280076200642
968.93855171769656-2.93855171769656
1022.523.0453461823785-0.545346182378491
11010.9969729070149-10.9969729070149
12129.207243119571432.79275688042857
1369.87897162425862-3.87897162425862
143010.579523912450319.4204760875497
15249.07289741863414.927102581366
1618.93855171769656-7.93855171769656
1738.93855171769656-5.93855171769656
1822.410.147663026133512.2523369738665
1948.93855171769656-4.93855171769656
201.69.90779540776314-8.30779540776314
21129.0728974186342.92710258136601
222412.460363725574511.5396362744255
23013.4872549826501-13.4872549826501
2409.74462592332118-9.74462592332118
2522.510.416354428008412.0836455719916
261818.4534072421682-0.453407242168186
272.29.34158882050887-7.14158882050887
28339.6102802223837423.3897197776163
292.511.5343557107647-9.03435571076466
3049.20724311957143-5.20724311957143
317512.383665591646162.616334408354
321.28.93855171769656-7.73855171769656
331810.01331732519617.98668267480394
341.69.61028022238374-8.01028022238375
35410.1476630261335-6.1476630261335
3639.4759345214463-6.47593452144631
3728.93855171769656-6.93855171769656
3816.811.86069467964864.93930532035143
399011.160142391456978.8398576085431
4019.210.60834769595488.59165230404515
41610.5795239124503-4.57952391245033
424.216.4093979446021-12.2093979446021
4329.61028022238375-7.61028022238375
4442.520.305423271787822.1945767282122
457.510.2820087270709-2.78200872707093
4609.34158882050887-9.34158882050887
473.910.0133173251961-6.11331732519606
48416.0398233004614-12.0398233004614
493012.460363725574517.5396362744255
5008.93855171769656-8.93855171769656
51810.2820087270709-2.28200872707093
521511.26566430888983.73433569111022
53410.2820087270709-6.28200872707094
54010.8482153143252-10.8482153143252
55611.6831133034544-5.68311330345435
564.410.0133173251961-5.61331732519606
572012.24931989070867.75068010929138
58016.1597571096466-16.1597571096466
5909.34158882050887-9.34158882050887
60010.9537372317581-10.9537372317581
61010.9681491235104-10.9681491235104
6209.61028022238375-9.61028022238375
63011.6831133034544-11.6831133034544
64014.1589834873373-14.1589834873373
6579.20724311957143-2.20724311957143
66613.1609160137662-7.16091601376617
671815.23374909483682.76625090516322
68910.1476630261335-1.1476630261335
691812.58029753475965.41970246524036
701511.35677433457043.64322566542956
714.59.49034641319857-4.99034641319857
721213.1130416633423-1.11304166334229
7308.93855171769656-8.93855171769656
743211.625465736445320.3745342635547
75511.4911200355079-6.49112003550788
76011.6254657364453-11.6254657364453
7709.072897418634-9.072897418634
7838.93855171769656-5.93855171769656
791516.5962566711305-1.59625667113051
801513.5351293330741.46487066692604
81428.9385517176965533.0614482823034
821814.75401385809613.24598614190394
832414.96505769296199.0349423070381
841814.48532245622123.51467754377881
85309.3560007122611420.6439992877389
86015.7376694399149-15.7376694399149
87611.5343557107647-5.53435571076465
884.59.74462592332118-5.24462592332118
8909.072897418634-9.072897418634
902110.685045829883210.3149541701168
913.69.34158882050887-5.74158882050887
921.29.61028022238375-8.41028022238375
9309.34158882050887-9.34158882050887
94248.9385517176965615.0614482823034
9519.29.47593452144639.72406547855369
9622.59.6102802223837512.8897197776163
9708.93855171769656-8.93855171769656
9810.415.1184539608187-4.7184539608187
9968.93855171769656-2.93855171769656
1002813.832644518453414.1673554815466
1012.58.93855171769656-6.43855171769656
102208.9385517176965611.0614482823034
1033219.815914818461912.1840851815381
104614.0436883533192-8.0436883533192
10508.93855171769656-8.93855171769656
106813.7847701680295-5.78477016802948
107189.878971624258628.12102837574138
10899.61028022238375-0.610280222383746
109210.7426933968923-8.74269339689229
1102023.6115527696328-3.61155276963276
11109.072897418634-9.072897418634
1122616.02541140870919.97458859129086
11309.4759345214463-9.4759345214463
11408.93855171769656-8.93855171769656
11509.072897418634-9.072897418634
11608.93855171769656-8.93855171769656
1171210.98256101526261.01743898473736
1181223.405147609934-11.405147609934
119329.475934521446322.5240654785537
120610.8482153143252-4.84821531432521
121010.4163544280084-10.4163544280084
122011.0880829326956-11.0880829326956
12348.93855171769656-4.93855171769656
12412.613.6648363588443-1.0648363588443
12525.511.371186226322714.1288137736773
1264.88.93855171769656-4.13855171769656
1274.512.1005622980189-7.60056229801893
1284.89.61028022238375-4.81028022238375
129169.893383516010886.10661648398912
130312.8155264779629-9.8155264779629
131712.9642840706526-5.96428407065259
132011.831870896144-11.831870896144
1332019.89774749380840.102252506191618
1344.89.34158882050887-4.54158882050887
13509.4759345214463-9.4759345214463
1364.810.1620749178858-5.36207491788576
13709.87897162425862-9.87897162425862
1383.29.61028022238375-6.41028022238375
13929.99.6102802223837420.2897197776163
140249.773449706825714.2265502931743
14135.212.234907998956422.9650920010436
1423010.685045829883319.3149541701167
143268.9385517176965517.0614482823034
14458.811.414421901579547.3855780984205
1451514.01022589464760.989774105352425
146149.47593452144634.52406547855369
1474.823.3953743933489-18.5953743933489
148308.9385517176965521.0614482823034
14914.48.938551717696565.46144828230344
150109.0728974186340.927102581366006
1519.610.1476630261335-0.547663026133497
152011.3567743345704-11.3567743345704
1532615.310447228765210.6895527712348
154011.6254657364453-11.6254657364453
15531.515.262572878341316.2374271216587
15608.93855171769656-8.93855171769656
157110.7426933968923-9.74269339689229
158249.475934521446314.5240654785537
1593.69.34158882050887-5.74158882050887
160311.0880829326956-8.08808293269556


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.007712581057368680.01542516211473740.992287418942631
70.004604421550472440.009208843100944870.995395578449528
80.006854391460810540.01370878292162110.99314560853919
90.004510752212201170.009021504424402340.995489247787799
100.001602474501992130.003204949003984250.998397525498008
110.001128261637292110.002256523274584210.998871738362708
120.001968605537605660.003937211075211320.998031394462394
130.0006941224196586470.001388244839317290.999305877580341
140.02584429543855630.05168859087711260.974155704561444
150.07168964436295610.1433792887259120.928310355637044
160.04695320941819390.09390641883638770.953046790581806
170.02868198647477010.05736397294954010.97131801352523
180.02098937958698410.04197875917396820.979010620413016
190.01221429005822690.02442858011645390.987785709941773
200.00738600348608020.01477200697216040.99261399651392
210.005047954332600830.01009590866520170.9949520456674
220.003247569611056560.006495139222113110.996752430388943
230.004781472247570640.00956294449514130.99521852775243
240.00454660509231040.00909321018462080.99545339490769
250.003327043219235090.006654086438470180.996672956780765
260.002004467748942380.004008935497884760.997995532251058
270.001279624139838810.002559248279677620.99872037586016
280.00765729889017660.01531459778035320.992342701109823
290.008151590954086250.01630318190817250.991848409045914
300.005262158714790540.01052431742958110.99473784128521
310.8100369586812490.3799260826375020.189963041318751
320.7751263235723070.4497473528553860.224873676427693
330.7352835834739430.5294328330521140.264716416526057
340.7087227731399610.5825544537200780.291277226860039
350.68536716545640.6292656690872010.3146328345436
360.645633607382840.7087327852343210.354366392617161
370.5986523311391940.8026953377216130.401347668860806
380.5714576023791660.8570847952416680.428542397620834
390.9999762285677954.75428644107706e-052.37714322053853e-05
400.9999663336376626.73327246768317e-053.36663623384158e-05
410.9999475769486870.0001048461026267385.24230513133688e-05
420.9999431823177560.0001136353644887325.68176822443661e-05
430.9999203806511720.0001592386976552827.9619348827641e-05
440.9999394452355780.0001211095288450296.05547644225144e-05
450.9999067608554830.0001864782890343649.32391445171821e-05
460.9998785592800350.0002428814399309810.00012144071996549
470.9998286805968620.0003426388062766120.000171319403138306
480.9998480258978210.0003039482043578330.000151974102178916
490.9998651070647040.0002697858705911510.000134892935295576
500.999819942580980.0003601148380392190.000180057419019609
510.9997251408368670.0005497183262656630.000274859163132831
520.9995859630855470.0008280738289053280.000414036914452664
530.9994342604659870.001131479068025080.000565739534012538
540.9993462906258070.00130741874838680.000653709374193398
550.9990915263459160.001816947308168780.000908473654084388
560.9987472849231930.002505430153613460.00125271507680673
570.9983668968958410.003266206208317170.00163310310415859
580.9987268292004930.002546341599014050.00127317079950702
590.998424301413880.003151397172238850.00157569858611942
600.9981851041758640.003629791648271820.00181489582413591
610.9979084568134740.004183086373052380.00209154318652619
620.9974675292438410.005064941512317270.00253247075615864
630.997196612369140.005606775261719570.00280338763085978
640.9972602211952280.005479557609543290.00273977880477164
650.9961567832656140.007686433468771270.00384321673438563
660.9950542099592810.009891580081437270.00494579004071864
670.9932384088049410.01352318239011770.00676159119505885
680.9907701022959170.0184597954081660.00922989770408298
690.9881528431193760.02369431376124810.0118471568806241
700.9844732997117150.03105340057656950.0155267002882848
710.9801697641432440.0396604717135130.0198302358567565
720.974022735048240.05195452990351820.0259772649517591
730.969848685319760.06030262936048180.0301513146802409
740.9779341662573940.04413166748521250.0220658337426063
750.9730107907969720.05397841840605540.0269892092030277
760.9712970923804030.05740581523919340.0287029076195967
770.9670377955342680.0659244089314630.0329622044657315
780.959852880571160.08029423885768050.0401471194288403
790.9492064543750760.1015870912498470.0507935456249237
800.9361595416515670.1276809166968660.0638404583484329
810.9814969435615520.03700611287689620.0185030564384481
820.9760484538323480.04790309233530390.0239515461676519
830.9722325156542030.05553496869159310.0277674843457965
840.9648164796760690.0703670406478620.035183520323931
850.9752205058306360.04955898833872730.0247794941693637
860.9771736991793140.0456526016413720.022826300820686
870.9714593842733170.05708123145336630.0285406157266831
880.96452396975260.07095206049479950.0354760302473997
890.9595875442788220.0808249114423550.0404124557211775
900.95489648517720.0902070296456020.045103514822801
910.9453475674431420.1093048651137160.0546524325568582
920.9375455545060280.1249088909879450.0624544454939723
930.9306017068534640.1387965862930720.0693982931465362
940.9334496099541720.1331007800916570.0665503900458284
950.9252313328431260.1495373343137480.0747686671568738
960.9231564148129430.1536871703741140.0768435851870568
970.9137921359802360.1724157280395280.086207864019764
980.8965683880912720.2068632238174570.103431611908728
990.8750018068225580.2499963863548830.124998193177442
1000.8770379648029740.2459240703940520.122962035197026
1010.8581089687724670.2837820624550660.141891031227533
1020.8475778575435280.3048442849129440.152422142456472
1030.8500498871223180.2999002257553640.149950112877682
1040.8279734245156490.3440531509687020.172026575484351
1050.812555068221520.3748898635569610.187444931778481
1060.7845236886927080.4309526226145840.215476311307292
1070.759369421437220.4812611571255590.24063057856278
1080.719525677581420.560948644837160.28047432241858
1090.6975591103451570.6048817793096860.302440889654843
1100.6553418657616020.6893162684767960.344658134238398
1110.6347806201664710.7304387596670590.365219379833529
1120.624775688256150.75044862348770.37522431174385
1130.6052573327746830.7894853344506340.394742667225317
1140.5869116329098730.8261767341802530.413088367090127
1150.570131536305350.85973692738930.42986846369465
1160.5555940766806210.8888118466387580.444405923319379
1170.5038739882187920.9922520235624160.496126011781208
1180.4723747568579710.9447495137159420.527625243142029
1190.542756916280810.914486167438380.45724308371919
1200.4990194665926670.9980389331853340.500980533407333
1210.4803994701453060.9607989402906120.519600529854694
1220.4638109164449170.9276218328898330.536189083555084
1230.4277705931911030.8555411863822060.572229406808897
1240.3778159614723820.7556319229447650.622184038527618
1250.3756756231719590.7513512463439170.624324376828042
1260.3380751668761640.6761503337523280.661924833123836
1270.310282917601240.6205658352024790.68971708239876
1280.2753611014453320.5507222028906650.724638898554668
1290.2322516333715650.4645032667431290.767748366628435
1300.2263921552949850.4527843105899710.773607844705015
1310.2097069647964610.4194139295929230.790293035203539
1320.2229624188840220.4459248377680440.777037581115978
1330.2708028156320730.5416056312641460.729197184367927
1340.2411776386139790.4823552772279580.75882236138602
1350.2398426529367420.4796853058734830.760157347063258
1360.2190093563995720.4380187127991430.780990643600428
1370.2165133601235590.4330267202471190.78348663987644
1380.2045015310896310.4090030621792620.795498468910369
1390.2126548176843850.425309635368770.787345182315615
1400.1736919526913130.3473839053826260.826308047308687
1410.1770935852514960.3541871705029910.822906414748504
1420.2203908213081240.4407816426162480.779609178691876
1430.1987243491797070.3974486983594140.801275650820293
1440.8048164656735440.3903670686529110.195183534326456
1450.7375276908389910.5249446183220190.262472309161009
1460.6616438538834490.6767122922331020.338356146116551
1470.7209019728503260.5581960542993480.279098027149674
1480.8813930992134450.2372138015731110.118606900786555
1490.8584826586100530.2830346827798930.141517341389947
1500.8029185774714220.3941628450571560.197081422528578
1510.719464516728750.5610709665425010.28053548327125
1520.639177028685350.7216459426293010.360822971314651
1530.5313426528988410.9373146942023170.468657347101159
1540.4221102530175680.8442205060351360.577889746982432


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level400.268456375838926NOK
5% type I error level590.395973154362416NOK
10% type I error level740.496644295302013NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/1095u11290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/1095u11290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/1kmxp1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/1kmxp1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/2vvwa1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/2vvwa1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/3vvwa1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/3vvwa1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/4vvwa1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/4vvwa1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/5n4vd1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/5n4vd1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/6n4vd1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/6n4vd1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/73zkn1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/73zkn1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/83zkn1290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/83zkn1290515710.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/995u11290515710.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290515683ae3gbs0fr3y3kdv/995u11290515710.ps (open in new window)


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