Home » date » 2010 » Dec » 12 »

Paper: Multiple Linear Regression met interactievariabelen

*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: Sun, 12 Dec 2010 15:24:47 +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/12/t1292167513gefj54mo1fzxa28.htm/, Retrieved Sun, 12 Dec 2010 16:25:23 +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/12/t1292167513gefj54mo1fzxa28.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 «
24 24 14 14 11 11 12 12 24 24 26 26 10 10 25 0 11 0 7 0 8 0 25 0 23 0 14 0 17 0 6 0 17 0 8 0 30 0 25 0 18 0 18 18 12 12 10 10 8 8 19 19 23 23 15 15 18 0 8 0 12 0 9 0 22 0 19 0 18 0 16 0 10 0 12 0 7 0 22 0 29 0 11 0 20 0 10 0 11 0 4 0 25 0 25 0 17 0 16 0 11 0 11 0 11 0 23 0 21 0 19 0 18 0 16 0 12 0 7 0 17 0 22 0 7 0 17 0 11 0 13 0 7 0 21 0 25 0 12 0 23 23 13 13 14 14 12 12 19 19 24 24 13 13 30 0 12 0 16 0 10 0 19 0 18 0 15 0 23 0 8 0 11 0 10 0 15 0 22 0 14 0 18 0 12 0 10 0 8 0 16 0 15 0 14 0 15 15 11 11 11 11 8 8 23 23 22 22 16 16 12 12 4 4 15 15 4 4 27 27 28 28 16 16 21 0 9 0 9 0 9 0 22 0 20 0 12 0 15 15 8 8 11 11 8 8 14 14 12 12 12 12 20 20 8 8 17 17 7 7 22 22 24 24 13 13 31 0 14 0 17 0 11 0 23 0 20 0 16 0 27 0 15 0 11 0 9 0 23 0 21 0 9 0 21 0 9 0 14 0 13 0 19 0 21 0 11 0 31 31 14 14 10 10 8 8 18 18 23 23 12 12 19 19 11 11 11 11 8 8 20 20 28 28 11 11 16 0 8 0 15 0 9 0 23 0 24 0 14 0 20 0 9 0 15 0 6 0 25 0 24 0 18 0 21 21 9 9 13 13 9 9 19 19 24 24 11 11 22 22 9 9 16 16 9 9 24 24 23 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 time12 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 3.02312027804749 + 0.289809759090523CM[t] -0.293633940943942CM_G[t] -0.199249052781833D[t] + 0.153536202361446D_G[t] + 0.255960697716122PE[t] -0.283226764542751PE_G[t] + 0.0132743157206869PC[t] -0.0117482321641987PC_G[t] + 0.978572091873339PS_G[t] + 0.415924298586412O[t] -0.444540756555795O_G[t] + 0.178141200721764H[t] -0.247978402414856H_G[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.023120278047492.6122321.15730.2491230.124561
CM0.2898097590905230.0634614.56671.1e-055e-06
CM_G-0.2936339409439420.106148-2.76630.0064360.003218
D-0.1992490527818330.130029-1.53230.1276940.063847
D_G0.1535362023614460.1887460.81350.4173380.208669
PE0.2559606977161220.1112222.30130.0228490.011424
PE_G-0.2832267645427510.180928-1.56540.1197440.059872
PC0.01327431572068690.1310640.10130.9194720.459736
PC_G-0.01174823216419870.229855-0.05110.9593090.479655
PS_G0.9785720918733390.1137938.599600
O0.4159242985864120.0721565.764200
O_G-0.4445407565557950.139406-3.18880.0017630.000881
H0.1781412007217640.1258451.41560.1591240.079562
H_G-0.2479784024148560.172404-1.43840.1525640.076282


Multiple Linear Regression - Regression Statistics
Multiple R0.776966426907153
R-squared0.603676828540868
Adjusted R-squared0.566875391191092
F-TEST (value)16.4036209456513
F-TEST (DF numerator)13
F-TEST (DF denominator)140
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.80575699262366
Sum Squared Residuals1102.11812223192


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.0530765560902-0.0530765560901563
22522.03477976208092.96522023791906
33024.81656733048715.18343266951292
41919.0324119867282-0.0324119867281819
52220.94580401963551.05419598036454
62222.8533923452611-0.85339234526115
72523.121997746731.87800225327001
82320.54901507472882.45098492527124
91718.6134826537593-1.61348265375926
102121.7143577556621-0.714357755662085
111918.97567623937690.0243237606230659
121923.7132941234279-4.71329412342788
131522.6873745259648-7.68737452596483
141617.2473501001225-1.24735010012250
152322.93539893965180.0646010603481655
162726.89428245629940.105717543700623
172220.19517924523271.80482075476734
181414.8309020505191-0.830902050519145
192222.0620006943968-0.0620006943968054
202324.8838305882861-1.88383058828613
212321.13196557493821.86803442506183
221921.7658630945607-2.76586309456067
231818.1222114349989-0.122211434998897
242020.1618731972673-0.161873197267308
252322.50112328464780.498876715352215
262524.13385512395300.866144876046962
271919.3285382243087-0.328538224308664
282423.95488115423220.0451188457678439
292222.1584389519411-0.158438951941049
302624.01993859595751.98006140404252
312923.02071275595475.97928724404534
323224.73090469045927.26909530954084
332522.03397369135122.96602630864875
342928.79945629041000.200543709589977
352827.88074129389040.119258706109636
361716.95088058590680.0491194140932041
372825.78251605994112.21748394005887
382928.94481702035720.0551829796428413
392625.19385895194120.80614104805876
402523.54698899082831.45301100917168
411414.6853688520440-0.68536885204396
422522.73490552864702.26509447135304
432626.1058683703617-0.105868370361661
442019.93795764139640.0620423586036247
451821.6877580201582-3.68775802015815
463231.94984420264930.0501557973507456
472525.029353741249-0.0293537412489835
482522.39375594910032.60624405089968
492323.253888249809-0.253888249809004
502121.1133833318065-0.113383331806463
512024.5006874023663-4.50068740236634
521515.9313015487408-0.931301548740772
533029.73358922318850.266410776811461
542425.5232994949851-1.52329949498510
552624.30810022051741.69189977948256
562423.95861085148660.0413891485133683
572222.1522491819777-0.152249181977660
581417.0304526985932-3.03045269859321
592423.95599621317390.0440037868260885
602424.0314331791993-0.0314331791993214
612423.42032061381490.579679386185118
622423.83716415322180.162835846778242
631918.98291242151400.0170875784859807
643130.95048255807800.0495174419220362
652221.90570837175310.0942916282469003
662727.2490866133539-0.249086613353868
671919.0306688916299-0.0306688916299072
682522.61956355538742.38043644461262
692024.708843473415-4.70884347341502
702121.3712075935348-0.371207593534769
712727.5473418577496-0.547341857749624
722325.4305544100768-2.43055441007685
732525.5760731741955-0.576073174195533
742022.6367877902548-2.63678779025478
752222.5409327698134-0.540932769813419
762322.98068902963110.0193109703689074
772523.10679429201261.89320570798738
782523.72714069619461.2728593038054
791723.8083960011454-6.80839600114543
801919.2471065054298-0.247106505429782
812524.28587973589020.714120264109787
821919.2763766378851-0.276376637885127
832019.8514854409760.148514559024005
842623.00915752295482.99084247704521
852322.58264011456520.417359885434837
862724.31604546030992.68395453969006
871717.1640440206979-0.164044020697871
881716.60605631695820.393943683041799
891717.2909912366521-0.290991236652071
902222.3161047928413-0.316104792841313
912120.91435360659830.085646393401681
923229.39163089823892.60836910176113
932120.59221930501010.407780694989933
942124.6541958327448-3.65419583274485
951818.3978405680709-0.397840568070873
961820.702242927377-2.70224292737698
972323.074936113401-0.0749361134009955
981919.2720973995629-0.272097399562895
992021.3489771868437-1.34897718684369
1002122.9747333242637-1.97473332426375
1012019.63468761927060.365312380729391
1021718.7373756573030-1.73737565730303
1031820.0886322714171-2.08863227141706
1041920.5565277383226-1.55652773832264
1052222.8708337361754-0.870833736175399
1061515.03017071542-0.0301707154199975
1071419.2920653920197-5.29206539201971
1081826.452765239334-8.45276523933401
1092424.3540193970066-0.354019397006586
1103523.547903205172711.4520967948273
1112918.511711324698110.4882886753019
1122121.7579634256110-0.757963425611031
1132020.1992008424665-0.199200842466506
1142221.82618698337360.173813016626372
1151313.4637990996297-0.463799099629735
1162622.72499723697393.27500276302615
1171717.3800726955620-0.38007269556197
1182520.20103036112784.79896963887217
1192020.4619097982583-0.461909798258281
1201918.72849533736280.271504662637237
1212120.90659539109510.0934046089049144
1222221.39956206053850.600437939461491
1232423.03548785397380.964512146026208
1242123.2581325967219-2.25813259672187
1252625.78934326521870.210656734781317
1262420.48317492461433.51682507538568
1271620.4510861279594-4.45108612795943
1282322.90013219423880.099867805761226
1291820.1267808197177-2.12678081971768
1301616.1919539344285-0.191953934428511
1312625.77462988648910.225370113510852
1321919.6130953042636-0.613095304263595
1332117.19665791181873.80334208818127
1342122.2011921513117-1.20119215131171
1352218.60749185701673.39250814298333
1362319.84609962378503.15390037621497
1372925.29917182077923.70082817922083
1382119.53826580995681.46173419004319
1392121.3784089773461-0.378408977346122
1402322.83868944661380.161310553386206
1412723.61099199254343.38900800745662
1422524.90317932000220.0968206799977803
1432120.92516585229830.0748341477016993
1441016.7806836535453-6.78068365354529
1452022.3335982628498-2.33359826284984
1462622.89462598936323.10537401063678
1472425.1619579556401-1.16195795564013
1482932.2243102755247-3.22431027552474
1491919.1101399599375-0.110139959937496
1502422.73181871978211.26818128021791
1511920.4358843511594-1.43588435115941
1522423.87939680531010.120603194689921
1532222.4251622938296-0.425162293829623
1541724.8854842560364-7.88548425603638


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.97814391909940.04371216180119820.0218560809005991
180.9526787145867640.09464257082647290.0473212854132364
190.9119939102866920.1760121794266170.0880060897133083
200.871454328988610.2570913420227810.128545671011391
210.918065024488380.1638699510232390.0819349755116194
220.880029171315130.2399416573697420.119970828684871
230.8248027166817440.3503945666365120.175197283318256
240.7588941995853430.4822116008293150.241105800414657
250.6871601898757730.6256796202484530.312839810124227
260.6115838706465970.7768322587068060.388416129353403
270.527742113507320.944515772985360.47225788649268
280.4445735304413260.8891470608826530.555426469558673
290.3927320380351190.7854640760702390.60726796196488
300.3768796070862520.7537592141725040.623120392913748
310.6751201189488920.6497597621022160.324879881051108
320.8752953918868690.2494092162262620.124704608113131
330.8647529729946470.2704940540107060.135247027005353
340.8243113487986710.3513773024026570.175688651201329
350.7775675785933830.4448648428132340.222432421406617
360.7250672002716020.5498655994567950.274932799728398
370.6917246329481610.6165507341036780.308275367051839
380.6327187702757430.7345624594485150.367281229724257
390.5745085803699530.8509828392600940.425491419630047
400.5176399348283530.9647201303432940.482360065171647
410.4577608455189810.9155216910379610.54223915448102
420.4236864226639470.8473728453278940.576313577336053
430.3646930670322390.7293861340644780.635306932967761
440.3091777136923080.6183554273846160.690822286307692
450.3468634088571980.6937268177143960.653136591142802
460.2939793464205600.5879586928411210.70602065357944
470.2578106098764250.5156212197528490.742189390123575
480.2375128435659040.4750256871318080.762487156434096
490.1951017201891840.3902034403783680.804898279810816
500.1578544722549500.3157089445098990.84214552774505
510.2568004782017240.5136009564034490.743199521798276
520.2168650903595440.4337301807190880.783134909640456
530.1780679070909090.3561358141818180.821932092909091
540.1573029098945460.3146058197890920.842697090105454
550.1346164366370330.2692328732740670.865383563362967
560.1070485735297980.2140971470595950.892951426470202
570.0838675235030240.1677350470060480.916132476496976
580.0773203593541390.1546407187082780.922679640645861
590.05947941191569250.1189588238313850.940520588084307
600.04509179309995880.09018358619991760.954908206900041
610.03404078650653120.06808157301306230.965959213493469
620.02510086522251830.05020173044503670.974899134777482
630.01821985088846280.03643970177692550.981780149111537
640.01308015825911900.02616031651823790.986919841740881
650.009251983403881860.01850396680776370.990748016596118
660.006428340764439570.01285668152887910.99357165923556
670.004404637264533050.00880927452906610.995595362735467
680.004159152904835580.008318305809671150.995840847095164
690.01316626427076380.02633252854152750.986833735729236
700.009422168178135160.01884433635627030.990577831821865
710.007197111307724870.01439422261544970.992802888692275
720.006804865712228280.01360973142445660.993195134287772
730.005471681497889010.01094336299577800.994528318502111
740.005128019345472780.01025603869094560.994871980654527
750.003563131232721690.007126262465443380.996436868767278
760.002405888689149020.004811777378298050.99759411131085
770.001881718997614540.003763437995229080.998118281002385
780.001421057691262240.002842115382524490.998578942308738
790.00968888579001150.0193777715800230.990311114209989
800.006862045260393760.01372409052078750.993137954739606
810.004899102031772530.009798204063545060.995100897968227
820.003368559389938680.006737118779877350.996631440610061
830.002280207080477450.004560414160954900.997719792919523
840.002386758311048240.004773516622096480.997613241688952
850.001606193233351090.003212386466702190.998393806766649
860.001711732459866870.003423464919733740.998288267540133
870.001129383820095610.002258767640191220.998870616179904
880.000736806123527290.001473612247054580.999263193876473
890.0004725280541330250.000945056108266050.999527471945867
900.0003302821077954870.0006605642155909740.999669717892204
910.0002053046031263070.0004106092062526130.999794695396874
920.0002014601863685840.0004029203727371680.999798539813631
930.0001249634007849650.0002499268015699300.999875036599215
940.0001731659786256560.0003463319572513110.999826834021374
950.0001066372254812050.0002132744509624090.999893362774519
960.0001014901984237010.0002029803968474020.999898509801576
976.04314352437458e-050.0001208628704874920.999939568564756
983.5639879179104e-057.1279758358208e-050.99996436012082
992.31470773180972e-054.62941546361943e-050.999976852922682
1001.53749740572701e-053.07499481145403e-050.999984625025943
1018.75228222649496e-061.75045644529899e-050.999991247717773
1025.90585401899174e-061.18117080379835e-050.999994094145981
1034.49052739001114e-068.98105478002227e-060.99999550947261
1043.28687920748496e-066.57375841496991e-060.999996713120793
1051.79588682881190e-063.59177365762379e-060.999998204113171
1069.39938048657008e-071.87987609731402e-060.99999906006195
1073.37899972234571e-066.75799944469141e-060.999996621000278
1080.0003600745400678420.0007201490801356830.999639925459932
1090.0002191389562841620.0004382779125683240.999780861043716
1100.06324852197144830.1264970439428970.936751478028552
1110.4649229554633940.9298459109267880.535077044536606
1120.4159091872186320.8318183744372630.584090812781368
1130.3615880905031730.7231761810063450.638411909496827
1140.3058754629800070.6117509259600130.694124537019994
1150.2540774376294120.5081548752588240.745922562370588
1160.2394512868506210.4789025737012420.76054871314938
1170.1937323053904240.3874646107808480.806267694609576
1180.260795003191180.521590006382360.73920499680882
1190.2119475166926570.4238950333853150.788052483307343
1200.1666869833001230.3333739666002460.833313016699877
1210.1276526543622950.2553053087245900.872347345637705
1220.09982136978968440.1996427395793690.900178630210316
1230.07773664840259350.1554732968051870.922263351597407
1240.05835868846146950.1167173769229390.94164131153853
1250.04141779014246890.08283558028493790.95858220985753
1260.04357351893747310.08714703787494620.956426481062527
1270.05253588879885130.1050717775977030.947464111201149
1280.03446458013267640.06892916026535270.965535419867324
1290.02398512700001380.04797025400002760.976014872999986
1300.01438357077124850.02876714154249690.985616429228751
1310.00815255960182720.01630511920365440.991847440398173
1320.004506495907666190.009012991815332390.995493504092334
1330.004213909848165020.008427819696330040.995786090151835
1340.002133098451249530.004266196902499060.99786690154875
1350.001398346353991110.002796692707982220.99860165364601
1360.0008085160295328040.001617032059065610.999191483970467
1370.0009569618373721330.001913923674744270.999043038162628


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level410.338842975206612NOK
5% type I error level570.471074380165289NOK
10% type I error level640.528925619834711NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/10kdy31292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/10kdy31292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/1vcjr1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/1vcjr1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/263ic1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/263ic1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/363ic1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/363ic1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/4zdif1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/4zdif1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/5zdif1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/5zdif1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/6zdif1292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/6zdif1292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/794h01292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/794h01292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/8kdy31292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/8kdy31292167472.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/9kdy31292167472.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292167513gefj54mo1fzxa28/9kdy31292167472.ps (open in new window)


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