Home » date » 2010 » Nov » 30 »

*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, 30 Nov 2010 13:45:53 +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/30/t1291124856ydnzobkecmm18un.htm/, Retrieved Tue, 30 Nov 2010 14:47:52 +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/30/t1291124856ydnzobkecmm18un.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 «
2 12 2 11 2 14 1 12 2 21 2 12 2 22 2 11 2 10 2 13 1 10 2 8 1 15 2 14 2 10 1 14 1 14 2 11 1 10 2 13 1 7 2 14 2 12 2 14 1 11 2 9 1 11 2 15 2 14 1 13 2 9 1 15 2 10 2 11 1 13 1 8 1 20 1 12 2 10 1 10 1 9 2 14 1 8 1 14 2 11 2 13 2 9 2 11 2 15 1 11 2 10 1 14 1 18 2 14 1 11 2 12 2 13 2 9 1 10 2 15 1 20 1 12 2 12 2 14 2 13 1 11 2 17 1 12 2 13 1 14 1 13 2 15 2 13 1 10 1 11 2 19 2 13 2 17 1 13 1 9 1 11 1 10 2 9 1 12 2 12 2 13 1 13 2 12 2 15 2 22 2 13 2 15 2 13 2 15 2 10 2 11 2 16 2 11 1 11 1 10 2 10 1 16 2 12 1 11 2 16 1 19 2 11 1 16 1 15 2 24 2 14 2 15 2 11 1 15 2 12 1 10 2 14 2 13 2 9 2 15 2 15 2 14 2 11 2 8 2 11 2 11 1 8 2 10 2 11 2 13 1 11 1 20 2 10 1 15 1 12 2 14 1 23 1 14 2 16 2 11 1 12 2 10 1 14 2 12 1 12 2 11 2 12 1 13 1 11 1 19 2 12 2 17 1 9 2 12 2 19 2 18 2 15 2 14 2 11 2 9 2 18 2 16
 
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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 12.9137999388331 + 0.323663672507733x[t] + 0.934728575797638M1[t] -0.516961686524345M2[t] -1.87410454366720M3[t] -0.636699995630935M4[t] + 0.91160974204709M5[t] + 1.22044286151192M6[t] -0.898179717499406M7[t] -1.10405174269112M8[t] -1.92307692307692M9[t] -0.71720489788521M10[t] -1.87328251192189M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.91379993883311.21208610.654200
x0.3236636725077330.5061730.63940.5235230.261762
M10.9347285757976381.1924740.78390.4343680.217184
M2-0.5169616865243451.191166-0.4340.6649190.332459
M3-1.874104543667201.191166-1.57330.1177620.058881
M4-0.6366999956309351.192474-0.53390.5941840.297092
M50.911609742047091.1911660.76530.4452980.222649
M61.220442861511921.1924741.02350.3077520.153876
M7-0.8981797174994061.213381-0.74020.4603260.230163
M8-1.104051742691121.215254-0.90850.3650840.182542
M9-1.923076923076921.212756-1.58570.1149260.057463
M10-0.717204897885211.213381-0.59110.5553630.277681
M11-1.873282511921891.215254-1.54150.1253230.062661


