Home » date » 2010 » Dec » 14 »

*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, 14 Dec 2010 15:02:34 +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/Dec/14/t1292339097ygk25wh37tu6agw.htm/, Retrieved Tue, 14 Dec 2010 16:05:15 +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/Dec/14/t1292339097ygk25wh37tu6agw.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 «
5 1 4 1 5 1 6 1 6 1 6 1 7 1 8 1 7 1 8 1 7 1 8 1 8 1 9 1 9 1 8 1 9 1 9 1 10 1 11 1 12 1 13 1 13 1 13 1 14 1 14 1 15 1 15 1 16 1 16 1 17 1 18 1 19 1 20 1 22 1 20 1 22 1 25 1 24 1 25 1 28 1 26 1 27 1 26 1 25 1 27 1 28 1 30 1 31 1 32 1 34 1 34 1 33 1 32 1 34 1 36 1 37 1 40 1 38 1 38 1 36 1 40 1 40 1 42 1 44 1 45 1 47 1 49 1 47 1 49 1 52 1 50 1 50 1 57 1 58 1 58 1 58 1 61 1 61 1 64 1 68 1 40 1 34 1 46 1 36 1 34 1 45 1 55 1 50 1 56 1 72 1 76 1 78 1 77 1 90 1 88 1 97 1 93 1 84 1 67 1 72 1 75 1 71 1 75 1 90 1 78 1 73 1 62 1 65 1 61 1 58 1 33 1 39 1 56 1 79 1 82 1 79 1 73 1 87 1 85 1 83 1 82 1 83 1 92 1 95 1 97 1 87 1 84 1 84 1 89 1 103 1 106 1 109 1 106 1 105 1 115 1 120 1 124 1 121 1 131 1 139 1 133 1 119 1 123 1 120 1 128 1 134 1 126 1 115 1 106 1 99 1 100 1 99 1 99 1 100 1 100 1 108 1 109 1 115 1 114 1 108 1 113 1 118 1 122 1 118 1 121 1 118 1 121 1 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 time14 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
CO2-uitstoot[t] = + 108.750000000000 -47.4999999999996Dummy[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)108.75000000000019.5102765.57400
Dummy-47.499999999999619.735836-2.40680.017140.00857


