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 08:42:30 +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/t1289897053zkqmmlh8l9u333i.htm/, Retrieved Tue, 16 Nov 2010 09:44:16 +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/t1289897053zkqmmlh8l9u333i.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 «
18 15 15 0 17 3 21 2 22 3 24 12 17 3 25 0 16 12 18 15 21 0 19 10 18 20 20 20 25 2 28 3 19 16 20 4 25 2 20 4 21 0 21 0 23 15 19 9 23 1 20 15 19 5 17 4 19 15 21 4 18 12 18 2 24 4 22 2 20 4 17 8 25 30 24 6 18 6 21 7 13 4 21 17 21 5 16 0 18 3 19 4 22 15 18 0 18 8 20 10 19 4 18 0 20 6 20 11 23 10 17 0 17 0 18 0 22 0 16 0 18 0 14 0 13 7 21 4 25 12 16 6 17 12 22 10 24 9 18 0 18 16 18 2 19 0 15 0 25 1 22 10 15 14 21 12 16 12 23 12 20 5 19 0 20 4 18 3 18 0 20 3 20 0 16 12 18 12 18 15 16 0 23 8 14 6 21 14 13 5 27 10 20 16 22 4 21 0 19 8 22 12 12 6 28 4 21 20 18 0 21 13 19 0 23 0 21 0 21 0 22 10 18 6 15 16 23 6 24 0 18 4 15 9 19 17 17 12 14 3 16 8 22 3 15 0 23 10 24 3 24 0 20 8 9 0 23 4 18 13 20 12 25 16 17 20 21 20 26 14 20 12 21 15 15 9 20 4 20 8 16 0 19 13 22 0 17 21 25 0 19 1 17 16 21 12 12 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 time9 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] = + 19.2989199323664 + 0.0380163102865228`Sport `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)19.29891993236640.4119946.843100
`Sport `0.03801631028652280.0439960.86410.3889440.194472


