Home » date » 2010 » Nov » 16 »

*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, 16 Nov 2010 09:57:03 +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/Nov/16/t1289902873eexc0x9f02fgdvj.htm/, Retrieved Tue, 16 Nov 2010 11:21:26 +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/Nov/16/t1289902873eexc0x9f02fgdvj.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 «
25 15 19 0 18 3 24 2 18 3 32 12 23 3 23 0 23 12 25 15 24 0 22 10 30 20 25 20 17 2 30 3 25 16 25 4 26 2 23 4 19 0 19 0 35 15 21 9 25 1 23 15 20 5 23 4 19 15 24 4 17 12 27 2 27 4 18 2 24 4 22 8 26 30 23 6 26 6 25 7 14 4 20 17 26 5 18 0 22 3 25 4 29 15 21 0 25 8 24 10 22 4 22 0 32 6 23 11 31 10 18 0 23 0 19 0 26 0 14 0 27 0 20 0 22 7 24 4 32 12 25 6 21 12 21 10 28 9 24 0 23 16 24 2 21 0 13 0 21 1 17 10 29 14 25 12 16 12 25 12 20 5 25 0 21 4 23 3 21 0 26 3 19 0 20 12 21 12 19 15 14 0 22 8 14 6 20 14 19 5 29 10 25 16 21 4 22 0 15 8 22 12 19 6 28 4 25 20 17 0 21 13 19 0 27 0 29 0 22 0 19 10 20 6 16 16 24 6 17 0 21 4 22 9 26 17 17 12 17 3 19 8 19 3 17 0 27 10 25 3 19 0 16 8 15 0 24 4 15 13 20 12 29 16 19 20 29 20 24 14 24 12 21 15 23 9 23 4 22 8 26 0 22 13 29 0 21 21 22 0 20 1 21 16 18 12 18 2
 
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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Perf[t] = + 22.7825279552759 + 0.155112807490104`Sport `[t] -0.0208146540949295t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)22.78252795527590.74130530.73300
`Sport `0.1551128074901040.0530922.92160.0040360.002018
t-0.02081465409492950.007724-2.69470.0078720.003936