Multiple Linear Regression - Regression Statistics
Multiple R0.179494911537252
R-squared0.0322184232677658
Adjusted R-squared0.0266564601830978
F-TEST (value)5.79263522200973
F-TEST (DF numerator)1
F-TEST (DF denominator)174
p-value0.0171398615537401
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation39.0205516141925
Sum Squared Residuals264933


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1561.2500000000013-56.2500000000013
2461.25-57.25
3561.25-56.25
4661.25-55.25
5661.25-55.25
6661.25-55.25
7761.25-54.25
8861.25-53.25
9761.25-54.25
10861.25-53.25
11761.25-54.25
12861.25-53.25
13861.25-53.25
14961.25-52.25
15961.25-52.25
16861.25-53.25
17961.25-52.25
18961.25-52.25
191061.25-51.25
201161.25-50.25
211261.25-49.25
221361.25-48.25
231361.25-48.25
241361.25-48.25
251461.25-47.25
261461.25-47.25
271561.25-46.25
281561.25-46.25
291661.25-45.25
301661.25-45.25
311761.25-44.25
321861.25-43.25
331961.25-42.25
342061.25-41.25
352261.25-39.25
362061.25-41.25
372261.25-39.25
382561.25-36.25
392461.25-37.25
402561.25-36.25
412861.25-33.25
422661.25-35.25
432761.25-34.25
442661.25-35.25
452561.25-36.25
462761.25-34.25
472861.25-33.25
483061.25-31.25
493161.25-30.25
503261.25-29.25
513461.25-27.25
523461.25-27.25
533361.25-28.25
543261.25-29.25
553461.25-27.25
563661.25-25.25
573761.25-24.25
584061.25-21.25
593861.25-23.25
603861.25-23.25
613661.25-25.25
624061.25-21.25
634061.25-21.25
644261.25-19.25
654461.25-17.25
664561.25-16.25
674761.25-14.25
684961.25-12.2500000000000
694761.25-14.25
704961.25-12.2500000000000
715261.25-9.24999999999999
725061.25-11.2500000000000
735061.25-11.2500000000000
745761.25-4.24999999999999
755861.25-3.24999999999999
765861.25-3.24999999999999
775861.25-3.24999999999999
786161.25-0.249999999999987
796161.25-0.249999999999987
806461.252.75000000000001
816861.256.75000000000001
824061.25-21.25
833461.25-27.25
844661.25-15.25
853661.25-25.25
863461.25-27.25
874561.25-16.25
885561.25-6.24999999999999
895061.25-11.2500000000000
905661.25-5.24999999999999
917261.2510.7500000000000
927661.2514.75
937861.2516.75
947761.2515.75
959061.2528.75
968861.2526.75
979761.2535.75
989361.2531.75
998461.2522.75
1006761.255.75000000000001
1017261.2510.7500000000000
1027561.2513.75
1037161.259.75000000000001
1047561.2513.75
1059061.2528.75
1067861.2516.75
1077361.2511.75
1086261.250.750000000000012
1096561.253.75000000000001
1106161.25-0.249999999999987
1115861.25-3.24999999999999
1123361.25-28.25
1133961.25-22.25
1145661.25-5.24999999999999
1157961.2517.75
1168261.2520.75
1177961.2517.75
1187361.2511.75
1198761.2525.75
1208561.2523.75
1218361.2521.75
1228261.2520.75
1238361.2521.75
1249261.2530.75
1259561.2533.75
1269761.2535.75
1278761.2525.75
1288461.2522.75
1298461.2522.75
1308961.2527.75
13110361.2541.75
13210661.2544.75
13310961.2547.75
13410661.2544.75
13510561.2543.75
13611561.2553.75
13712061.2558.75
13812461.2562.75
13912161.2559.75
14013161.2569.75
14113961.2577.75
14213361.2571.75
14311961.2557.75
14412361.2561.75
14512061.2558.75
14612861.2566.75
14713461.2572.75
14812661.2564.75
14911561.2553.75
15010661.2544.75
1519961.2537.75
15210061.2538.75
1539961.2537.75
1549961.2537.75
15510061.2538.75
15610061.2538.75
15710861.2546.75
15810961.2547.75
15911561.2553.75
16011461.2552.75
16110861.2546.75
16211361.2551.75
16311861.2556.75
16412261.2560.75
16511861.2556.75
16612161.2559.75
16711861.2556.75
16812161.2559.75
16912161.2559.75
17011261.2550.75
17111961.2557.75
17211661.2554.75
173110108.7500000000001.25000000000035
174111108.7500000000002.25000000000035
175106108.750000000000-2.74999999999965
176108108.750000000000-0.749999999999654


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
52.21515374435362e-054.43030748870724e-050.999977848462556
66.57679846073014e-071.31535969214603e-060.999999342320154
75.28665283840725e-081.05733056768145e-070.999999947133472
89.2552174220246e-091.85104348440492e-080.999999990744783
94.32125950972923e-108.64251901945846e-100.999999999567874
104.06797294499577e-118.13594588999154e-110.99999999995932
111.73165959924573e-123.46331919849146e-120.999999999998268
121.33580949459035e-132.6716189891807e-130.999999999999866
139.3254265079507e-151.86508530159014e-140.99999999999999
141.45122719679986e-152.90245439359972e-150.999999999999999
151.78968072354009e-163.57936144708018e-161
161.03623208263145e-172.07246416526291e-171
171.08900305901702e-182.17800611803405e-181
181.05451795687361e-192.10903591374723e-191
192.17132290648130e-204.34264581296260e-201
209.39846507534834e-211.87969301506967e-201
217.22398483383618e-211.44479696676724e-201
228.11307871163928e-211.62261574232786e-201
235.11921906194582e-211.02384381238916e-201
242.32749031594420e-214.65498063188839e-211
251.60008941994935e-213.20017883989869e-211
268.28786280260547e-221.65757256052109e-211
276.1790746375843e-221.23581492751686e-211
283.59970128628876e-227.19940257257751e-221
292.90520461862356e-225.81040923724712e-221
301.88762325740179e-223.77524651480358e-221
311.64790922930060e-223.29581845860119e-221
321.85259380913129e-223.70518761826258e-221
332.56696060002164e-225.13392120004328e-221
344.21000610075682e-228.42001220151364e-221
351.21628420903586e-212.43256841807172e-211
361.16692001928720e-212.33384003857440e-211
371.91949672135533e-213.83899344271067e-211
387.4382572825094e-211.48765145650188e-201
391.40429100460229e-202.80858200920457e-201
402.90870497471626e-205.81740994943252e-201
411.19776980268728e-192.39553960537456e-191
422.05419851298607e-194.10839702597213e-191
433.87921632389118e-197.75843264778237e-191
445.1294048585935e-191.0258809717187e-181
455.24576013100672e-191.04915202620134e-181
467.42006165874424e-191.48401233174885e-181
471.18038529429858e-182.36077058859716e-181
482.54537298537122e-185.09074597074245e-181
495.90258607341175e-181.18051721468235e-171
501.45678024048871e-172.91356048097742e-171
514.57837499770713e-179.15674999541427e-171
521.22160299254624e-162.44320598509247e-161
532.46369430264126e-164.92738860528251e-161
544.046766765073e-168.093533530146e-161
558.30018523542417e-161.66003704708483e-151
562.09603731219791e-154.19207462439582e-150.999999999999998
575.53340347328189e-151.10668069465638e-140.999999999999994
582.00590496250471e-144.01180992500942e-140.99999999999998
594.87868414019478e-149.75736828038955e-140.999999999999951
601.10526351011024e-132.21052702022048e-130.99999999999989
611.96566028145473e-133.93132056290947e-130.999999999999803
625.00843799090325e-131.00168759818065e-120.9999999999995
631.19512967999511e-122.39025935999021e-120.999999999998805
643.26621351701694e-126.53242703403388e-120.999999999996734
651.00384910971045e-112.0076982194209e-110.999999999989962
663.08350311643699e-116.16700623287398e-110.999999999969165
671.03281140911377e-102.06562281822753e-100.999999999896719
683.69166656072939e-107.38333312145877e-100.999999999630833
699.93017440700323e-101.98603488140065e-090.999999999006983
702.86345554774254e-095.72691109548508e-090.999999997136545
719.37493082252903e-091.87498616450581e-080.999999990625069
722.39569929837117e-084.79139859674235e-080.999999976043007
735.71408412039269e-081.14281682407854e-070.999999942859159
741.94600739194468e-073.89201478388936e-070.99999980539926
756.10386959143069e-071.22077391828614e-060.99999938961304
761.67565952450866e-063.35131904901732e-060.999998324340476
774.12247700287878e-068.24495400575757e-060.999995877522997
781.06133542880592e-052.12267085761184e-050.999989386645712
792.44746861810533e-054.89493723621066e-050.99997552531382
805.8052945137189e-050.0001161058902743780.999941947054863
810.0001454001742044470.0002908003484088950.999854599825795
820.0002142915509641920.0004285831019283850.999785708449036
830.0003667253461441240.0007334506922882480.999633274653856
840.0005613758885657550.001122751777131510.999438624111434
850.001012807665851710.002025615331703410.998987192334148
860.002038939743400690.004077879486801370.9979610602566
870.003493620416104530.006987240832209060.996506379583896
880.005852354209227870.01170470841845570.994147645790772
890.009808359383684690.01961671876736940.990191640616315
900.01614005884694160.03228011769388320.983859941153058
910.02980313319906130.05960626639812260.970196866800939
920.05310430695775850.1062086139155170.946895693042241
930.08750888705105080.1750177741021020.91249111294895
940.1292405916772410.2584811833544810.87075940832276
950.210259345875450.42051869175090.78974065412455
960.2926951011409850.5853902022819690.707304898859015
970.4122021987734950.8244043975469890.587797801226505
980.5053561383300190.9892877233399620.494643861669981
990.560932546044040.878134907911920.43906745395596
1000.6000091315536630.7999817368926740.399990868446337
1010.6361624958583860.7276750082832290.363837504141614
1020.6702171363549610.6595657272900780.329782863645039
1030.7027252617475040.5945494765049930.297274738252496
1040.7320676589217430.5358646821565130.267932341078257
1050.7689707785125570.4620584429748850.231029221487443
1060.79090631942660.4181873611468020.209093680573401
1070.812471158626230.3750576827475410.187528841373770
1080.8464929104649110.3070141790701780.153507089535089
1090.8742935791451060.2514128417097870.125706420854894
1100.9060951663755920.1878096672488160.0939048336244078
1110.9381932244059070.1236135511881860.0618067755940932
1120.9890281916925010.02194361661499780.0109718083074989
1130.9989424444505070.002115111098985660.00105755554949283
1140.9998269472379630.0003461055240742440.000173052762037122
1150.9999130409618870.0001739180762249458.69590381124727e-05
1160.9999534785609759.3042878049021e-054.65214390245105e-05
1170.9999794747401734.10505196545407e-052.05252598272704e-05
1180.9999947593374111.04813251776211e-055.24066258881055e-06
1190.9999971855552845.62888943094964e-062.81444471547482e-06
1200.9999986849060542.63018789101220e-061.31509394550610e-06
1210.999999502139069.95721879213316e-074.97860939606658e-07
1220.999999848342293.0331541980334e-071.5165770990167e-07
1230.9999999576148648.4770271149888e-084.2385135574944e-08
1240.9999999776205474.47589067030498e-082.23794533515249e-08
1250.9999999859963532.80072946716819e-081.40036473358409e-08
1260.9999999901776211.96447575885374e-089.8223787942687e-09
1270.999999997117565.76487897224073e-092.88243948612037e-09
1280.9999999995709828.58036511488627e-104.29018255744314e-10
1290.9999999999612137.75749938838031e-113.87874969419015e-11
1300.9999999999946631.06737009186413e-115.33685045932067e-12
1310.9999999999956848.63120749831982e-124.31560374915991e-12
1320.9999999999955448.91154924579267e-124.45577462289634e-12
1330.9999999999944331.11345943286651e-115.56729716433256e-12
1340.9999999999938041.23912278095893e-116.19561390479466e-12
1350.9999999999934621.30752742613853e-116.53763713069263e-12
1360.9999999999896882.06247294420310e-111.03123647210155e-11
1370.9999999999850812.98369641058637e-111.49184820529318e-11
1380.9999999999824643.50716688248063e-111.75358344124031e-11
1390.9999999999730665.38690588169696e-112.69345294084848e-11
1400.9999999999843863.12287842639898e-111.56143921319949e-11
1410.9999999999983443.31265670952792e-121.65632835476396e-12
1420.99999999999951.00151060402466e-125.00755302012328e-13
1430.9999999999989032.19380248220309e-121.09690124110155e-12
1440.9999999999982993.40269301240709e-121.70134650620354e-12
1450.9999999999963987.20502932898122e-123.60251466449061e-12
1460.9999999999973635.27389055984386e-122.63694527992193e-12
1470.9999999999996616.77757149127059e-133.38878574563529e-13
1480.9999999999997684.64010339395512e-132.32005169697756e-13
1490.9999999999992141.57273683061881e-127.86368415309403e-13
1500.999999999997415.17814238580329e-122.58907119290164e-12
1510.9999999999967926.41614922562455e-123.20807461281228e-12
1520.9999999999959118.17696536718644e-124.08848268359322e-12
1530.9999999999967736.45411703992099e-123.22705851996050e-12
1540.9999999999984093.18277663782822e-121.59138831891411e-12
1550.9999999999994791.04170206653072e-125.20851033265358e-13
1560.9999999999999647.13894103647753e-143.56947051823876e-14
1570.999999999999959.89403131971075e-144.94701565985537e-14
1580.999999999999931.4066873748133e-137.0334368740665e-14
1590.9999999999994441.11246427117080e-125.56232135585401e-13
1600.9999999999963557.29012358115776e-123.64506179057888e-12
1610.9999999999991191.76279830234039e-128.81399151170196e-13
1620.9999999999978694.2622871731719e-122.13114358658595e-12
1630.9999999999736635.26738543735646e-112.63369271867823e-11
1640.9999999998409053.18189308518936e-101.59094654259468e-10
1650.9999999979645744.07085303369621e-092.03542651684810e-09
1660.99999998384973.23006002549004e-081.61503001274502e-08
1670.9999997976201074.04759785781145e-072.02379892890573e-07
1680.9999986398928272.72021434644747e-061.36010717322374e-06
1690.9999942795105771.14409788451142e-055.72048942255708e-06
1700.9999802886013883.94227972238932e-051.97113986119466e-05
1710.999752665975550.0004946680489013180.000247334024450659


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1420.850299401197605NOK
5% type I error level1460.874251497005988NOK
10% type I error level1470.880239520958084NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/1038sw1292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/1038sw1292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/1f7d21292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/1f7d21292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/2f7d21292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/2f7d21292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/3f7d21292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/3f7d21292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/47yu51292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/47yu51292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/57yu51292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/57yu51292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/60qtq1292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/60qtq1292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/70qtq1292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/70qtq1292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/8bzbt1292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/8bzbt1292338939.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/9bzbt1292338939.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292339097ygk25wh37tu6agw/9bzbt1292338939.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