Multiple Linear Regression - Regression Statistics
Multiple R0.0710889771773798
R-squared0.00505364267612603
Adjusted R-squared-0.00171469989070294
F-TEST (value)0.746658820269144
F-TEST (DF numerator)1
F-TEST (DF denominator)147
p-value0.388943910291832
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.36064818342967
Sum Squared Residuals1660.21156328


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11819.8691645866642-1.86916458666418
21519.2989199323664-4.29891993236637
31719.4129688632259-2.41296886322594
42119.37495255293941.62504744706058
52219.41296886322592.58703113677406
62419.75511565580464.24488434419535
71719.4129688632259-2.41296886322594
82519.29891993236645.70108006763363
91619.7551156558046-3.75511565580464
101819.8691645866642-1.86916458666421
112119.29891993236641.70108006763363
121919.6790830352316-0.6790830352316
131820.0592461380968-2.05924613809683
142020.0592461380968-0.0592461380968274
152519.37495255293945.62504744706058
162819.41296886322598.58703113677406
171919.9071808969507-0.907180896950736
182019.45098517351250.549014826487537
192519.37495255293945.62504744706058
202019.45098517351250.549014826487537
212119.29891993236641.70108006763363
222119.29891993236641.70108006763363
232319.86916458666423.13083541333579
241919.6410667249451-0.641066724945077
252319.33693624265293.66306375734711
262019.86916458666420.130835413335786
271919.489001483799-0.489001483798986
281719.4509851735125-2.45098517351246
291919.8691645866642-0.869164586664213
302119.45098517351251.54901482648754
311819.7551156558046-1.75511565580465
321819.3749525529394-1.37495255293942
332419.45098517351254.54901482648754
342219.37495255293942.62504744706058
352019.45098517351250.549014826487537
361719.6030504146586-2.60305041465855
372520.43940924096214.56059075903794
382419.52701779408554.47298220591449
391819.5270177940855-1.52701779408551
402119.5650341043721.43496589562797
411319.4509851735125-6.45098517351246
422119.94519720723731.05480279276274
432119.4890014837991.51099851620101
441619.2989199323664-3.29891993236637
451819.4129688632259-1.41296886322594
461919.4509851735125-0.450985173512463
472219.86916458666422.13083541333579
481819.2989199323664-1.29891993236637
491819.6030504146586-1.60305041465855
502019.67908303523160.3209169647684
511919.4509851735125-0.450985173512463
521819.2989199323664-1.29891993236637
532019.52701779408550.472982205914491
542019.71709934551810.282900654481878
552319.67908303523163.3209169647684
561719.2989199323664-2.29891993236637
571719.2989199323664-2.29891993236637
581819.2989199323664-1.29891993236637
592219.29891993236642.70108006763363
601619.2989199323664-3.29891993236637
611819.2989199323664-1.29891993236637
621419.2989199323664-5.29891993236637
631319.565034104372-6.56503410437203
642119.45098517351251.54901482648754
652519.75511565580465.24488434419535
661619.5270177940855-3.52701779408551
671719.7551156558046-2.75511565580464
682219.67908303523162.3209169647684
692419.64106672494514.35893327505492
701819.2989199323664-1.29891993236637
711819.9071808969507-1.90718089695074
721819.3749525529394-1.37495255293942
731919.2989199323664-0.298919932366372
741519.2989199323664-4.29891993236637
752519.33693624265295.6630637573471
762219.67908303523162.3209169647684
771519.8311482763777-4.83114827637769
782119.75511565580461.24488434419535
791619.7551156558046-3.75511565580464
802319.75511565580463.24488434419536
812019.4890014837990.510998516201014
821919.2989199323664-0.298919932366372
832019.45098517351250.549014826487537
841819.4129688632259-1.41296886322594
851819.2989199323664-1.29891993236637
862019.41296886322590.58703113677406
872019.29891993236640.701080067633628
881619.7551156558046-3.75511565580464
891819.7551156558046-1.75511565580465
901819.8691645866642-1.86916458666421
911619.2989199323664-3.29891993236637
922319.60305041465863.39694958534145
931419.5270177940855-5.52701779408551
942119.83114827637771.16885172362231
951319.489001483799-6.48900148379899
962719.67908303523167.3209169647684
972019.90718089695070.0928191030492637
982219.45098517351252.54901482648754
992119.29891993236641.70108006763363
1001919.6030504146586-0.603050414658554
1012219.75511565580462.24488434419536
1021219.5270177940855-7.52701779408551
1032819.45098517351258.54901482648754
1042120.05924613809680.940753861903173
1051819.2989199323664-1.29891993236637
1062119.79313196609121.20686803390883
1071919.2989199323664-0.298919932366372
1082319.29891993236643.70108006763363
1092119.29891993236641.70108006763363
1102119.29891993236641.70108006763363
1112219.67908303523162.3209169647684
1121819.5270177940855-1.52701779408551
1131519.9071808969507-4.90718089695074
1142319.52701779408553.47298220591449
1152419.29891993236644.70108006763363
1161819.4509851735125-1.45098517351246
1171519.6410667249451-4.64106672494508
1181919.9451972072373-0.94519720723726
1191719.7551156558046-2.75511565580464
1201419.4129688632259-5.41296886322594
1211619.6030504146586-3.60305041465855
1222219.41296886322592.58703113677406
1231519.2989199323664-4.29891993236637
1242319.67908303523163.3209169647684
1252419.41296886322594.58703113677406
1262419.29891993236644.70108006763363
1272019.60305041465860.396949585341446
128919.2989199323664-10.2989199323664
1292319.45098517351253.54901482648754
1301819.7931319660912-1.79313196609117
1312019.75511565580460.244884344195355
1322519.90718089695075.09281910304926
1331720.0592461380968-3.05924613809683
1342120.05924613809680.940753861903173
1352619.83114827637776.16885172362231
1362019.75511565580460.244884344195355
1372119.86916458666421.13083541333579
1381519.6410667249451-4.64106672494508
1392019.45098517351250.549014826487537
1402019.60305041465860.396949585341446
1411619.2989199323664-3.29891993236637
1421919.7931319660912-0.793131966091168
1432219.29891993236642.70108006763363
1441720.0972624483834-3.09726244838335
1452519.29891993236645.70108006763363
1461919.3369362426529-0.336936242652895
1471719.9071808969507-2.90718089695074
1482119.75511565580461.24488434419535
1491219.3749525529394-7.37495255293942


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.5902601852065260.8194796295869490.409739814793474
60.651848060967590.696303878064820.34815193903241
70.5503276000180940.8993447999638130.449672399981906
80.7659961477975290.4680077044049430.234003852202471
90.7647179937806740.4705640124386510.235282006219326
100.6820910644753960.6358178710492080.317908935524604
110.5976173725632070.8047652548735850.402382627436792
120.501305252795260.997389494409480.49869474720474
130.4105968955644580.8211937911289160.589403104435542
140.343616904145180.687233808290360.65638309585482
150.4529665645339740.9059331290679490.547033435466026
160.7460542869544190.5078914260911630.253945713045581
170.680614271641830.638771456716340.31938572835817
180.6130281368055870.7739437263888260.386971863194413
190.6449011014982390.7101977970035230.355098898501761
200.5809330604607890.8381338790784210.419066939539211
210.5156986597656440.9686026804687110.484301340234356
220.4510386861978940.9020773723957880.548961313802106
230.462520334052570.925040668105140.53747966594743
240.4048914470544570.8097828941089130.595108552945543
250.368969929794970.7379398595899410.63103007020503
260.3102145118279510.6204290236559020.689785488172049
270.270185834183610.540371668367220.72981416581639
280.2849737533344370.5699475066688750.715026246665563
290.235411343528490.470822687056980.76458865647151
300.1927138427833970.3854276855667950.807286157216603
310.1643666942209540.3287333884419070.835633305779046
320.1543490088931380.3086980177862750.845650991106862
330.1658108822566990.3316217645133980.834189117743301
340.1394240892517650.278848178503530.860575910748235
350.1111199715731020.2222399431462040.888880028426898
360.1096653062027120.2193306124054230.890334693797288
370.200154281880870.400308563761740.79984571811913
380.2151272246701290.4302544493402590.78487277532987
390.1957508629667990.3915017259335980.804249137033201
400.1626652337641470.3253304675282940.837334766235853
410.3225842739498210.6451685478996410.677415726050179
420.2799480484402550.559896096880510.720051951559745
430.2411652392174530.4823304784349060.758834760782547
440.2627706798954940.5255413597909890.737229320104506
450.2359792016843640.4719584033687280.764020798315636
460.2009095077449010.4018190154898010.7990904922551
470.1780566338487660.3561132676975320.821943366151234
480.1559961647198290.3119923294396590.84400383528017
490.1368402657675890.2736805315351790.86315973423241
500.1108538919791010.2217077839582010.8891461080209
510.09005946177046550.1801189235409310.909940538229534
520.0760673173370690.1521346346741380.923932682662931
530.05971932118104320.1194386423620860.940280678818957
540.04622181692430020.09244363384860050.9537781830757
550.04516265508156490.09032531016312980.954837344918435
560.04132416057713790.08264832115427580.958675839422862
570.03735908958531850.07471817917063710.962640910414681
580.03010874736237430.06021749472474860.969891252637626
590.02693407486564440.05386814973128880.973065925134356
600.02813653715549070.05627307431098140.97186346284451
610.02234457908235180.04468915816470370.977655420917648
620.03605746739928160.07211493479856320.963942532600718
630.07720789873405430.1544157974681090.922792101265946
640.06427085446645250.1285417089329050.935729145533547
650.08767022346127970.1753404469225590.91232977653872
660.09105330538470740.1821066107694150.908946694615293
670.08627861016543470.1725572203308690.913721389834565
680.07641125394074810.1528225078814960.923588746059252
690.08800517215534570.1760103443106910.911994827844654
700.07290835435421210.1458167087084240.927091645645788
710.06351192000985910.1270238400197180.936488079990141
720.05214443810952240.1042888762190450.947855561890478
730.04073176959524680.08146353919049360.959268230404753
740.0478835539489430.0957671078978860.952116446051057
750.07414273670543750.1482854734108750.925857263294563
760.06552716065696920.1310543213139380.934472839343031
770.08434873434413130.1686974686882630.915651265655869
780.06957542774518490.139150855490370.930424572254815
790.07374967509643040.1474993501928610.92625032490357
800.07231954947881160.1446390989576230.927680450521188
810.05771310864765180.1154262172953040.942286891352348
820.04535384903362290.09070769806724570.954646150966377
830.03538845674454230.07077691348908470.964611543255458
840.02841027256339420.05682054512678830.971589727436606
850.0224396358237330.04487927164746610.977560364176267
860.01696369915870620.03392739831741240.983036300841294
870.01272246854916310.02544493709832610.987277531450837
880.0136532324649120.0273064649298240.986346767535088
890.01088861912918130.02177723825836250.989111380870819
900.00871406815491970.01742813630983940.99128593184508
910.008559082547938390.01711816509587680.991440917452062
920.008503712523961180.01700742504792240.991496287476039
930.01416037103904440.02832074207808870.985839628960956
940.0107571411924160.0215142823848320.989242858807584
950.0236798880440480.0473597760880960.976320111955952
960.05939017763702620.1187803552740520.940609822362974
970.04641440426583010.09282880853166030.95358559573417
980.04096818777289450.0819363755457890.959031812227106
990.0332209793786730.0664419587573460.966779020621327
1000.02529576294761830.05059152589523650.974704237052382
1010.02149693417017950.0429938683403590.97850306582982
1020.05917034360348450.1183406872069690.940829656396516
1030.1748878109427220.3497756218854430.825112189057278
1040.148096894643050.29619378928610.85190310535695
1050.1248336759887090.2496673519774170.875166324011291
1060.1041959210478110.2083918420956230.895804078952189
1070.08309683052163420.1661936610432680.916903169478366
1080.0843483453206360.1686966906412720.915651654679364
1090.06988108966578020.139762179331560.93011891033422
1100.05757784056498380.1151556811299680.942422159435016
1110.05062517249677830.1012503449935570.949374827503222
1120.03988482441635860.07976964883271730.960115175583641
1130.04920279412810990.09840558825621980.95079720587189
1140.04993159814408940.09986319628817880.95006840185591
1150.06612229672297970.1322445934459590.93387770327702
1160.05153250772558180.1030650154511640.948467492274418
1170.05955982260535040.1191196452107010.94044017739465
1180.045433133739550.09086626747910.95456686626045
1190.03955093491037460.07910186982074930.960449065089625
1200.05474719641937160.1094943928387430.945252803580628
1210.05454044408490710.1090808881698140.945459555915093
1220.04743451088004230.09486902176008460.952565489119958
1230.05297949757121170.1059589951424230.947020502428788
1240.04984345858111950.0996869171622390.95015654141888
1250.0612316512116120.1224633024232240.938768348788388
1260.08481896550054780.1696379310010960.915181034499452
1270.06337593285680550.1267518657136110.936624067143195
1280.3478060918414390.6956121836828780.652193908158561
1290.3490049172608780.6980098345217550.650995082739122
1300.2996407861359520.5992815722719050.700359213864048
1310.2395610110967790.4791220221935580.760438988903221
1320.3219571192441750.643914238488350.678042880755825
1330.2917090316722180.5834180633444360.708290968327782
1340.2348765789056880.4697531578113760.765123421094312
1350.4520179475301710.9040358950603420.547982052469829
1360.3787653022923350.757530604584670.621234697707665
1370.3470660345498730.6941320690997450.652933965450127
1380.3553539241614030.7107078483228060.644646075838597
1390.27167898707470.5433579741494010.7283210129253
1400.2006561928831160.4013123857662330.799343807116884
1410.1948597497989020.3897194995978050.805140250201098
1420.125055278643590.2501105572871810.87494472135641
1430.08584830444460170.1716966088892030.914151695555398
1440.04364224867700120.08728449735400230.956357751322999


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level130.0928571428571429NOK
10% type I error level380.271428571428571NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289897053zkqmmlh8l9u333i/109x6v1289896937.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289897053zkqmmlh8l9u333i/109x6v1289896937.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/16/t1289897053zkqmmlh8l9u333i/13e921289896937.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/16/t1289897053zkqmmlh8l9u333i/13e921289896937.ps (open in new window)


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


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


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


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


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


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


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


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