Multiple Linear Regression - Regression Statistics
Multiple R0.302294182368804
R-squared0.0913817726940237
Adjusted R-squared0.0789349476624349
F-TEST (value)7.3417737022981
F-TEST (DF numerator)2
F-TEST (DF denominator)146
p-value0.000915894527868333
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.04369293085108
Sum Squared Residuals2387.31206777619


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12525.0884054135323-0.0884054135322829
21922.7408986470860-3.74089864708604
31823.1854224154614-5.18542241546143
42423.00949495387640.99050504612361
51823.1437931072716-5.14379310727156
63224.51899372058767.48100627941243
72323.1021637990817-0.102163799081706
82322.61601072251650.383989277483535
92324.4565497583028-1.45654975830278
102524.90107352667820.0989264733218362
112422.55356676023171.44643323976832
122224.0838801810378-2.08388018103779
133025.61419360184394.38580639815611
142525.5933789477490-0.593378947748965
151722.7805337588322-5.78053375883217
163022.91483191222737.08516808777266
172524.91048375550380.0895162444962384
182523.02831541152761.97168458847241
192622.69727514245243.30272485754755
202322.98668610333770.0133138966622736
211922.3454202192824-3.34542021928238
221922.3246055651875-3.32460556518745
233524.630483023444110.3695169765559
242123.6789915244085-2.67899152440853
252522.41727441039282.58272558960723
262324.5680390611593-1.56803906115929
272022.9960963321633-2.99609633216332
282322.82016887057830.179831129421709
291924.5055950988745-5.5055950988745
302422.77853956238841.22146043761157
311723.9986273682143-6.99862736821433
322722.42668463921844.57331536078163
332722.71609560010364.28390439989636
341822.3850553310285-4.38505533102851
352422.67446629191381.32553370808622
362223.2741028677793-1.27410286777927
372626.6657699784666-0.665769978466627
382322.92224794460920.0777520553907959
392622.90143329051433.09856670948573
402523.03573144390941.96426855609055
411422.5495783673442-8.5495783673442
422024.5452302106206-4.54523021062063
432622.66306186664453.33693813335555
441821.866683175099-3.86668317509900
452222.3112069434744-0.311206943474386
462522.44550509686962.55449490313044
472924.13093132516584.86906867483423
482121.7834245587193-0.783424558719286
492523.00351236454521.99648763545481
502423.29292332543050.707076674569534
512222.3414318263949-0.341431826394913
522221.70016594233960.299834057660432
533222.61002813318539.38997186681474
542323.3647775165409-0.364777516540852
553123.18885005495587.81114994504418
561821.6169073259599-3.61690732595985
572321.59609267186491.40390732813508
581921.57527801777-2.57527801776999
592621.55446336367514.44553663632494
601421.5336487095801-7.53364870958013
612721.51283405548525.4871659445148
622021.4920194013903-1.49201940139027
632222.5569943997261-0.556994399726071
642422.07084132316081.92915867683917
653223.29092912898678.70907087101327
662522.33943762995122.66056237004882
672123.2492998207969-2.24929982079687
682122.9182595517217-1.91825955172174
692822.74233209013675.2576679098633
702421.32550216863082.67449783136916
712323.7864924343776-0.78649243437757
722421.59409847542122.40590152457881
732121.2630582063460-0.263058206346050
741321.2422435522511-8.24224355225112
752121.3765417056463-0.376541705646295
761722.7517423189623-5.7517423189623
772923.35137889482785.64862110517221
782523.02033862575271.97966137424735
791622.9995239716577-6.99952397165772
802522.97870931756282.02129068243721
812021.8721050110371-1.87210501103713
822521.07572631949173.92427368050832
832121.6753628953572-0.67536289535717
842321.49943543377211.50056456622786
852121.0132823572069-0.0132823572068962
862621.45780612558234.54219387441772
871920.9716530490170-1.97165304901704
882022.8121920848034-2.81219208480335
892122.7913774307084-1.79137743070842
901923.2359011990838-4.23590119908381
911420.8883944326373-6.88839443263732
922222.1084822384632-0.108482238463221
931421.7774419693881-7.77744196938808
942022.997529775214-2.99752977521399
951921.5806998537081-2.58069985370812
962922.33544923706376.66455076293629
972523.24531142790941.75468857209060
982121.3631430839332-0.363143083933229
992220.72187719987791.27812280012212
1001521.9419650057038-6.94196500570379
1012222.5416015815693-0.541601581569271
1021921.5901100825337-2.59011008253372
1032821.25906981345866.74093018654142
1042523.72006007920531.27993992079469
1051720.5969892753083-3.59698927530831
1062122.5926411185847-1.59264111858473
1071920.5553599671184-1.55535996711845
1082720.53454531302356.46545468697648
1092920.51373065892868.48626934107141
1102220.49291600483371.50708399516634
1111922.0232294256398-3.02322942563977
1122021.3819635415844-1.38196354158442
1131622.9122769623905-6.91227696239053
1142421.34033423339462.65966576660543
1151720.388842734359-3.38884273435901
1162120.98847931022450.0115206897755014
1172221.74322869358010.256771306419912
1182622.9633164994063.03668350059401
1191722.1669378078605-5.16693780786054
1201720.7501078863547-3.75010788635468
1211921.5048572697103-2.50485726971027
1221920.7084785781648-1.70847857816482
1231720.2223255015996-3.22232550159958
1242721.75263892240575.24736107759431
1252520.64603461588004.35396538411997
1261920.1598815393148-1.15988153931479
1271621.3799693451407-5.37996934514069
1281520.1182522311249-5.11825223112493
1292420.71788880699043.28211119300958
1301522.0930894203064-7.09308942030642
1312021.9171619587214-1.91716195872139
1322922.51679853458696.48320146541313
1331923.1164351104524-4.11643511045236
1342923.09562045635745.90437954364257
1352422.14412895732191.85587104267812
1362421.81308868824672.18691131175326
1372122.2576124566221-1.25761245662212
1382321.30612095758661.69387904241343
1392320.50974226604112.49025773395888
1402221.10937884190660.890621158093393
1412619.84766172789086.15233827210915
1422221.84331357116730.156686428832732
1432919.8060324197019.19396758029901
1442123.0425867228982-2.04258672289824
1452219.76440311151112.23559688848887
1462019.89870126490630.101298735093697
1472122.2045787231629-1.20457872316293
1481821.5633128391076-3.56331283910759
1491819.9913701101116-1.99137011011162


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.5828006509295990.8343986981408030.417199349070401
70.4355451116442090.8710902232884180.564454888355791
80.2922894297606810.5845788595213620.707710570239319
90.4936546425937050.987309285187410.506345357406295
100.4347225173234760.8694450346469520.565277482676524
110.3478131495692130.6956262991384260.652186850430787
120.3326283542461240.6652567084922480.667371645753876
130.2595402138217240.5190804276434470.740459786178276
140.2435764717303670.4871529434607340.756423528269633
150.2754448075593560.5508896151187120.724555192440644
160.5031825554874220.9936348890251550.496817444512578
170.4406914861212470.8813829722424940.559308513878753
180.3695488837858170.7390977675716330.630451116214183
190.3191779537317170.6383559074634350.680822046268283
200.2638054654569630.5276109309139260.736194534543037
210.2683065454170310.5366130908340620.731693454582969
220.2520613153419560.5041226306839120.747938684658044
230.4464926399634920.8929852799269830.553507360036508
240.4715249689650580.9430499379301150.528475031034942
250.4234578511574940.8469157023149870.576542148842506
260.4335277003563040.8670554007126070.566472299643696
270.4220441406691840.8440882813383680.577955859330816
280.3604932865267590.7209865730535170.639506713473241
290.474680000463560.949360000927120.52531999953644
300.4215995613136520.8431991226273040.578400438686348
310.5494187267075480.9011625465849050.450581273292452
320.5845906251124980.8308187497750040.415409374887502
330.5883233220096580.8233533559806840.411676677990342
340.5934575276852620.8130849446294770.406542472314738
350.5437070208928560.9125859582142880.456292979107144
360.493847671631310.987695343262620.50615232836869
370.4476398753618590.8952797507237190.552360124638141
380.3930957519037370.7861915038074750.606904248096263
390.3708819175804910.7417638351609830.629118082419509
400.3293098942811710.6586197885623420.670690105718829
410.5043657114235130.9912685771529740.495634288576487
420.515304548026140.969390903947720.48469545197386
430.5079235622890560.9841528754218880.492076437710944
440.4920490027502440.9840980055004870.507950997249756
450.4415491755595160.8830983511190310.558450824440484
460.4178288734254810.8356577468509620.582171126574519
470.4357649656155530.8715299312311060.564235034384447
480.3872144900474030.7744289800948070.612785509952597
490.3493973300916590.6987946601833180.650602669908341
500.3039315271587610.6078630543175220.696068472841239
510.2613326097934510.5226652195869020.738667390206549
520.2223349736462670.4446699472925330.777665026353733
530.3986320158345740.7972640316691490.601367984165426
540.3547908971782090.7095817943564190.645209102821791
550.4591130844647110.9182261689294230.540886915535289
560.4584042418209770.9168084836419530.541595758179023
570.4134746130258870.8269492260517730.586525386974113
580.3901607617817510.7803215235635020.609839238218249
590.3917984786743150.7835969573486290.608201521325685
600.5212739887756420.9574520224487170.478726011224358
610.5527104377389680.8945791245220640.447289562261032
620.5139464052985380.9721071894029240.486053594701462
630.469698853144490.939397706288980.53030114685551
640.4298254123915610.8596508247831230.570174587608439
650.5786690410250920.8426619179498160.421330958974908
660.5496674091560330.9006651816879350.450332590843967
670.5319754076657800.936049184668440.46802459233422
680.5043029010927180.9913941978145650.495697098907282
690.5343031201502250.931393759699550.465696879849775
700.5077613633989570.9844772732020850.492238636601043
710.4759631181208450.951926236241690.524036881879155
720.4481075937603810.8962151875207620.551892406239619
730.4047822046118210.8095644092236420.595217795388179
740.5553087266414840.8893825467170330.444691273358516
750.509265286027010.981469427945980.49073471397299
760.5585951603934340.8828096792131330.441404839606566
770.6151467141542510.7697065716914980.384853285845749
780.5913358223282220.8173283553435560.408664177671778
790.6720974269421380.6558051461157240.327902573057862
800.6496218308308780.7007563383382440.350378169169122
810.6120207130698510.7759585738602980.387979286930149
820.6167714245830230.7664571508339530.383228575416977
830.5722396096435190.8555207807129630.427760390356481
840.5373839246471470.9252321507057070.462616075352853
850.4908885745615660.9817771491231320.509111425438434
860.5221107917781250.955778416443750.477889208221875
870.4817649550690260.9635299101380510.518235044930974
880.4529378954270580.9058757908541150.547062104572942
890.4138580264987720.8277160529975440.586141973501228
900.4038530964959240.8077061929918480.596146903504076
910.4752965204528670.9505930409057340.524703479547133
920.4284954639457170.8569909278914350.571504536054283
930.536464374469230.927071251061540.46353562553077
940.5042290639447290.9915418721105410.495770936055271
950.4713763728874380.9427527457748760.528623627112562
960.5756417853780960.8487164292438080.424358214621904
970.5520773301604640.8958453396790730.447922669839536
980.5020468907930350.995906218413930.497953109206965
990.4591360046895300.9182720093790600.54086399531047
1000.5323811844464610.9352376311070790.467618815553539
1010.4817609155259960.9635218310519920.518239084474004
1020.4471248050892850.894249610178570.552875194910715
1030.548032484170710.9039350316585810.451967515829290
1040.5253969577703640.9492060844592710.474603042229636
1050.5112458078349670.9775083843300670.488754192165033
1060.4607047242794250.921409448558850.539295275720575
1070.4179132718044980.8358265436089960.582086728195502
1080.4990707154077490.9981414308154990.500929284592251
1090.7075477858190230.5849044283619540.292452214180977
1100.6791320970014680.6417358059970630.320867902998532
1110.6376994510513640.7246010978972720.362300548948636
1120.5854714092592990.8290571814814020.414528590740701
1130.6326490711305580.7347018577388830.367350928869442
1140.623252053980050.7534958920399010.376747946019951
1150.5908498454119680.8183003091760650.409150154588032
1160.5355562322749230.9288875354501540.464443767725077
1170.4829143982368160.9658287964736310.517085601763184
1180.5054687992688970.9890624014622060.494531200731103
1190.4955568781532980.9911137563065970.504443121846702
1200.4713935026153330.9427870052306670.528606497384667
1210.4240332800153230.8480665600306460.575966719984677
1220.3745399969262540.7490799938525090.625460003073746
1230.3715823024238150.7431646048476310.628417697576185
1240.4123242474115860.8246484948231720.587675752588414
1250.4201323442834970.8402646885669930.579867655716503
1260.3612265781142740.7224531562285470.638773421885726
1270.4083945019520690.8167890039041380.591605498047931
1280.6034661206198090.7930677587603830.396533879380191
1290.5394462019823140.9211075960353710.460553798017686
1300.8508228842329820.2983542315340350.149177115767018
1310.919345669959570.1613086600808600.0806543300404298
1320.9276542481524360.1446915036951290.0723457518475643
1330.9689858911418180.06202821771636350.0310141088581817
1340.985983397279290.02803320544141990.0140166027207099
1350.9739097454039270.0521805091921460.026090254596073
1360.953392044500690.09321591099862240.0466079554993112
1370.9421612016379870.1156775967240260.0578387983620128
1380.9149570712157850.1700858575684310.0850429287842153
1390.9004233350777020.1991533298445960.0995766649222979
1400.9232280111536250.1535439776927510.0767719888463754
1410.866803378991950.2663932420161010.133196621008050
1420.8699497163824380.2601005672351240.130050283617562
1430.969176415719170.06164716856166020.0308235842808301


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level10.0072463768115942OK
10% type I error level50.036231884057971OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/100ruq1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/100ruq1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/1mzwh1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/1mzwh1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/2mzwh1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/2mzwh1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/3mzwh1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/3mzwh1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/4wqe21289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/4wqe21289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/5wqe21289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/5wqe21289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/6wqe21289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/6wqe21289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/7phdn1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/7phdn1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/8phdn1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/8phdn1289901416.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/90ruq1289901416.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289902873eexc0x9f02fgdvj/90ruq1289901416.ps (open in new window)


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