Home » date » 2010 » Dec » 21 »

PAPER BAEYENS (Multiple Linear Regression)

*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, 21 Dec 2010 11:33:46 +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/21/t1292931571x5p5u80vxoiv8vf.htm/, Retrieved Tue, 21 Dec 2010 12:39:44 +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/21/t1292931571x5p5u80vxoiv8vf.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 «
13 14 5 12 18 3 15 11 0 12 12 7 10 16 4 12 18 1 15 14 6 9 14 3 12 15 12 11 15 0 11 17 5 11 19 6 15 10 6 7 16 6 11 18 2 11 14 1 10 14 5 14 17 7 10 14 3 6 16 3 11 18 3 15 11 7 11 14 8 12 12 6 14 17 3 15 9 5 9 16 5 13 14 10 13 15 2 16 11 6 13 16 4 12 13 6 14 17 8 11 15 4 9 14 5 16 16 10 12 9 6 10 15 7 13 17 4 16 13 10 14 15 4 15 16 3 5 16 3 8 12 3 11 12 3 16 11 7 17 15 15 9 15 0 9 17 0 13 13 4 10 16 5 6 14 5 12 11 2 8 12 3 14 12 0 12 15 9 11 16 2 16 15 7 8 12 7 15 12 0 7 8 0 16 13 10 14 11 2 16 14 1 9 15 8 14 10 6 11 11 11 13 12 3 15 15 8 5 15 6 15 14 9 13 16 9 11 15 8 11 15 8 12 13 7 12 12 6 12 17 5 12 13 4 14 15 6 6 13 3 7 15 2 14 16 12 14 15 8 10 16 5 13 15 9 12 14 6 9 15 5 12 14 2 16 13 4 10 7 7 14 17 5 10 13 6 16 15 7 15 14 8 12 13 6 10 16 0 8 12 1 8 14 5 11 17 5 13 15 5 16 17 7 16 12 7 14 16 1 11 11 3 4 15 4 14 9 8 9 16 6 14 15 6 8 10 2 8 10 2 11 15 3 12 11 3 11 13 0 14 14 2 15 18 8 16 16 8 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 time21 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
HS[t] = + 15.0179951973243 -0.0858344714341663IEP[t] + 0.0108385179567776WP[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.01799519732430.7979418.82100
IEP-0.08583447143416630.066922-1.28260.2015690.100784
WP0.01083851795677760.0631320.17170.8639160.431958


Multiple Linear Regression - Regression Statistics
Multiple R0.104501600715015
R-squared0.0109205845520004
Adjusted R-squared-0.00200855813359424
F-TEST (value)0.844648776609741
F-TEST (DF numerator)2
F-TEST (DF denominator)153
p-value0.431701946955386
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.34103922960213
Sum Squared Residuals838.511095204031


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11413.95633965846430.0436603415356564
21814.02049709398473.97950290601531
31113.7304781258118-2.73047812581185
41214.0638511658118-2.06385116581179
51614.20300455480981.79699544519021
61813.99882005807114.00117994192887
71413.79550923355250.204490766447482
81414.2780005082872-0.278000508287183
91514.11804375559570.881956244404317
101514.07381601154850.926183988451483
111714.12800860133242.87199139866759
121914.13884711928924.86115288071082
131013.7955092335525-3.79550923355252
141614.48218500502581.51781499497415
151814.09549304746213.90450695253793
161414.0846545295053-0.084654529505295
171414.2138430727666-0.213843072766572
181713.89218222294353.10781777705654
191414.1921660368530-0.192166036853017
201614.53550392258971.46449607741032
211814.10633156541893.89366843458115
221113.8063477515093-2.80634775150930
231414.1605241552027-0.160524155202739
241214.0530126478550-2.05301264785502
251713.84882815111643.15117184888365
26913.7846707155957-4.78467071559574
271614.29967754420071.70032245579926
281414.0105322482480-0.0105322482479615
291513.92382410459371.07617589540626
301113.7096747621184-2.70967476211835
311613.94550114050732.05449885949271
321314.0530126478550-1.05301264785502
331713.90302074090023.09697925909976
341514.11717008337560.882829916624372
351414.2996775442007-0.299677544200738
361613.75302883394552.24697116605454
37914.0530126478550-5.05301264785502
381514.23552010868010.764479891319872
391713.94550114050733.05449885949271
401313.7530288339455-0.753028833945462
411513.85966666907311.14033333092687
421613.76299367968222.23700632031782
431614.62133839402381.37866160597615
441214.3638349797214-2.36383497972135
451214.1063315654189-2.10633156541885
461113.7205132800751-2.72051328007513
471513.72138695229521.27861304770482
481514.24548495441690.75451504558315
491714.24548495441682.75451504558315
501313.9455011405073-0.945501140507295
511614.21384307276661.78615692723343
521414.5571809585032-0.557180958503238
531114.0096585760279-3.00965857602791
541214.3638349797214-2.36383497972135
551213.8163125972460-1.81631259724602
561514.08552820172530.91447179827465
571614.09549304746211.90450695253793
581513.72051328007511.27948671992487
591214.4071890515485-2.40718905154846
601213.7304781258119-1.73047812581185
61814.4171538972852-6.41715389728518
621313.7530288339455-0.753028833945462
631113.8379896331596-2.83798963315957
641413.65548217233450.344517827665537
651514.33219309807110.667806901928929
661013.8813437049867-3.88134370498668
671114.1930397090731-3.19303970907307
681213.9346626225505-1.93466262255052
691513.81718626946611.18281373053393
701514.65385394789420.346146052105818
711413.82802478742290.171975212577149
721613.99969373029122.00030626970882
731514.16052415520270.839475844797261
741514.16052415520270.839475844797261
751314.0638511658118-1.06385116581179
761214.0530126478550-2.05301264785502
771714.04217412989822.95782587010176
781314.0313356119415-1.03133561194146
791513.88134370498671.11865629501332
801314.5355039225897-1.53550392258968
811514.43883093319870.561169066801262
821613.94637481272742.05362518727265
831513.90302074090021.09697925909976
841614.21384307276661.78615692723343
851513.99969373029121.00030626970882
861414.0530126478550-0.0530126478550171
871514.29967754420070.700322455799262
881414.0096585760279-0.00965857602790628
891313.6879977262048-0.687997726204796
90714.2355201086801-7.23552010868013
911713.87050518702993.12949481297009
921314.2246815907233-1.22468159072335
931513.72051328007511.27948671992487
941413.81718626946610.182813730533927
951314.0530126478550-1.05301264785502
961614.15965048298271.84034951701732
971214.3421579438078-2.34215794380779
981414.3855120156349-0.385512015634905
991714.12800860133242.87199139866759
1001513.95633965846411.04366034153593
1011713.72051328007513.27948671992487
1021213.7205132800751-1.72051328007513
1031613.82715111520282.17284888479720
1041114.1063315654189-3.10633156541885
1051514.71801138341480.281988616585207
106913.9030207409002-4.90302074090024
1071614.31051606215751.68948393784248
1081513.88134370498671.11865629501332
1091014.3529964617646-4.35299646176457
1101014.3529964617646-4.35299646176457
1111514.10633156541890.89366843458115
1121114.0204970939847-3.02049709398468
1131314.0738160115485-1.07381601154852
1141413.83798963315960.162010366840426
1151813.81718626946614.18281373053393
1161613.73135179803192.26864820196809
1171413.64464365437770.355356345622314
1181414.1280086013324-0.128008601332406
1191413.91385925885700.0861407411429825
1201413.88134370498670.118656295013316
1211214.0530126478550-2.05301264785502
1221413.84882815111640.151171848883649
1231514.4288660874620.571133912537984
1241513.97801669437761.02198330562237
1251513.73135179803191.26864820196809
1261313.9879815401144-0.98798154011435
1271713.72051328007513.27948671992487
1281713.98798154011443.01201845988565
1291914.12800860133244.87199139866759
1301514.67465731158770.325342688412318
1311313.7963829057726-0.796382905772573
132913.7846707155957-4.78467071559574
1331514.18132751889620.818672481103761
1341513.98885521233441.01114478766559
1351513.77383219763901.22616780236104
1361614.00965857602791.99034142397209
1371113.8813437049867-2.88134370498668
1381414.4496694511555-0.449669451155516
1391113.4413328298591-2.44133282985907
1401514.08552820172530.91447179827465
1411314.0204970939847-1.02049709398468
1421513.93466262255051.06533737744948
1431613.73047812581192.26952187418815
1441414.4397046054188-0.439704605418793
1451514.03133561194150.968664388058538
1461614.18132751889621.81867248110376
1471614.36383497972141.63616502027865
1481114.2680356625505-3.26803566255046
1491213.8063477515093-1.80634775150930
150913.6446436543777-4.64464365437769
1511613.96717817642092.03282182357915
1521313.7313517980319-0.731351798031907
1531614.24548495441681.75451504558315
1541213.8596666690731-1.85966666907313
155913.9246977768138-4.92469777681380
1561314.0421741298982-1.04217412989824


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.6375510569693380.7248978860613240.362448943030662
70.7206178128311960.5587643743376080.279382187168804
80.7631830893352320.4736338213295350.236816910664767
90.6826445683356270.6347108633287460.317355431664373
100.5771834145915790.8456331708168430.422816585408421
110.530629586196930.938740827606140.46937041380307
120.6449951621093080.7100096757813850.355004837890692
130.6897514265388750.6204971469222510.310248573461125
140.6784236676643310.6431526646713380.321576332335669
150.6848308307310220.6303383385379570.315169169268978
160.6464094484499670.7071811031000650.353590551550033
170.61612248139450.7677550372109990.383877518605499
180.6767741037640490.6464517924719020.323225896235951
190.6432066685569780.7135866628860440.356793331443022
200.5937435839847330.8125128320305340.406256416015267
210.6301871527246560.7396256945506880.369812847275344
220.6465114003410890.7069771993178220.353488599658911
230.5918520645988020.8162958708023950.408147935401198
240.6013391405817270.7973217188365460.398660859418273
250.639063022675170.721873954649660.36093697732483
260.773088887960430.4538222240791390.226911112039569
270.7297525645231020.5404948709537960.270247435476898
280.6778861851069770.6442276297860470.322113814893023
290.626862970531880.746274058936240.37313702946812
300.6030669380215150.793866123956970.396933061978485
310.5839609303175770.8320781393648460.416039069682423
320.5454976673634430.9090046652731140.454502332636557
330.6235738755862370.7528522488275260.376426124413763
340.5710891957256760.8578216085486480.428910804274324
350.546793387644630.9064132247107410.453206612355371
360.5866127470809740.8267745058380530.413387252919026
370.7908766666851120.4182466666297760.209123333314888
380.7518648552953530.4962702894092950.248135144704648
390.7703254400215710.4593491199568570.229674559978429
400.7294493309294870.5411013381410260.270550669070513
410.6932623167171970.6134753665656060.306737683282803
420.686960379915980.6260792401680390.313039620084020
430.6545578670407190.6908842659185620.345442132959281
440.7043891439233990.5912217121532020.295610856076601
450.715598995957810.5688020080843810.284401004042190
460.7209914085077360.5580171829845280.279008591492264
470.7063899750375180.5872200499249640.293610024962482
480.6660266467858280.6679467064283440.333973353214172
490.6640839809181520.6718320381636950.335916019081848
500.6288516786453240.7422966427093530.371148321354676
510.6001597680788850.799680463842230.399840231921115
520.5746372549805050.850725490038990.425362745019495
530.6203462815308290.7593074369383430.379653718469171
540.6432469481087920.7135061037824160.356753051891208
550.6248634408955890.7502731182088230.375136559104411
560.5834084142720630.8331831714558750.416591585727937
570.5631237270413140.8737525459173720.436876272958686
580.5319192191380870.9361615617238260.468080780861913
590.5510456589792760.8979086820414480.448954341020724
600.5288731955015610.9422536089968790.471126804498439
610.8093884750577550.3812230498844890.190611524942245
620.779610161276560.4407796774468790.220389838723440
630.7922683031611230.4154633936777540.207731696838877
640.7588371966336920.4823256067326160.241162803366308
650.723834268841730.552331462316540.27616573115827
660.7851761604045940.4296476791908130.214823839595406
670.8138980153608980.3722039692782040.186101984639102
680.8027153310894640.3945693378210720.197284668910536
690.7780819569053370.4438360861893260.221918043094663
700.7437508440724780.5124983118550430.256249155927522
710.7052087297208220.5895825405583550.294791270279178
720.6936418771235630.6127162457528750.306358122876437
730.6573114739998470.6853770520003070.342688526000153
740.619663778026140.7606724439477210.380336221973861
750.5838811361252610.8322377277494780.416118863874739
760.5723093879286580.8553812241426850.427690612071342
770.5982460489473020.8035079021053960.401753951052698
780.5613406529905340.8773186940189310.438659347009466
790.5259273979412470.9481452041175060.474072602058753
800.4996779258863410.9993558517726820.500322074113659
810.4565877013814540.9131754027629070.543412298618546
820.4471004484709190.8942008969418380.552899551529081
830.412151644772920.824303289545840.58784835522708
840.3944952007878760.7889904015757530.605504799212124
850.3602431200214960.7204862400429910.639756879978504
860.3179232293671630.6358464587343260.682076770632837
870.2825351020904380.5650702041808760.717464897909562
880.2444527735477380.4889055470954760.755547226452262
890.21237745269130.42475490538260.7876225473087
900.5596623505680050.880675298863990.440337649431995
910.5950368032597680.8099263934804640.404963196740232
920.5599246917847470.8801506164305070.440075308215253
930.5275249914076720.9449500171846560.472475008592328
940.4809214246575580.9618428493151160.519078575342442
950.4420466985836820.8840933971673640.557953301416318
960.4230613862680740.8461227725361490.576938613731926
970.4212374929542220.8424749859084440.578762507045778
980.3759340966330200.7518681932660410.624065903366980
990.3993102712583780.7986205425167570.600689728741622
1000.3632229702444050.726445940488810.636777029755595
1010.4119728871836360.8239457743672710.588027112816364
1020.3860086880331160.7720173760662320.613991311966884
1030.3793039965901730.7586079931803460.620696003409827
1040.4098048966814140.8196097933628290.590195103318586
1050.3631637416904770.7263274833809540.636836258309523
1060.511898670516710.976202658966580.48810132948329
1070.4894272583659710.9788545167319430.510572741634029
1080.4521010943794460.9042021887588910.547898905620554
1090.5746278306951440.8507443386097130.425372169304856
1100.7126450627814170.5747098744371660.287354937218583
1110.67135004739260.6572999052147990.328649952607399
1120.7109176118524160.5781647762951680.289082388147584
1130.6842881754982080.6314236490035840.315711824501792
1140.6356150863872750.728769827225450.364384913612725
1150.7642657989222410.4714684021555180.235734201077759
1160.7873942056056570.4252115887886860.212605794394343
1170.7462002280247730.5075995439504540.253799771975227
1180.7003771823498140.5992456353003720.299622817650186
1190.6551891719668360.6896216560663270.344810828033164
1200.6041303192481020.7917393615037950.395869680751898
1210.5899992275117240.8200015449765520.410000772488276
1220.5336640658885010.9326718682229980.466335934111499
1230.4775303575622560.9550607151245110.522469642437744
1240.4373075436971910.8746150873943820.562692456302809
1250.4272912423016880.8545824846033770.572708757698312
1260.3939236061109520.7878472122219040.606076393889048
1270.5336844801446850.9326310397106310.466315519855315
1280.5487415029938510.9025169940122980.451258497006149
1290.7691808841623310.4616382316753370.230819115837669
1300.752370307368160.4952593852636790.247629692631840
1310.759907450826080.480185098347840.24009254917392
1320.8546196189950180.2907607620099630.145380381004982
1330.8110840466936030.3778319066127950.188915953306397
1340.815136560897730.3697268782045390.184863439102269
1350.813131323566210.3737373528675780.186868676433789
1360.7949145801255070.4101708397489860.205085419874493
1370.7743917348375170.4512165303249660.225608265162483
1380.7632601439948520.4734797120102960.236739856005148
1390.7042479157359370.5915041685281260.295752084264063
1400.7162757899351310.5674484201297380.283724210064869
1410.6602937559272730.6794124881454550.339706244072727
1420.6006425437306380.7987149125387230.399357456269362
1430.6401540877074670.7196918245850670.359845912292534
1440.5473333193226120.9053333613547750.452666680677388
1450.4853968609120440.9707937218240890.514603139087956
1460.4083044023027180.8166088046054360.591695597697282
1470.3102276491413050.620455298282610.689772350858695
1480.3835834938886270.7671669877772540.616416506111373
1490.2661908639632740.5323817279265470.733809136036726
1500.3473705378182380.6947410756364760.652629462181762


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/101zx31292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/101zx31292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/1m7hu1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/1m7hu1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/2m7hu1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/2m7hu1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/3m7hu1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/3m7hu1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/4xyyf1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/4xyyf1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/5xyyf1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/5xyyf1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/6xyyf1292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/6xyyf1292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/7qpg01292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/7qpg01292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/81zx31292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/81zx31292931204.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/91zx31292931204.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292931571x5p5u80vxoiv8vf/91zx31292931204.ps (open in new window)


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