Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 11:23:31 +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/03/t12913754826l3plk68k3javsb.htm/, Retrieved Fri, 03 Dec 2010 12:24:53 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb.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 «
4 4 5 4 4 4 4 4 4 4 3 4 5 5 4 4 5 5 3 3 2 3 4 4 2 3 2 3 2 4 5 4 3 3 4 5 4 3 3 3 3 4 2 3 4 4 2 4 4 4 3 4 4 5 4 3 2 3 2 2 4 3 2 4 4 4 2 3 2 4 2 3 5 4 2 5 5 5 3 4 2 3 3 4 4 3 4 4 4 4 4 3 3 4 4 5 3 2 3 3 3 3 4 4 4 4 4 4 2 3 2 2 2 4 4 2 4 4 3 4 3 3 2 4 4 4 3 2 4 4 2 3 4 4 2 4 4 4 4 4 3 4 4 4 4 4 4 4 4 4 4 3 3 4 3 4 5 4 4 4 4 4 4 1 4 4 4 4 4 4 2 4 4 4 4 4 2 4 4 4 4 3 4 3 2 4 4 3 2 4 4 4 4 4 5 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 5 3 2 3 3 5 4 4 2 4 4 4 4 3 3 3 3 4 4 4 3 4 3 4 3 3 4 4 3 3 4 4 4 4 3 4 2 3 2 3 2 3 2 2 4 2 2 5 4 3 4 4 4 5 4 4 4 4 2 4 5 4 4 4 4 5 4 3 2 4 4 4 4 3 3 4 3 4 4 4 2 4 4 4 5 4 2 4 4 4 3 3 4 3 3 4 2 2 4 2 1 4 4 4 4 4 4 4 4 4 3 4 4 4 2 3 4 4 2 4 2 2 5 2 2 4 4 4 4 4 4 4 4 3 4 4 4 4 4 3 4 4 3 4 3 4 4 4 3 4 2 3 2 3 1 4 4 4 4 4 4 4 5 3 4 4 2 4 4 4 3 4 4 4 5 4 4 5 5 5 4 4 2 4 3 4 3 3 2 3 3 4 3 3 2 3 2 3 4 3 4 4 4 4 3 4 4 3 2 4 2 3 3 3 2 2 4 2 2 2 2 4 3 4 2 4 4 5 5 4 2 4 5 4 5 4 5 4 4 5 4 3 4 2 2 3 5 5 4 4 5 4 4 3 2 4 2 4 3 2 2 3 3 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 time18 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = -0.377574463704221 + 0.134562581071375x1[t] + 0.0510098609463206x2[t] + 0.336315636002047x3[t] + 0.272305484877694x4[t] + 0.330922737595275x5[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.3775744637042210.431842-0.87430.3833820.191691
x10.1345625810713750.0919011.46420.1453010.072651
x20.05100986094632060.0613310.83170.4069350.203467
x30.3363156360020470.0897293.74810.0002570.000128
x40.2723054848776940.07053.86250.0001698.4e-05
x50.3309227375952750.0961833.44050.0007590.000379


Multiple Linear Regression - Regression Statistics
Multiple R0.66880462193062
R-squared0.447299622315759
Adjusted R-squared0.428240988602509
F-TEST (value)23.4696583735062
F-TEST (DF numerator)5
F-TEST (DF denominator)145
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.674861643367005
Sum Squared Residuals66.0385444647621


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.17390059921299-0.173900599212986
243.850585253388940.149414746611058
354.860681541810980.139318458189023
433.54999279930057-0.549992799300572
523.00538182954518-1.00538182954518
654.066487978913540.933512021086462
743.328697175369190.671302824630807
823.44371718743986-1.44371718743986
944.40280361491558-0.402803614915584
1042.343536354354631.65646364564537
1143.886308435302610.113691564697388
1223.01077472795195-1.01077472795195
1354.9604148748490.0395851251509964
1433.41224989549425-0.412249895494248
1543.988328157195250.0116718428047465
1644.26824103384421-0.268241033844208
1732.863211856702540.136788143297459
1844.12289073826663-0.122890738266630
1922.66906619354313-0.669066193543132
2043.581460091246180.418539908753817
2133.88630843530261-0.886308435302612
2232.978231868773210.0217681312267863
2344.02087101637399-0.0208710163739883
2444.07188087732031-0.071880877320309
2544.12289073826663-0.122890738266630
2643.665012811371240.334987188628761
2754.122890738266630.87710926173337
2843.71920299505250.280797004947499
2944.02087101637399-0.0208710163739883
3044.02087101637399-0.0208710163739883
3143.107401551437820.892598448562181
3243.886308435302610.113691564697388
3344.50482333680823-0.504823336808225
3444.12289073826663-0.122890738266630
3544.12289073826663-0.122890738266630
3653.608610052018151.39138994798185
3744.02087101637399-0.0208710163739883
3843.328697175369190.671302824630807
3943.799575392442610.200424607557385
4033.38509993472228-0.385099934722284
4143.850585253388940.149414746611064
4222.6744590919499-0.674459091949903
4322.96744607195967-0.967446071959672
4444.31925089479053-0.319250894790529
4543.578279768511240.421720231488759
4654.453813475861900.546186524138095
4743.886308435302610.113691564697388
4843.665012811371240.334987188628761
4944.02087101637399-0.0208710163739883
5054.020871016373990.979128983626011
5133.37970703631551-0.379707036315513
5222.36421784948670-0.364217849486703
5344.12289073826663-0.122890738266630
5444.07188087732031-0.071880877320309
5523.44371718743986-1.44371718743986
5622.68753319531072-0.687533195310717
5744.12289073826663-0.122890738266630
5843.988328157195250.0116718428047465
5943.716022672317560.283977327682441
6033.85058525338894-0.850585253388936
6122.73307634466748-0.733076344667483
6244.12289073826663-0.122890738266630
6353.443717187439861.55628281256014
6444.07188087732031-0.071880877320309
6555.06243459674165-0.062434596741645
6643.748565531496290.251434468503706
6733.27768731442287-0.277687314422872
6832.67445909194990.325540908050097
6943.988328157195250.0116718428047465
7033.24196413250920-0.241964132509195
7122.39454621530095-0.394546215300948
7242.534503612471761.46549638752824
7334.35179375396926-1.35179375396926
7454.293176501251680.706823498748317
7554.504823336808230.495176663191774
7642.44016317784051.55983682215950
7754.52975880421570.4702411957843
7843.341697465547220.658302534452776
7932.812201995756220.187798004243779
8033.65201252119321-0.652012521193208
8143.379707036315510.620292963684487
8243.578279768511240.421720231488759
8333.51426961738689-0.51426961738689
8443.549992799300570.450007200699434
8532.262198127594060.737801872405939
8633.90920250610652-0.909202506106516
8733.52726990756492-0.52726990756492
8822.94137167842083-0.941371678420826
8953.748565531496291.25143446850371
9033.10740155143782-0.107401551437819
9142.967446071959671.03255392804033
9243.937318296248930.0626817037510672
9333.37970703631551-0.379707036315513
9432.997774437773920.00222556222608242
9543.735565241318260.264434758681737
9644.45920637426868-0.459206374268676
9733.57827976851124-0.578279768511241
9833.10200865303105-0.102008653031048
9944.45381347586190-0.453813475861905
10023.46325975644057-1.46325975644057
10142.771085915435771.22891408456423
10244.35179375396926-0.351793753969263
10343.995935548966510.00406445103348649
10453.514269617386891.48573038261311
10554.402803614915580.597196385084416
10653.665012811371241.33498718862876
10743.886308435302610.113691564697388
10843.614002950424920.385997049575082
10933.61400295042492-0.614002950424918
11022.95215747523437-0.952157475234368
11122.6365233343644-0.636523334364397
11243.807182784213870.192817215786125
11322.64952362454243-0.649523624542428
11433.10740155143782-0.107401551437819
11543.665012811371240.334987188628761
11643.328697175369190.671302824630807
11743.850585253388940.149414746611064
11843.132337018845290.867662981154706
11933.00538182954518-0.00538182954517756
12044.07188087732031-0.071880877320309
12132.67445909194990.325540908050097
12243.665012811371240.334987188628761
12343.710629773910790.289370226089212
12444.40280361491558-0.402803614915584
12522.52689622070050-0.526896220700495
12653.845192354982161.15480764501784
12753.614002950424921.38599704957508
12833.54999279930057-0.549992799300566
12933.74095813972503-0.740958139725034
13033.13233701884529-0.132337018845294
13144.07188087732031-0.071880877320309
13233.63361933260841-0.633619332608406
13321.974677859173850.0253221408261531
13454.122890738266630.87710926173337
13543.853765576123880.146234423876123
13623.32869717536919-1.32869717536919
13744.18150799098421-0.181507990984211
13833.93731829624893-0.937318296248933
13922.94137167842083-0.941371678420826
14033.44371718743986-0.443717187439865
14133.98832815719525-0.988328157195254
14244.12289073826663-0.122890738266630
14343.886308435302610.113691564697388
14444.04694540991283-0.0469454099128343
14522.74819184463187-0.748191844631869
14653.853765576123881.14623442387612
14743.601002660246890.398997339753113
14844.02087101637399-0.0208710163739883
14933.32869717536919-0.328697175369193
15033.74856553149629-0.748565531496294
15154.978881876616590.0211181233834108


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6228711225612920.7542577548774170.377128877438709
100.6992572987456550.6014854025086910.300742701254345
110.7739751339486680.4520497321026630.226024866051332
120.7461362250789310.5077275498421380.253863774921069
130.7545044233769510.4909911532460980.245495576623049
140.7806900953475430.4386198093049140.219309904652457
150.7003180258461440.5993639483077110.299681974153856
160.648465509753540.703068980492920.35153449024646
170.5702916940938310.8594166118123380.429708305906169
180.5071601640177970.9856796719644060.492839835982203
190.4605185949568660.9210371899137320.539481405043134
200.5424622126565610.9150755746868780.457537787343439
210.598838176033140.802323647933720.40116182396686
220.5360486202524240.9279027594951520.463951379747576
230.4606271405471070.9212542810942130.539372859452893
240.3923042649097820.7846085298195630.607695735090218
250.3400080199254630.6800160398509250.659991980074537
260.3469594508567320.6939189017134650.653040549143268
270.3512041445418160.7024082890836330.648795855458184
280.2915856069198790.5831712138397570.708414393080121
290.2363590565565220.4727181131130440.763640943443478
300.1880129729369430.3760259458738870.811987027063057
310.2753662546730220.5507325093460440.724633745326978
320.229674982091260.459349964182520.77032501790874
330.2087129004135700.4174258008271410.79128709958643
340.1774982777543740.3549965555087480.822501722245626
350.1480541258801010.2961082517602010.8519458741199
360.3949598692344560.7899197384689120.605040130765544
370.3396754985795130.6793509971590260.660324501420487
380.3169339661148690.6338679322297380.683066033885131
390.2863145489235210.5726290978470420.713685451076479
400.2592411907373610.5184823814747210.740758809262639
410.2230360885623340.4460721771246690.776963911437666
420.2277143692284710.4554287384569420.77228563077153
430.2910052188961220.5820104377922440.708994781103878
440.250908183958450.50181636791690.74909181604155
450.2557033347354480.5114066694708960.744296665264552
460.2461763706301930.4923527412603860.753823629369807
470.2070722106643890.4141444213287780.79292778933561
480.1859589193193550.3719178386387090.814041080680645
490.1525228462351740.3050456924703470.847477153764826
500.1855587468735970.3711174937471950.814441253126403
510.1662841392675880.3325682785351760.833715860732412
520.1406191562210540.2812383124421080.859380843778946
530.1166178308677880.2332356617355750.883382169132212
540.09441739127796070.1888347825559210.90558260872204
550.1608079754851530.3216159509703070.839192024514847
560.1633058099840680.3266116199681360.836694190015932
570.1363897548944730.2727795097889450.863610245105527
580.1106259491841110.2212518983682210.88937405081589
590.09628850001600550.1925770000320110.903711499983994
600.1047394221718410.2094788443436830.895260577828159
610.0977439473671060.1954878947342120.902256052632894
620.07930586631091550.1586117326218310.920694133689084
630.2457566315491670.4915132630983350.754243368450833
640.2098979504556070.4197959009112140.790102049544393
650.1766422838773880.3532845677547770.823357716122612
660.1521455510100560.3042911020201120.847854448989944
670.1289072887443850.257814577488770.871092711255615
680.110210450547150.22042090109430.88978954945285
690.08892375044134440.1778475008826890.911076249558656
700.07257259697194550.1451451939438910.927427403028054
710.06429218023722470.1285843604744490.935707819762775
720.1447305702731270.2894611405462540.855269429726873
730.2305430942071360.4610861884142720.769456905792864
740.2301191892048430.4602383784096860.769880810795157
750.2163740993996390.4327481987992770.783625900600361
760.3570598263474540.7141196526949070.642940173652546
770.3357873950049850.671574790009970.664212604995015
780.3521994939304470.7043989878608950.647800506069553
790.3123878493607790.6247756987215580.687612150639221
800.320173912394180.640347824788360.67982608760582
810.3097669932903190.6195339865806390.69023300670968
820.2897949668150460.5795899336300920.710205033184954
830.2731289582106550.546257916421310.726871041789345
840.2514611861884790.5029223723769580.748538813811521
850.2586945832014760.5173891664029530.741305416798524
860.2916354490201870.5832708980403750.708364550979813
870.2765454131089370.5530908262178730.723454586891063
880.3178363594856840.6356727189713670.682163640514317
890.4362355943295870.8724711886591740.563764405670413
900.3917255749693660.7834511499387330.608274425030634
910.4476699937045990.8953399874091970.552330006295401
920.4006940055627420.8013880111254850.599305994437258
930.3701263575174140.7402527150348280.629873642482586
940.3270303320877330.6540606641754650.672969667912267
950.2934234560245960.5868469120491920.706576543975404
960.2756477215848220.5512954431696450.724352278415178
970.2833957173502840.5667914347005690.716604282649716
980.2443640665222290.4887281330444580.755635933477771
990.2307923533524200.4615847067048390.76920764664758
1000.4068620754224530.8137241508449060.593137924577547
1010.5059244540101730.9881510919796550.494075545989827
1020.467160163863190.934320327726380.53283983613681
1030.4175847266882420.8351694533764840.582415273311758
1040.5950570594616220.8098858810767550.404942940538378
1050.5784293783392880.8431412433214250.421570621660712
1060.7243838299312130.5512323401375750.275616170068787
1070.683367043947890.6332659121042210.316632956052111
1080.6593267859072930.6813464281854150.340673214092707
1090.6398553101951120.7202893796097750.360144689804888
1100.6814366205544690.6371267588910620.318563379445531
1110.6633386688852030.6733226622295940.336661331114797
1120.6147869712840040.7704260574319910.385213028715996
1130.6244365369213870.7511269261572260.375563463078613
1140.5774263013291590.8451473973416810.422573698670841
1150.5285607780598420.9428784438803160.471439221940158
1160.5375685261552660.9248629476894670.462431473844734
1170.4789740280367790.9579480560735580.521025971963221
1180.5537046188561420.8925907622877160.446295381143858
1190.4922987555500390.9845975111000770.507701244449961
1200.4318005994007650.863601198801530.568199400599235
1210.4015928223651930.8031856447303850.598407177634807
1220.3545479362520850.709095872504170.645452063747915
1230.3061977771605250.612395554321050.693802222839475
1240.2633085225328200.5266170450656410.73669147746718
1250.2240766381527460.4481532763054910.775923361847255
1260.4065035741979250.8130071483958490.593496425802075
1270.7442237020621770.5115525958756460.255776297937823
1280.6884208121518320.6231583756963360.311579187848168
1290.7200082291492830.5599835417014350.279991770850717
1300.6517491501808260.6965016996383490.348250849819174
1310.5744267801561980.8511464396876050.425573219843802
1320.5083730469181260.9832539061637480.491626953081874
1330.4440387097363490.8880774194726980.555961290263651
1340.5880828125327940.8238343749344120.411917187467206
1350.494761248836440.989522497672880.50523875116356
1360.5596951881016870.8806096237966250.440304811898313
1370.46285419009630.92570838019260.5371458099037
1380.5406757404473570.9186485191052870.459324259552643
1390.4606422101742100.9212844203484190.53935778982579
1400.3388607171948980.6777214343897970.661139282805102
1410.4968507822989510.9937015645979030.503149217701049
1420.3356246961020070.6712493922040140.664375303897993


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/03/t12913754826l3plk68k3javsb/10anlm1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/10anlm1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/1lmoa1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/1lmoa1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/2wvnd1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/2wvnd1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/3wvnd1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/3wvnd1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/4wvnd1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/4wvnd1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/564mg1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/564mg1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/664mg1291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/664mg1291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/7hw411291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/7hw411291375391.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/8hw411291375391.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913754826l3plk68k3javsb/8hw411291375391.ps (open in new window)


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