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:22:57 +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/t1289899337826rk5ye5exeo1g.htm/, Retrieved Tue, 16 Nov 2010 10:22:20 +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/t1289899337826rk5ye5exeo1g.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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
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.0208146540949294t + 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.02081465409492940.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.0884054135325-0.088405413532502
21922.740898647086-3.74089864708604
31823.1854224154614-5.18542241546142
42423.00949495387640.990505046123614
51823.1437931072716-5.14379310727156
63224.51899372058767.48100627941244
72323.1021637990817-0.102163799081701
82322.61601072251650.383989277483539
92324.4565497583028-1.45654975830277
102524.90107352667820.0989264733218449
112422.55356676023171.44643323976833
122224.0838801810378-2.08388018103778
133025.61419360184394.38580639815612
142525.593378947749-0.593378947748955
151722.7805337588322-5.78053375883216
163022.91483191222737.08516808777266
172524.91048375550380.0895162444962468
182523.02831541152761.97168458847242
192622.69727514245243.30272485754756
202322.98668610333770.0133138966622778
211922.3454202192824-3.34542021928238
221922.3246055651875-3.32460556518745
233524.630483023444110.3695169765559
242123.6789915244085-2.67899152440852
252522.41727441039282.58272558960723
262324.5680390611593-1.56803906115928
272022.9960963321633-2.99609633216332
282322.82016887057830.179831129421713
291924.5055950988745-5.5055950988745
302422.77853956238841.22146043761157
311723.9986273682143-6.99862736821433
322722.42668463921844.57331536078164
332722.71609560010364.28390439989636
341822.3850553310285-4.3850553310285
352422.67446629191381.32553370808622
362223.2741028677793-1.27410286777927
372626.6657699784666-0.665769978466615
382322.92224794460920.0777520553907997
392622.90143329051433.09856670948573
402523.03573144390941.96426855609056
411422.5495783673442-8.5495783673442
422024.5452302106206-4.54523021062062
432622.66306186664453.33693813335555
441821.866683175099-3.866683175099
452222.3112069434744-0.311206943474384
462522.44550509686962.55449490313044
472924.13093132516584.86906867483423
482121.7834245587193-0.783424558719285
492523.00351236454521.99648763545482
502423.29292332543050.707076674569538
512222.3414318263949-0.341431826394911
522221.70016594233960.299834057660432
533222.61002813318539.38997186681474
542323.3647775165408-0.364777516540848
553123.18885005495587.81114994504419
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.556994399726069
642422.07084132316081.92915867683917
653223.29092912898678.70907087101327
662522.33943762995122.66056237004882
672123.2492998207969-2.24929982079687
682122.9182595517217-1.91825955172173
692822.74233209013675.2576679098633
702421.32550216863082.67449783136916
712323.7864924343776-0.786492434377566
722421.59409847542122.40590152457881
732121.263058206346-0.26305820634605
741321.2422435522511-8.24224355225112
752121.3765417056463-0.376541705646295
761722.7517423189623-5.7517423189623
772923.35137889482785.64862110517222
782523.02033862575261.97966137424735
791622.9995239716577-6.99952397165772
802522.97870931756282.02129068243721
812021.8721050110371-1.87210501103713
822521.07572631949173.92427368050831
832121.6753628953572-0.67536289535717
842321.49943543377211.50056456622786
852121.0132823572069-0.0132823572068975
862621.45780612558234.54219387441772
871920.971653049017-1.97165304901704
882022.8121920848034-2.81219208480335
892122.7913774307084-1.79137743070842
901923.2359011990838-4.2359011990838
911420.8883944326373-6.88839443263732
922222.1084822384632-0.10848223846322
931421.7774419693881-7.77744196938808
942022.997529775214-2.99752977521398
951921.5806998537081-2.58069985370812
962922.33544923706376.66455076293629
972523.24531142790941.7546885720906
982121.3631430839332-0.36314308393323
992220.72187719987791.27812280012211
1001521.9419650057038-6.94196500570378
1012222.5416015815693-0.54160158156927
1021921.5901100825337-2.59011008253372
1032821.25906981345866.74093018654142
1042523.72006007920531.27993992079469
1051720.5969892753083-3.59698927530831
1062122.5926411185847-1.59264111858473
1071920.5553599671185-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.38884273435902
1162120.98847931022450.0115206897754997
1172221.74322869358010.256771306419911
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.646034615884.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.890621158093391
1412619.84766172789096.15233827210915
1422221.84331357116730.156686428832732
1432919.8060324197019.193967580299
1442123.0425867228982-2.04258672289824
1452219.76440311151112.23559688848887
1462019.89870126490630.101298735093692
1472122.2045787231629-1.20457872316293
1481821.5633128391076-3.56331283910759
1491819.9913701101116-1.99137011011162


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.5828006509295980.8343986981408030.417199349070402
70.4355451116442090.8710902232884180.564454888355791
80.2922894297606810.5845788595213610.70771057023932
90.4936546425937050.987309285187410.506345357406295
100.4347225173234750.869445034646950.565277482676525
110.3478131495692140.6956262991384270.652186850430786
120.3326283542461240.6652567084922470.667371645753876
130.2595402138217240.5190804276434470.740459786178276
140.2435764717303670.4871529434607340.756423528269633
150.2754448075593560.5508896151187120.724555192440644
160.5031825554874240.9936348890251520.496817444512576
170.4406914861212470.8813829722424940.559308513878753
180.3695488837858150.739097767571630.630451116214185
190.3191779537317180.6383559074634350.680822046268282
200.2638054654569640.5276109309139270.736194534543036
210.2683065454170320.5366130908340640.731693454582968
220.2520613153419550.504122630683910.747938684658045
230.4464926399634920.8929852799269840.553507360036508
240.4715249689650590.9430499379301180.528475031034941
250.4234578511574940.8469157023149880.576542148842506
260.4335277003563050.867055400712610.566472299643695
270.4220441406691840.8440882813383680.577955859330816
280.3604932865267590.7209865730535190.639506713473241
290.4746800004635610.9493600009271210.525319999536439
300.4215995613136520.8431991226273050.578400438686348
310.5494187267075460.9011625465849080.450581273292454
320.5845906251124950.8308187497750090.415409374887505
330.5883233220096570.8233533559806850.411676677990343
340.5934575276852610.8130849446294780.406542472314739
350.5437070208928550.912585958214290.456292979107145
360.4938476716313110.9876953432626220.506152328368689
370.447639875361860.8952797507237190.55236012463814
380.3930957519037370.7861915038074730.606904248096263
390.3708819175804910.7417638351609820.629118082419509
400.3293098942811720.6586197885623440.670690105718828
410.5043657114235140.9912685771529730.495634288576486
420.515304548026140.969390903947720.48469545197386
430.5079235622890590.9841528754218830.492076437710941
440.4920490027502440.9840980055004880.507950997249756
450.4415491755595150.883098351119030.558450824440485
460.4178288734254810.8356577468509620.582171126574519
470.4357649656155520.8715299312311050.564235034384448
480.3872144900474030.7744289800948060.612785509952597
490.3493973300916590.6987946601833190.65060266990834
500.3039315271587610.6078630543175220.696068472841239
510.2613326097934510.5226652195869010.738667390206549
520.2223349736462720.4446699472925440.777665026353728
530.3986320158345750.797264031669150.601367984165425
540.3547908971782090.7095817943564180.645209102821791
550.459113084464710.918226168929420.54088691553529
560.4584042418209770.9168084836419530.541595758179024
570.4134746130258860.8269492260517720.586525386974114
580.3901607617817520.7803215235635040.609839238218248
590.3917984786743140.7835969573486290.608201521325686
600.5212739887756410.9574520224487170.478726011224359
610.5527104377389660.8945791245220680.447289562261034
620.5139464052985360.9721071894029280.486053594701464
630.4696988531444910.9393977062889820.530301146855509
640.4298254123915620.8596508247831240.570174587608438
650.5786690410250910.8426619179498190.421330958974909
660.5496674091560330.9006651816879340.450332590843967
670.5319754076657790.9360491846684420.468024592334221
680.5043029010927160.9913941978145680.495697098907284
690.5343031201502290.9313937596995430.465696879849772
700.5077613633989590.9844772732020820.492238636601041
710.4759631181208440.9519262362416880.524036881879156
720.4481075937603810.8962151875207620.551892406239619
730.4047822046118220.8095644092236430.595217795388178
740.5553087266414860.8893825467170270.444691273358514
750.509265286027010.981469427945980.49073471397299
760.5585951603934340.8828096792131320.441404839606566
770.615146714154250.76970657169150.38485328584575
780.5913358223282230.8173283553435530.408664177671777
790.6720974269421380.6558051461157250.327902573057862
800.649621830830880.700756338338240.35037816916912
810.6120207130698540.7759585738602920.387979286930146
820.6167714245830220.7664571508339560.383228575416978
830.5722396096435190.8555207807129630.427760390356481
840.5373839246471470.9252321507057060.462616075352853
850.4908885745615670.9817771491231350.509111425438433
860.5221107917781250.955778416443750.477889208221875
870.4817649550690250.963529910138050.518235044930975
880.4529378954270560.9058757908541120.547062104572944
890.4138580264987720.8277160529975440.586141973501228
900.4038530964959240.8077061929918470.596146903504077
910.4752965204528630.9505930409057260.524703479547137
920.4284954639457160.8569909278914330.571504536054284
930.5364643744692290.9270712510615420.463535625530771
940.504229063944730.991541872110540.49577093605527
950.4713763728874380.9427527457748770.528623627112562
960.5756417853780960.8487164292438090.424358214621904
970.5520773301604640.8958453396790720.447922669839536
980.5020468907930350.995906218413930.497953109206965
990.459136004689530.9182720093790590.54086399531047
1000.5323811844464610.9352376311070780.467618815553539
1010.4817609155259980.9635218310519960.518239084474002
1020.4471248050892830.8942496101785650.552875194910717
1030.5480324841707090.9039350316585830.451967515829291
1040.5253969577703640.9492060844592720.474603042229636
1050.5112458078349670.9775083843300660.488754192165033
1060.4607047242794250.921409448558850.539295275720575
1070.41791327180450.8358265436089990.5820867281955
1080.499070715407750.9981414308155010.50092928459225
1090.7075477858190240.5849044283619520.292452214180976
1100.6791320970014690.6417358059970620.320867902998531
1110.6376994510513640.7246010978972710.362300548948636
1120.58547140925930.82905718148140.4145285907407
1130.6326490711305580.7347018577388840.367350928869442
1140.623252053980050.75349589203990.37674794601995
1150.5908498454119680.8183003091760640.409150154588032
1160.5355562322749230.9288875354501540.464443767725077
1170.4829143982368150.9658287964736310.517085601763185
1180.5054687992688970.9890624014622060.494531200731103
1190.4955568781532980.9911137563065950.504443121846702
1200.4713935026153340.9427870052306670.528606497384666
1210.4240332800153230.8480665600306450.575966719984677
1220.3745399969262540.7490799938525070.625460003073746
1230.3715823024238150.743164604847630.628417697576185
1240.4123242474115870.8246484948231730.587675752588414
1250.4201323442834960.8402646885669930.579867655716504
1260.3612265781142730.7224531562285450.638773421885727
1270.4083945019520690.8167890039041370.591605498047931
1280.6034661206198090.7930677587603830.396533879380191
1290.5394462019823150.921107596035370.460553798017685
1300.8508228842329810.2983542315340380.149177115767019
1310.9193456699595720.1613086600808570.0806543300404284
1320.9276542481524340.1446915036951310.0723457518475656
1330.9689858911418180.06202821771636340.0310141088581817
1340.985983397279290.02803320544141990.0140166027207099
1350.9739097454039270.05218050919214590.0260902545960729
1360.9533920445006880.09321591099862310.0466079554993116
1370.9421612016379880.1156775967240250.0578387983620123
1380.9149570712157850.170085857568430.085042928784215
1390.90042333507770.19915332984460.0995766649222998
1400.9232280111536240.1535439776927510.0767719888463756
1410.866803378991950.2663932420161020.133196621008051
1420.8699497163824360.2601005672351280.130050283617564
1430.969176415719170.06164716856165890.0308235842808294


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/t1289899337826rk5ye5exeo1g/10tgr01289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/10tgr01289899365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/15fu61289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/15fu61289899365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/25fu61289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/25fu61289899365.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/70paf1289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/70paf1289899365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/80paf1289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/80paf1289899365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/90paf1289899365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289899337826rk5ye5exeo1g/90paf1289899365.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