Home » date » 2010 » Dec » 01 »

*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: Wed, 01 Dec 2010 21:14:12 +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/01/t1291238073mnx5ywq7leejjnv.htm/, Retrieved Wed, 01 Dec 2010 22:14:33 +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/01/t1291238073mnx5ywq7leejjnv.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 «
2502,66 10169,02 10433,44 24977 -7,9 -15 2,85 0,3 2466,92 9633,83 10238,83 24320 -8,8 -10 2,98 -0,1 2513,17 10066,24 9857,34 22680 -14,2 -12 3,06 -1 2443,27 10302,87 9634,97 22052 -17,8 -11 3,08 -1,2 2293,41 10430,35 9374,63 21467 -18,2 -11 3,3 -0,8 2070,83 9691,12 8679,75 21383 -22,8 -17 3,47 -1,7 2029,6 9810,31 8593 21777 -23,6 -18 3,72 -1,1 2052,02 9304,43 8398,37 21928 -27,6 -19 3,67 -0,4 1864,44 8767,96 7992,12 21814 -29,4 -22 3,82 0,6 1670,07 7764,58 7235,47 22937 -31,8 -24 3,85 0,6 1810,99 7694,78 7690,5 23595 -31,4 -24 3,9 1,9 1905,41 8331,49 8396,2 20830 -27,6 -20 3,99 2,3 1862,83 8460,94 8595,56 19650 -28,8 -25 4,35 2,6 2014,45 8531,45 8614,55 19195 -21,9 -22 4,98 3,1 2197,82 9117,03 9181,73 19644 -13,9 -17 5,46 4,7 2962,34 12123,53 11114,08 18483 -8 -9 5,19 5,5 3047,03 12989,35 11530,75 18079 -2,8 -11 5,03 5,4 3032,6 13168,91 11322,38 19178 -3,3 -13 5,38 5,9 3504,37 14084,6 12056,67 18391 -1,3 -11 5,37 5,8 3801,06 13995,33 12812,48 18441 0,5 -9 4,87 5,2 3857,62 13357,7 12656,63 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1550.70804561538 + 0.086528028444836Nikkei[t] + 0.376273521438822DJ_Indust[t] + 0.0122770847008117Goudprijs[t] -7.74003093034112Conjunct_Seizoenzuiver[t] + 6.90342219860368Cons_vertrouw[t] -184.570093209091Rend_oblig_EUR[t] + 33.8362739714698Alg_consumptie_index_BE[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1550.70804561538354.791303-4.37082.6e-051.3e-05
Nikkei0.0865280284448360.0153815.625800
DJ_Indust0.3762735214388220.03608910.426300
Goudprijs0.01227708470081170.0080211.53060.1284120.064206
Conjunct_Seizoenzuiver-7.740030930341127.007133-1.10460.2714750.135737
Cons_vertrouw6.903422198603686.3084251.09430.2759370.137968
Rend_oblig_EUR-184.57009320909145.948764-4.01690.0001025.1e-05
Alg_consumptie_index_BE33.836273971469825.2096691.34220.1819850.090993


Multiple Linear Regression - Regression Statistics
Multiple R0.935715907429102
R-squared0.875564259415868
Adjusted R-squared0.868539661157086
F-TEST (value)124.642609749433
F-TEST (DF numerator)7
F-TEST (DF denominator)124
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation273.003433972532
Sum Squared Residuals9241828.49513854


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12502.663003.39018820974-500.730188209737
22466.922879.74313513525-412.823135135255
32513.172736.25078390764-223.080783907643
42443.272689.65283601344-246.38283601344
52293.412571.56738741295-278.157387412954
62070.832177.46109992148-106.631099921481
72029.62133.4176626454-103.817662645401
82052.022075.23518589116-23.2151858911566
91864.441873.92733779985-9.48733779985038
101670.071515.41877778054154.651222219463
111810.991720.3358227188590.654177281152
121905.412002.14394105048-96.7339410504801
131862.831992.34849837931-129.518498379309
142014.451867.95198173867146.498018261327
152197.822075.68954872001122.130451279987
162962.343135.13864949752-172.798649497525
173047.033333.97087532574-286.940875325745
183032.63226.9780259678-194.378025967801
193504.373569.63155080370-65.2615508036956
203801.063918.7704091224-117.710409122398
213857.623836.6344976451920.9855023548056
223674.43675.48129357721-1.08129357721300
233720.983823.44484027478-102.464840274783
243844.493817.6516257311526.8383742688539
254116.684246.37385899595-129.693858995949
264105.184161.22899196693-56.0489919669306
274435.234550.55943371415-115.329433714150
284296.494312.55711359523-16.0671135952274
294202.524181.7641007310520.7558992689486
304562.844445.29523233311117.544767666889
314621.44378.61759990765242.782400092345
324696.964388.3867539917308.573246008302
334591.274181.19208965739410.07791034261
344356.984002.64630174071354.333698259293
354502.644186.08222141898316.557778581017
364443.914069.09529081717374.814709182827
374290.893951.45637314425339.433626855753
384199.753907.72610903661292.023890963386
394138.523831.94423271205306.575767287955
403970.13614.37185126701355.728148732991
413862.273499.17669542812363.09330457188
423701.613333.91184077139367.698159228613
433570.123326.89435050467243.22564949533
443801.063600.00479694653201.055203053465
453895.513643.44755091068252.062449089318
463917.963559.20292010767358.75707989233
473813.063576.90500054989236.154999450110
483667.033585.0885693786381.9414306213735
493494.173511.36968520873-17.1996852087344
503363.993304.5703937821859.4196062178174
513295.323137.93699284063157.383007159373
523277.013212.0046581839965.0053418160117
533257.163176.6712391081380.4887608918678
543161.693133.0795768006228.6104231993798
553097.313077.2348517998620.0751482001423
563061.262957.44747462901103.81252537099
573119.312960.1802453105159.129754689498
583106.223118.00868030601-11.7886803060106
593080.583101.58732999367-21.0073299936699
602981.852973.716203341558.13379665844577
612921.443000.09538834788-78.6553883478807
622849.272851.77768219881-2.50768219881385
632756.762677.9744779097778.7855220902298
642645.642729.07123671718-83.4312367171805
652497.842685.23746190292-187.397461902915
662448.052698.42945212243-250.379452122428
672454.622818.76176459596-364.141764595956
682407.62655.19741010511-247.597410105109
692472.812893.4737399117-420.663739911701
702408.642839.65898710560-431.018987105596
712440.252875.44491496144-435.194914961435
722350.442894.43310420071-543.99310420071
732196.722627.35878391799-430.638783917994
742174.562480.03363689223-305.473636892232
752120.882461.43759981296-340.557599812959
762093.482485.35659070359-391.876590703587
772061.412312.17252449898-250.762524498983
781969.62295.00770267096-325.407702670958
791959.672295.10063205556-335.430632055561
801910.431968.62283911142-58.1928391114226
811833.421785.7929849277847.6270150722225
821635.251670.36705771811-35.1170577181129
831765.91720.2581748331345.6418251668717
841946.811891.2976385222355.5123614777717
851995.371859.64897370778135.721026292218
8620421879.97266766233162.027332337666
871940.491670.36917534796270.120824652043
882065.811756.03466110150309.775338898505
892214.951932.83801757163282.111982428373
902304.981917.64454304317387.33545695683
912555.282264.37000383401290.90999616599
922799.432536.57533329262.854666710002
932811.72563.27152205295248.42847794705
942735.72734.357257248991.34274275100743
952745.882439.41233038517306.467669614827
962720.252491.83154128404228.418458715962
972638.532493.58463544675144.945364553250
982659.812390.83514693340268.974853066597
992641.652209.88724011270431.762759887296
1002604.422112.56021057837491.859789421631
1012892.632713.33566559789179.294334402113
1022915.022798.44071145629116.57928854371
1032845.262989.69016603734-144.430166037342
1042794.832969.44689232447-174.616892324469
1052848.962794.0147592329954.945240767011
1062833.182635.65397809555197.52602190445
1072995.552925.2013386587170.3486613412945
1082987.12940.7935001400446.3064998599592
1093013.242985.7199746377727.5200253622277
1103110.522975.45863018740135.061369812605
1113045.782947.752689525998.0273104741005
1123032.933185.88454968944-152.954549689442
1133142.953245.81074999731-102.860749997309
1143012.613142.74270665803-130.132706658026
1152897.063131.9064255591-234.846425559103
1162863.363095.80195009596-232.441950095957
1172882.63489.99777924289-607.397779242891
1182767.633327.2355623782-559.605562378198
1192803.473304.09320449827-500.623204498266
1203030.293529.97354726504-499.683547265035
1213210.523518.52154362114-308.001543621135
1223249.573376.43400347089-126.864003470894
1232999.933084.13682615803-84.2068261580265
1243181.963240.37038639344-58.4103863934407
1253053.053331.50119020751-278.451190207512
1263092.713477.93225110056-385.222251100558
1273165.263298.09356676188-132.833566761878
1283173.953428.73693195226-254.78693195226
1293280.373316.86255514234-36.492555142343
1303288.182974.31084614725313.869153852753
1313411.132710.07675021468701.053249785323
1323484.742701.25075600359783.489243996414


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.008379254854371990.01675850970874400.991620745145628
120.001382647560084010.002765295120168030.998617352439916
130.0002187696133894390.0004375392267788780.99978123038661
140.001906939728428960.003813879456857920.998093060271571
150.0004802494402184460.0009604988804368910.999519750559782
160.0001866606770303630.0003733213540607250.99981333932297
176.16783286402733e-050.0001233566572805470.99993832167136
181.48463054721708e-052.96926109443415e-050.999985153694528
196.66048854981156e-050.0001332097709962310.999933395114502
200.0001650565146901490.0003301130293802990.99983494348531
210.0001331916191238000.0002663832382476000.999866808380876
220.0008447071091843930.001689414218368790.999155292890816
230.0004900150634978340.0009800301269956670.999509984936502
240.0006005444930999730.001201088986199950.9993994555069
250.0008477844491309850.001695568898261970.999152215550869
260.001138461969341140.002276923938682280.998861538030659
270.0007391918442368830.001478383688473770.999260808155763
280.0005264001824185050.001052800364837010.999473599817582
290.0004521842219842580.0009043684439685160.999547815778016
300.0004545585906624440.0009091171813248890.999545441409338
310.0006419552839084220.001283910567816840.999358044716092
320.001220034401468020.002440068802936050.998779965598532
330.001699074351028910.003398148702057820.998300925648971
340.001075283279302790.002150566558605570.998924716720697
350.0005903137792243340.001180627558448670.999409686220776
360.0003794918269482970.0007589836538965940.999620508173052
370.0003062834226056460.0006125668452112920.999693716577394
380.0001666238238296670.0003332476476593340.99983337617617
390.0001156171717031290.0002312343434062580.999884382828297
406.93271389727521e-050.0001386542779455040.999930672861027
414.09072253222763e-058.18144506445526e-050.999959092774678
422.50165820305362e-055.00331640610723e-050.99997498341797
432.18040145910562e-054.36080291821124e-050.999978195985409
441.56058261470398e-053.12116522940796e-050.999984394173853
451.55500980230747e-053.11001960461495e-050.999984449901977
461.48911661705728e-052.97823323411456e-050.99998510883383
471.43794770167795e-052.8758954033559e-050.999985620522983
482.030310008557e-054.060620017114e-050.999979696899914
492.15719245619662e-054.31438491239325e-050.999978428075438
501.68886148271296e-053.37772296542592e-050.999983111385173
512.27168423572026e-054.54336847144051e-050.999977283157643
522.96680674735825e-055.9336134947165e-050.999970331932526
532.64450160345815e-055.2890032069163e-050.999973554983965
542.01523541843326e-054.03047083686653e-050.999979847645816
551.78481934998145e-053.5696386999629e-050.9999821518065
561.74240651158559e-053.48481302317118e-050.999982575934884
571.6393917125737e-053.2787834251474e-050.999983606082874
581.93068248607007e-053.86136497214014e-050.99998069317514
592.04165371211879e-054.08330742423757e-050.999979583462879
602.5989725810406e-055.1979451620812e-050.99997401027419
613.44632222259375e-056.8926444451875e-050.999965536777774
626.67116041386617e-050.0001334232082773230.999933288395861
630.0001985055550692820.0003970111101385640.99980149444493
640.0004964203533695610.0009928407067391210.99950357964663
650.001231419682904640.002462839365809280.998768580317095
660.003989444613708230.007978889227416470.996010555386292
670.01110446180147970.02220892360295950.98889553819852
680.01629733659704060.03259467319408120.98370266340296
690.04884593574191720.09769187148383450.951154064258083
700.07276647203782950.1455329440756590.92723352796217
710.06992639814898270.1398527962979650.930073601851017
720.08976115197670560.1795223039534110.910238848023294
730.08417484594511680.1683496918902340.915825154054883
740.06990686230488150.1398137246097630.930093137695118
750.07482032927312580.1496406585462520.925179670726874
760.0790692658114450.158138531622890.920930734188555
770.06691841966384530.1338368393276910.933081580336155
780.08904447001142910.1780889400228580.91095552998857
790.2035355439436120.4070710878872240.796464456056388
800.3538054812752890.7076109625505780.646194518724711
810.591830729390860.816338541218280.40816927060914
820.6133685431920050.773262913615990.386631456807995
830.5819203942204780.8361592115590440.418079605779522
840.6165163618510510.7669672762978980.383483638148949
850.6605575571974280.6788848856051450.339442442802572
860.7793390737126880.4413218525746240.220660926287312
870.8899771477711730.2200457044576550.110022852228827
880.952947621875950.09410475624809940.0470523781240497
890.9864825335381530.02703493292369450.0135174664618473
900.997110635640820.005778728718358560.00288936435917928
910.997358660326760.005282679346481660.00264133967324083
920.9965354977367870.006929004526425290.00346450226321264
930.9973717925737010.005256414852597290.00262820742629864
940.9959589688744740.008082062251052530.00404103112552627
950.9958271306430530.00834573871389420.0041728693569471
960.9944283465489950.01114330690201090.00557165345100545
970.9919390388661170.01612192226776610.00806096113388304
980.9904794282615030.01904114347699370.00952057173849685
990.9887263572257860.02254728554842860.0112736427742143
1000.988567094286190.02286581142761890.0114329057138095
1010.9820605621365570.03587887572688650.0179394378634432
1020.976263305892240.04747338821552080.0237366941077604
1030.9735074673129260.05298506537414760.0264925326870738
1040.9764843832186750.04703123356265070.0235156167813254
1050.9817529585309940.03649408293801260.0182470414690063
1060.9903665747042060.01926685059158820.0096334252957941
1070.9899760439128670.02004791217426670.0100239560871333
1080.9943809095060030.01123818098799440.00561909049399721
1090.9951927089107060.00961458217858830.00480729108929415
1100.9911698625421130.01766027491577450.00883013745788727
1110.9849051084686630.03018978306267470.0150948915313373
1120.9797638102455880.0404723795088230.0202361897544115
1130.975409676261360.04918064747727940.0245903237386397
1140.9693437749480140.06131245010397290.0306562250519864
1150.9670267354969390.06594652900612280.0329732645030614
1160.9879265273090340.02414694538193160.0120734726909658
1170.9843708562893160.03125828742136810.0156291437106840
1180.990698512475190.01860297504962010.00930148752481003
1190.9983815757907760.003236848418448660.00161842420922433
1200.9930378193935620.01392436121287560.0069621806064378
1210.9736610649680140.05267787006397160.0263389350319858


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level630.567567567567568NOK
5% type I error level870.783783783783784NOK
10% type I error level930.837837837837838NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/106rmo1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/106rmo1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/1h87u1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/1h87u1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/2h87u1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/2h87u1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/3h87u1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/3h87u1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/4az7x1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/4az7x1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/5az7x1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/5az7x1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/6az7x1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/6az7x1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/77udo1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/77udo1291238041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/8i3ca1291238041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291238073mnx5ywq7leejjnv/8i3ca1291238041.ps (open in new window)


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