Multiple Linear Regression - Regression Statistics
Multiple R0.342663940796646
R-squared0.117418576322287
Adjusted R-squared0.0463381932073034
F-TEST (value)1.65191254150029
F-TEST (DF numerator)12
F-TEST (DF denominator)149
p-value0.083263726308721
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.09193395483857
Sum Squared Residuals1424.44828158147


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11214.4958558596462-2.49585585964622
21113.0441655973242-2.04416559732419
31411.68702274018132.31297725981866
41212.6007636157099-0.600763615709873
52114.47273702589566.52726297410438
61214.7815701453605-2.78157014536045
72212.66294756634919.33705243365087
81112.4570755411574-1.4570755411574
91011.6380503607716-1.63805036077161
101312.84392238596330.156077614036677
111011.3641810994189-1.36418109941890
12813.5611272838485-5.56112728384854
131514.17219218713840.827807812861563
141413.04416559732420.955834402675809
151011.6870227401813-1.68702274018133
161412.60076361570991.39923638429013
171414.1490733533879-0.14907335338789
181114.7815701453605-3.78157014536046
191012.3392838938414-2.33928389384139
201312.45707554115740.542924458842584
21711.3143866882639-4.31438668826388
221412.84392238596331.15607761403668
231211.68784477192660.312155228073354
241413.56112728384850.438872716151467
251114.1721921871384-3.17219218713844
26913.0441655973242-4.04416559732419
271111.3633590676736-0.3633590676736
281512.92442728821762.0755727117824
291414.4727370258956-0.472737025895624
301314.4579064728527-1.45790647285272
31912.6629475663491-3.66294756634912
321512.13341186864972.86658813135032
331011.6380503607716-1.63805036077161
341112.8439223859633-1.84392238596332
351311.36418109941891.63581890058109
36813.2374636113408-5.2374636113408
372014.17219218713845.82780781286156
381212.7205019248165-0.720501924816458
391011.6870227401813-1.68702274018133
401012.6007636157099-2.60076361570987
41914.1490733533879-5.14907335338789
421414.7815701453605-0.781570145360455
43812.3392838938414-4.33928389384139
441412.13341186864971.86658813135032
451111.6380503607716-0.63805036077161
461312.84392238596330.156077614036678
47911.6878447719266-2.68784477192664
481113.5611272838485-2.56112728384853
491514.49585585964620.504144140353831
501112.7205019248165-1.72050192481646
511011.6870227401813-1.68702274018133
521412.60076361570991.39923638429013
531814.14907335338793.85092664661211
541414.7815701453605-0.781570145360455
551112.3392838938414-1.33928389384139
561212.4570755411574-0.457075541157416
571311.63805036077161.36194963922839
58912.8439223859633-3.84392238596332
591011.3641810994189-1.36418109941891
601513.56112728384851.43887271615147
612014.17219218713845.82780781286156
621212.7205019248165-0.720501924816458
631211.68702274018130.312977259818668
641412.92442728821761.07557271178240
651314.4727370258956-1.47273702589562
661114.4579064728527-3.45790647285272
671712.66294756634914.33705243365087
681212.1334118686497-0.133411868649683
691311.63805036077161.36194963922839
701412.52025871345561.47974128654441
711311.36418109941891.63581890058109
721513.56112728384851.43887271615147
731314.4958558596462-1.49585585964617
741012.7205019248165-2.72050192481646
751111.3633590676736-0.3633590676736
761912.92442728821766.0755727117824
771314.4727370258956-1.47273702589562
781714.78157014536052.21842985463954
791312.33928389384140.660716106158607
80912.1334118686497-3.13341186864968
811111.3143866882639-0.314386688263877
821012.5202587134556-2.52025871345559
83911.6878447719266-2.68784477192664
841213.2374636113408-1.2374636113408
851214.4958558596462-2.49585585964617
861313.0441655973242-0.0441655973241913
871311.36335906767361.63664093232640
881212.9244272882176-0.924427288217599
891514.47273702589560.527262974104376
902214.78157014536057.21842985463954
911312.66294756634910.337052433650874
921512.45707554115742.54292445884258
931311.63805036077161.36194963922839
941512.84392238596332.15607761403668
951011.6878447719266-1.68784477192665
961113.5611272838485-2.56112728384853
971614.49585585964621.50414414035383
981113.0441655973242-2.04416559732419
991111.3633590676736-0.3633590676736
1001012.6007636157099-2.60076361570987
1011014.4727370258956-4.47273702589563
1021614.45790647285271.54209352714728
1031212.6629475663491-0.662947566349126
1041112.1334118686497-1.13341186864968
1051611.63805036077164.36194963922839
1061912.52025871345566.47974128654441
1071111.6878447719266-0.687844771926646
1081613.23746361134082.7625363886592
1091514.17219218713840.827807812861564
1102413.044165597324210.9558344026758
1111411.68702274018132.31297725981867
1121512.92442728821762.0755727117824
1131114.4727370258956-3.47273702589562
1141514.45790647285270.542093527147277
1151212.6629475663491-0.662947566349126
1161012.1334118686497-2.13341186864968
1171411.63805036077162.36194963922839
1181312.84392238596330.156077614036678
119911.6878447719266-2.68784477192664
1201513.56112728384851.43887271615147
1211514.49585585964620.504144140353831
1221413.04416559732420.955834402675809
1231111.6870227401813-0.687022740181332
124812.9244272882176-4.9244272882176
1251114.4727370258956-3.47273702589562
1261114.7815701453605-3.78157014536046
127812.3392838938414-4.33928389384139
1281012.4570755411574-2.45707554115742
1291111.6380503607716-0.63805036077161
1301312.84392238596330.156077614036678
1311111.3641810994189-0.364181099418912
1322013.23746361134086.7625363886592
1331014.4958558596462-4.49585585964617
1341512.72050192481652.27949807518354
1351211.36335906767360.636640932326403
1361412.92442728821761.07557271178240
1372314.14907335338798.85092664661211
1381414.4579064728527-0.457906472852723
1391612.66294756634913.33705243365087
1401112.4570755411574-1.45707554115742
1411211.31438668826390.685613311736124
1421012.8439223859633-2.84392238596332
1431411.36418109941892.63581890058109
1441213.5611272838485-1.56112728384853
1451214.1721921871384-2.17219218713844
1461113.0441655973242-2.04416559732419
1471211.68702274018130.312977259818668
1481312.60076361570990.399236384290135
1491114.1490733533879-3.14907335338789
1501914.45790647285274.54209352714728
1511212.6629475663491-0.662947566349126
1521712.45707554115744.54292445884258
153911.3143866882639-2.31438668826387
1541212.8439223859633-0.843922385963322
1551911.68784477192667.31215522807335
1561813.56112728384854.43887271615147
1571514.49585585964620.504144140353831
1581413.04416559732420.955834402675809
1591111.6870227401813-0.687022740181332
160912.9244272882176-3.9244272882176
1611814.47273702589563.52726297410438
1621614.78157014536051.21842985463954


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.3377808310632680.6755616621265350.662219168936732
170.628718567486920.742562865026160.37128143251308
180.5016714246458150.996657150708370.498328575354185
190.7529447535436120.4941104929127750.247055246456388
200.6725125195629350.6549749608741310.327487480437065
210.6033871538594920.7932256922810150.396612846140508
220.5073178690801620.9853642618396770.492682130919838
230.4392151749657810.8784303499315630.560784825034219
240.5154518784970940.9690962430058120.484548121502906
250.4360906677703130.8721813355406260.563909332229687
260.4359205028785430.8718410057570860.564079497121457
270.4010712755026980.8021425510053970.598928724497302
280.3393310069606930.6786620139213850.660668993039307
290.3951896229987650.7903792459975290.604810377001235
300.4072514984387980.8145029968775970.592748501561202
310.6265732651292180.7468534697415640.373426734870782
320.642923608584310.714152782831380.35707639141569
330.5844735139937870.8310529720124250.415526486006213
340.5444964242050120.9110071515899760.455503575794988
350.5060742974475690.9878514051048630.493925702552431
360.493264775391860.986529550783720.50673522460814
370.6987939661251030.6024120677497940.301206033874897
380.6526544357342380.6946911285315250.347345564265762
390.6109227948948860.7781544102102290.389077205105114
400.6008286462995870.7983427074008260.399171353700413
410.7165864351758490.5668271296483020.283413564824151
420.6744861420632320.6510277158735350.325513857936768
430.7105584241999650.5788831516000710.289441575800035
440.6770484320753570.6459031358492870.322951567924643
450.633363469074160.733273061851680.36663653092584
460.5789018617360570.8421962765278860.421098138263943
470.5761139688131670.8477720623736650.423886031186833
480.5424563277094790.9150873445810420.457543672290521
490.4886287724457940.9772575448915880.511371227554206
500.4444235729958580.8888471459917150.555576427004142
510.4041633955622370.8083267911244740.595836604437763
520.3629739547675780.7259479095351560.637026045232422
530.3906042870655070.7812085741310150.609395712934493
540.3492412912187750.698482582437550.650758708781225
550.30589629935930.61179259871860.6941037006407
560.2698594733627230.5397189467254460.730140526637277
570.2552027182822650.510405436564530.744797281717735
580.272835091283840.545670182567680.72716490871616
590.2353397981588790.4706795963177580.764660201841121
600.2438892764068920.4877785528137840.756110723593108
610.3559629702631770.7119259405263540.644037029736823
620.3173776924947380.6347553849894770.682622307505262
630.2749698060409540.5499396120819080.725030193959046
640.2366678112145530.4733356224291050.763332188785448
650.2178450206146320.4356900412292640.782154979385368
660.2145051687113060.4290103374226120.785494831288694
670.2475458356428650.4950916712857290.752454164357135
680.2099809742593450.4199619485186890.790019025740655
690.1890682722364640.3781365444729270.810931727763536
700.1757813229970550.351562645994110.824218677002945
710.1588079387923010.3176158775846020.841192061207699
720.1512807692633820.3025615385267640.848719230736618
730.1393438711743690.2786877423487380.860656128825631
740.1322527637733570.2645055275467130.867747236226643
750.1087229554036450.2174459108072890.891277044596355
760.1806193370739860.3612386741479730.819380662926014
770.1606660662468380.3213321324936760.839333933753162
780.1598692743490170.3197385486980330.840130725650983
790.1334193005211720.2668386010423440.866580699478828
800.1336336426287670.2672672852575350.866366357371233
810.1130711174592370.2261422349184740.886928882540763
820.1057011821841060.2114023643682110.894298817815894
830.1029565245180730.2059130490361450.897043475481927
840.0935387451275040.1870774902550080.906461254872496
850.09046501564839780.1809300312967960.909534984351602
860.07570911022808650.1514182204561730.924290889771914
870.06530868230892650.1306173646178530.934691317691073
880.05550254899733150.1110050979946630.944497451002668
890.04363300025306590.08726600050613170.956366999746934
900.1303034346250500.2606068692501010.86969656537495
910.1074272913971070.2148545827942130.892572708602893
920.1014805805459390.2029611610918780.898519419454061
930.08539121501848020.1707824300369600.91460878498152
940.07552704124483360.1510540824896670.924472958755166
950.06521150132613240.1304230026522650.934788498673868
960.0680896452146740.1361792904293480.931910354785326
970.05863700174942330.1172740034988470.941362998250577
980.0584573592810550.116914718562110.941542640718945
990.04642281482084870.09284562964169740.953577185179151
1000.04302377221892140.08604754443784270.956976227781079
1010.05653455400500870.1130691080100170.943465445994991
1020.04686829822082900.09373659644165810.953131701779171
1030.03645387075990230.07290774151980470.963546129240098
1040.02865160867870330.05730321735740660.971348391321297
1050.03801256227884130.07602512455768260.961987437721159
1060.081795382388860.163590764777720.91820461761114
1070.06765039151960080.1353007830392020.9323496084804
1080.06420012522483450.1284002504496690.935799874775165
1090.05176733827199020.1035346765439800.94823266172801
1100.3524293903571950.704858780714390.647570609642805
1110.3287149542613490.6574299085226990.671285045738651
1120.3280841444514770.6561682889029540.671915855548523
1130.3525768443936720.7051536887873440.647423155606328
1140.3042559743341590.6085119486683170.695744025665841
1150.2589144217909440.5178288435818890.741085578209056
1160.2421363987004410.4842727974008810.75786360129956
1170.2376498908198950.475299781639790.762350109180105
1180.1998275200342230.3996550400684460.800172479965777
1190.2253158255561310.4506316511122620.77468417444387
1200.1948347208640860.3896694417281710.805165279135914
1210.1729452972758480.3458905945516950.827054702724152
1220.1395997218923540.2791994437847080.860400278107646
1230.1098595615149410.2197191230298810.89014043848506
1240.1255228657584270.2510457315168550.874477134241573
1250.1725056565886980.3450113131773960.827494343411302
1260.2163552717335910.4327105434671830.783644728266409
1270.2749773100186620.5499546200373240.725022689981338
1280.274358510679440.548717021358880.72564148932056
1290.2234194979479990.4468389958959980.776580502052001
1300.1855769648482260.3711539296964510.814423035151774
1310.2245636871448470.4491273742896940.775436312855153
1320.2872387792915420.5744775585830830.712761220708458
1330.2901001535624080.5802003071248160.709899846437592
1340.2638148630070560.5276297260141120.736185136992944
1350.2111697202500860.4223394405001720.788830279749914
1360.1755549129681050.3511098259362090.824445087031895
1370.525507001933660.948985996132680.47449299806634
1380.4744753858022940.9489507716045880.525524614197706
1390.4598484128130280.9196968256260560.540151587186972
1400.5330887695460920.9338224609078170.466911230453909
1410.4750373168360130.9500746336720260.524962683163987
1420.3926212152112660.7852424304225330.607378784788734
1430.3601571408491690.7203142816983390.639842859150831
1440.4450097336761950.890019467352390.554990266323805
1450.3527033109000120.7054066218000250.647296689099988
1460.2666719887122010.5333439774244010.7333280112878


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level70.0534351145038168OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/1076je1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/1076je1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/10n4k1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/10n4k1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/20n4k1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/20n4k1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/3seln1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/3seln1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/4seln1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/4seln1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/5seln1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/5seln1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/63nk81291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/63nk81291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/73nk81291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/73nk81291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/8ee1s1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/8ee1s1291124741.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/9ee1s1291124741.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124856ydnzobkecmm18un/9ee1s1291124741.ps (open in new window)


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