Home » date » 2010 » Dec » 01 »

*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: Wed, 01 Dec 2010 10:51:41 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b.htm/, Retrieved Wed, 01 Dec 2010 11:51:28 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b.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 «
5 22 0 15 4 2 1 0 7 0 0 3 7 4 0 2 5 14 5 3 5 2 0 12 4 0 4 3 4 4 4 0 6 6 0 12 5 25 0 15 1 0 0 0 5 25 5 10 4 0 0 12 6 2 2 20 7 30 3 20 7 1 0 2 2 0 0 3 6 0 0 16 4 8 0 4 3 0 4 2 6 0 0 4 6 0 8 16 5 6 0 0 4 0 0 0 6 6 0 15 4 12 3 9 3 1 0 1 4 20 24 15 5 5 15 5 6 0 0 4 6 21 12 15 4 3 0 4 6 5 0 12 6 8 0 2 5 10 4 4 6 5 1 2 4 8 0 4 6 6 16 8 7 15 9 30 5 9 0 6 6 14 8 6 6 9 10 7 5 5 0 4 7 9 6 17 6 10 0 5 3 12 0 0 4 9 15 3 5 7 0 4 4 15 0 15 3 14 0 0 5 16 0 8 5 6 0 10 4 6 0 4 5 2 0 0 1 8 10 6 2 0 7 11 3 6 2 10 4 4 0 0 3 15 2 0 7 0 0 0 2 12 3 0 4 0 12 0 2 13 0 0 5 18 3 0 6 4 0 7 6 9 0 4 6 12 0 12 6 14 8 6 6 0 0 12 6 4 7 10 6 12 0 9 4 15 18 6 4 0 0 0 5 30 13 16 6 0 0 2 6 0 0 0 7 3 0 0 4 2 0 1 6 15 0 10 6 3 2 10 6 4 0 14 3 12 9 12 5 8 16 12 6 12 10 12 4 18 0 5 5 15 7 0 6 3 8 4 6 0 0 3 3 0 0 0 6 21 0 14 5 10 0 4 6 5 1 3 4 0 0 0 7 1 0 12 5 0 0 12 6 6 0 15 6 12 0 0 6 10 20 8 7 0 9 6 6 25 0 14 6 3 0 5 6 15 0 10 6 10 0 16 2 15 4 4 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
satisfaction[t] = + 4.57408744603602 -0.00206177040274046Walked[t] -0.0182799519706426Cycled[t] + 0.0871931717568843`Other `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)4.574087446036020.17950325.48200
Walked-0.002061770402740460.014809-0.13920.8894530.444727
Cycled-0.01827995197064260.019634-0.9310.3532730.176637
`Other `0.08719317175688430.0181624.80094e-062e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.374085962411091
R-squared0.139940307273032
Adjusted R-squared0.123400697797514
F-TEST (value)8.46091967770866
F-TEST (DF numerator)3
F-TEST (DF denominator)156
p-value3.03942628936404e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.33960726636346
Sum Squared Residuals279.949429982628


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
155.836626073529-0.836626073529005
244.5516839532599-0.551683953259895
374.835666961306682.16433303869332
474.740226707938832.25977329206117
554.715402415815090.284597584184906
655.61628196631315-0.616281966313151
744.7625471534241-0.762547153424103
844.49272055654249-0.492720556542488
965.608034884702190.391965115297811
1055.83044076232077-0.830440762320774
1114.57408744603602-3.57408744603602
1255.30307514368314-0.303075143683139
1345.62040550711863-1.62040550711863
1466.27726743642694-0.27726743642694
1576.201257913179560.798742086820435
1674.746412019147052.25358798085295
1724.83566696130667-2.83566696130667
1865.969178194146170.0308218058538309
1944.90636596984163-0.906365969841634
2034.67535398166722-1.67535398166722
2164.922860133063561.07713986693644
2265.822938578381030.177061421618972
2354.561716823619580.438283176380422
2444.57408744603602-0.57408744603602
2565.869614399972840.130385600027158
2645.27924489110317-1.27924489110317
2734.65921884739016-1.65921884739016
2845.40203076703905-1.40203076703905
2954.72554517324710.2744548267529
3064.922860133063561.07713986693644
3165.619328420284020.380671579715976
3244.91667482185534-0.916674821855336
3365.610096655104930.389903344895070
3464.731979626327871.26802037367213
3554.829122621153580.170877378846417
3664.719884985565441.28011501443456
3744.90636596984163-0.906365969841634
3864.966782966144371.03321703385563
3976.994436474965660.00556352503434097
4055.07869054295266-0.0786905429526623
4164.922142075173821.07785792482618
4264.983084195003121.01691580499688
4354.912551281049860.0874487189501445
4475.928135720454531.07186427954547
4564.989435600793041.01056439920696
4634.54934620120314-1.54934620120314
4744.54291174812237-0.54291174812237
4854.908427740244370.0915722597556254
4945.85105846634818-1.85105846634818
5034.54522266039765-1.54522266039765
5155.23864449364725-0.238644493647248
5255.43364854118842-0.433648541188421
5344.91048951064711-0.910489510647115
5454.569963905230540.43003609476946
5514.89795279364898-3.89795279364898
5625.40525267156725-3.40525267156725
5735.39708863724714-2.39708863724714
5844.56584036442506-0.565840364425059
5934.50660098605363-1.50660098605363
6074.574087446036022.42591255396398
6124.49450634529121-2.49450634529121
6244.35472802238831-0.354728022388309
6324.54728443080039-2.54728443080039
6454.482135722874760.517864277125235
6565.176192566723250.823807433276751
6664.904304199438891.09569580056111
6765.595664262285750.404335737714253
6864.922142075173821.07785792482618
6965.620405507118630.379594492881368
7065.30981241819940.690187581800597
7165.334084747015090.665915252984906
7244.73728078506465-0.737280785064652
7344.57408744603602-0.57408744603602
7455.6696857064456-0.669685706445602
7564.748473789549791.25152621045021
7664.574087446036021.42591255396398
7774.56790213482782.4320978651722
7844.65715707698742-0.657157076987424
7965.415092607563760.584907392436243
8065.403273948455360.596726051544643
8165.786544769021440.213455230978561
8235.43114469454996-2.43114469454996
8355.31143211236643-0.311432112366426
8465.412864742579320.58713525742068
8544.97294143757111-0.972941437571114
8654.415201226200420.584798773799584
8764.770435206090201.22956479390980
8864.835666961306671.16433303869333
8934.57408744603602-1.57408744603602
9065.751494672174850.248505327825149
9154.902242429036150.0977575709638468
9264.807078157322331.19292184267767
9344.57408744603602-0.57408744603602
9475.618343736715891.38165626328411
9555.62040550711863-0.620405507118632
9665.869614399972840.130385600027158
9764.549346201203141.45065379879686
9864.885416076650841.11458392334916
9974.932726908841542.06727309115846
10065.743247590563890.256752409436111
10165.003867993612220.99613200638778
10265.415092607563760.584907392436243
10365.948560490118760.0514395098812352
10424.81881376913988-2.81881376913988
10544.56584036442506-0.565840364425059
10645.2144552121224-1.21445521212241
10765.616281966313150.383718033686849
10855.07250523174444-0.072505231744441
10964.904304199438891.09569580056111
11065.804050455592970.195949544407028
11124.56584036442506-2.56584036442506
11275.703475138070041.29652486192996
11314.57408744603602-3.57408744603602
11444.57202567563328-0.57202567563328
11514.57408744603602-3.57408744603602
11664.574087446036021.42591255396398
11765.446019163604860.553980836395137
11864.877335089621571.12266491037843
11975.962992882937951.03700711706205
12065.084875854160880.915124145839116
12144.28160821450574-0.281608214505738
12244.5516839532599-0.551683953259897
12364.731813531746171.26818646825383
12455.32789943580687-0.327899435806872
12576.044000743486610.95599925651339
12645.28435311547678-1.28435311547678
12744.64668213039203-0.646682130392026
12865.0601346093280.939865390672002
12975.251015116063691.74898488393631
13054.835666961306670.164333038693327
13165.133447351573740.866552648426258
13264.519247590124091.48075240987591
13365.3275404068620.672459593137997
13454.802954616516850.197045383483152
13574.492720556542492.50727944345751
13645.24070626404999-1.24070626404999
13764.563778594022321.43622140597768
13864.747755731660051.25224426833995
13975.684919204445371.31508079555463
14065.570923017452860.429076982547139
14165.810015992656540.189984007343457
14256.3179508811737-1.31795088117371
14356.24015556917761-1.24015556917761
14456.3804028080977-1.38040280809771
14565.431586770785680.56841322921432
14665.79479185063240.205208149367600
14775.56267593584191.4373240641581
14845.8572437775564-1.8572437775564
14964.834340732599521.16565926740048
15064.922860133063561.07713986693644
15175.184080619389341.81591938061066
15264.557593282814101.44240671718590
15375.64574556679331.35425443320670
15444.54522266039765-0.545222660397654
15566.39895874172237-0.398958741722369
15644.54962218285716-0.549622182857157
15744.66128061779290-0.661280617792905
15875.865131830222491.13486816977751
15945.62040550711863-1.62040550711863
16074.725794315119642.27420568488035


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.6630732426703960.6738535146592090.336926757329604
80.5349660681177710.9300678637644580.465033931882229
90.4228732182437620.8457464364875230.577126781756238
100.3138176266018120.6276352532036240.686182373398188
110.9453560016497680.1092879967004630.0546439983502315
120.9124912868224790.1750174263550420.087508713177521
130.8981280513161080.2037438973677840.101871948683892
140.8578055070310910.2843889859378180.142194492968909
150.8282007561554780.3435984876890440.171799243844522
160.8993711054706080.2012577890587840.100628894529392
170.9550635367206040.08987292655879220.0449364632793961
180.9363438446260970.1273123107478060.063656155373903
190.9159789950303770.1680420099392460.084021004969623
200.9098485040396680.1803029919206650.0901514959603323
210.9066836094485930.1866327811028140.0933163905514069
220.8808563588300320.2382872823399350.119143641169968
230.8521009726626170.2957980546747660.147899027337383
240.8127748842265520.3744502315468960.187225115773448
250.7673258844014590.4653482311970820.232674115598541
260.7473503585564310.5052992828871370.252649641443569
270.74564953445340.50870093109320.2543504655466
280.7074075620476160.5851848759047680.292592437952384
290.6817695156830130.6364609686339750.318230484316987
300.676307864444450.6473842711110990.323692135555550
310.6356659359756480.7286681280487050.364334064024352
320.5943250214872840.8113499570254310.405674978512716
330.5451676671825420.9096646656349170.454832332817458
340.552237079172660.895525841654680.44776292082734
350.4989931998918220.9979863997836440.501006800108178
360.5031272722871160.9937454554257670.496872727712884
370.4683619874844710.9367239749689430.531638012515529
380.4649822288866030.9299644577732070.535017771113397
390.4108803764697020.8217607529394040.589119623530298
400.3584296317366080.7168592634732160.641570368263392
410.3450718392370350.6901436784740690.654928160762965
420.32648568661450.6529713732290.6735143133855
430.2803936699758660.5607873399517310.719606330024134
440.2672620535155320.5345241070310650.732737946484468
450.2510995279023530.5021990558047050.748900472097647
460.2622586723572790.5245173447145580.73774132764272
470.2276701235855760.4553402471711520.772329876414424
480.1911362981086000.3822725962172000.8088637018914
490.2215447871824250.4430895743648510.778455212817575
500.2250329490942040.4500658981884080.774967050905796
510.1893406488594290.3786812977188580.81065935114057
520.1591257072863520.3182514145727030.840874292713648
530.1402115576005610.2804231152011220.859788442399439
540.1190407554310620.2380815108621240.880959244568938
550.3874385004425850.7748770008851710.612561499557415
560.6255272170712590.7489455658574820.374472782928741
570.7071936458029450.585612708394110.292806354197055
580.670536309984430.6589273800311390.329463690015569
590.6739567249508960.6520865500982080.326043275049104
600.775640718092970.4487185638140590.224359281907029
610.8433520486100910.3132959027798180.156647951389909
620.8168122618776650.3663754762446710.183187738122335
630.8806722178040260.2386555643919470.119327782195974
640.8652283524769920.2695432950460160.134771647523008
650.8511230280439540.2977539439120920.148876971956046
660.8453974306553350.3092051386893300.154602569344665
670.8202605413295390.3594789173409220.179739458670461
680.814557713600690.370884572798620.18544228639931
690.7852043160888360.4295913678223280.214795683911164
700.7614907850996760.4770184298006470.238509214900324
710.7353673832025140.5292652335949730.264632616797486
720.7100399651148450.5799200697703090.289960034885155
730.6783143966013080.6433712067973830.321685603398692
740.6481646002290820.7036707995418360.351835399770918
750.6442231540853610.7115536918292780.355776845914639
760.6505026973751380.6989946052497240.349497302624862
770.7419526945323890.5160946109352220.258047305467611
780.7135322137817970.5729355724364050.286467786218203
790.6816830299600660.6366339400798680.318316970039934
800.6478756265757420.7042487468485160.352124373424258
810.6052451245437460.7895097509125070.394754875456254
820.7062561989110940.5874876021778110.293743801088906
830.6739175569235040.6521648861529930.326082443076496
840.6416529856698050.716694028660390.358347014330195
850.624793647851580.750412704296840.37520635214842
860.5918695311277970.8162609377444060.408130468872203
870.5822452529259690.8355094941480620.417754747074031
880.5700263019578840.8599473960842330.429973698042117
890.5903046869466520.8193906261066970.409695313053348
900.5473719202012110.9052561595975770.452628079798789
910.5019778044953650.9960443910092690.498022195504635
920.4896232944464130.9792465888928260.510376705553587
930.4530988904334170.9061977808668340.546901109566583
940.4553715156953850.910743031390770.544628484304615
950.4191201925443280.8382403850886560.580879807455672
960.3741708632828250.748341726565650.625829136717175
970.3766974569193050.753394913838610.623302543080695
980.3587989042500510.7175978085001020.641201095749949
990.4120002561110920.8240005122221850.587999743888908
1000.369588889981110.739177779962220.63041111001889
1010.3485751051931270.6971502103862530.651424894806873
1020.3121642400400180.6243284800800360.687835759959982
1030.2710272488565960.5420544977131930.728972751143404
1040.4409271434363350.881854286872670.559072856563665
1050.4043063630693770.8086127261387540.595693636930623
1060.4029866242549290.8059732485098570.597013375745071
1070.3607878913433280.7215757826866570.639212108656672
1080.3180406064694980.6360812129389960.681959393530502
1090.2978278210549760.5956556421099520.702172178945024
1100.2566193714849220.5132387429698440.743380628515078
1110.3901345213966510.7802690427933030.609865478603349
1120.3919862721812450.7839725443624910.608013727818755
1130.7394894603331990.5210210793336020.260510539666801
1140.7191926104736130.5616147790527750.280807389526387
1150.9663746400451920.0672507199096170.0336253599548085
1160.9614772236289820.07704555274203590.0385227763710180
1170.950502542665410.09899491466917980.0494974573345899
1180.9408705746080340.1182588507839320.0591294253919658
1190.9414889578911280.1170220842177440.0585110421088722
1200.9279301494762910.1441397010474170.0720698505237087
1210.9187079057886960.1625841884226070.0812920942113036
1220.920947296223440.1581054075531190.0790527037765594
1230.9080339438733430.1839321122533150.0919660561266574
1240.8913255769910170.2173488460179670.108674423008983
1250.8948491062037150.2103017875925700.105150893796285
1260.9363761408864950.127247718227010.063623859113505
1270.945922482230530.1081550355389390.0540775177694697
1280.9293702530090570.1412594939818860.070629746990943
1290.938024445978560.1239511080428800.0619755540214398
1300.917449230028190.165101539943620.08255076997181
1310.8949378891660930.2101242216678150.105062110833907
1320.877023173243480.2459536535130390.122976826756520
1330.8422063776773120.3155872446453760.157793622322688
1340.806019843751970.3879603124960610.193980156248030
1350.8467553124319270.3064893751361460.153244687568073
1360.8868873179062470.2262253641875060.113112682093753
1370.8644126142730250.2711747714539500.135587385726975
1380.8260142046386720.3479715907226550.173985795361328
1390.8366856768656860.3266286462686280.163314323134314
1400.7855233103913550.4289533792172890.214476689608645
1410.7274413188301390.5451173623397220.272558681169861
1420.6655437836733260.6689124326533490.334456216326674
1430.6666263447761540.6667473104476920.333373655223846
1440.652311172779150.69537765444170.34768882722085
1450.5754235029818620.8491529940362750.424576497018138
1460.5117988816794780.9764022366410450.488201118320522
1470.4251110647867270.8502221295734540.574888935213273
1480.5687531440863610.8624937118272790.431246855913639
1490.5671099126074030.8657801747851950.432890087392597
1500.5782298602542670.8435402794914660.421770139745733
1510.5075892191379070.9848215617241850.492410780862093
1520.4905266464985490.9810532929970990.509473353501451
1530.3666071515547850.7332143031095710.633392848445215


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 level40.0272108843537415OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/10859g1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/10859g1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/114cm1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/114cm1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/2cdbp1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/2cdbp1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/3cdbp1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/3cdbp1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/4cdbp1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/4cdbp1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/5m4ta1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/5m4ta1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/6m4ta1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/6m4ta1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/7fesv1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/7fesv1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/8fesv1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/8fesv1291200690.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/9859g1291200690.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t1291200677u2m0tw6al81sj7b/9859g1291200690.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