Home » date » 2010 » Dec » 24 »

*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: Fri, 24 Dec 2010 13:05:44 +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/24/t1293195814qon3xblbaurkxq2.htm/, Retrieved Fri, 24 Dec 2010 14:03:45 +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/24/t1293195814qon3xblbaurkxq2.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 «
6,4 7,7 9,2 8,6 7,4 8,6 6,2 6 6,6 5,1 4,7 5 3,6 1,9 -0,1 -5,7 -5,6 -6,4 -7,7 -8 -11,9 -15,4 -15,5 -13,4 -10,9 -10,8 -7,3 -6,5 -5,1 -5,3 -6,8 -8,4 -8,4 -9,7 -8,8 -9,6 -11,5 -11 -14,9 -16,2 -14,4 -17,3 -15,7 -12,6 -9,4 -8,1 -5,4 -4,6 -4,9 -4 -3,1 -1,3 0 -0,4 3 0,4 1,2 0,6 -1,3 -3,2 -1,8 -3,6 -4,2 -6,9 -8 -7,5 -8,2 -7,6 -3,7 -1,7 -0,7 0,2 0,6 2,2 3,3 5,3 5,5 6,3 7,7 6,5 5,5 6,9 5,7 6,9 6,1 4,8 3,7 5,8 6,8 8,5 7,2 5 4,7 2,3 2,4 0,1 1,9 1,7 2 -1,9 0,5 -1,3 -3,3 -2,8 -8 -13,9 -21,9 -28,8 -27,6 -31,4 -31,8 -29,4 -27,6 -23,6 -22,8 -18,2 -17,8 -14,2 -8,8 -7,9 -7 -7 -3,6 -2,4 -4,9 -7,7 -6,5 -5,1 -3,4 -2,8 0,8
 
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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Conjunctuur[t] = -1.90042553191490 + 1.15503223726628M1[t] + 0.810025789813028M2[t] + 1.11047388781432M3[t] + 0.820012894906516M4[t] + 1.34773372018053M5[t] + 1.33909090909092M6[t] + 1.32135718891038M7[t] + 1.56725983236622M8[t] + 1.64043520309478M9[t] + 1.12270148291425M10[t] + 1.36860412637009M11[t] -0.054993552546744t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.900425531914903.341484-0.56870.5706150.285308
M11.155032237266284.1575770.27780.7816410.390821
M20.8100257898130284.1570510.19490.8458410.42292
M31.110473887814324.1566410.26720.7898150.394908
M40.8200128949065164.1563490.19730.8439390.421969
M51.347733720180534.1561740.32430.7463060.373153
M61.339090909090924.1561150.32220.7478730.373937
M71.321357188910384.1561740.31790.7511030.375551
M81.567259832366224.1563490.37710.7067940.353397
M91.640435203094784.1566410.39470.6938110.346905
M101.122701482914254.1570510.27010.7875770.393788
M111.368604126370094.1575770.32920.7426010.3713
t-0.0549935525467440.022048-2.49420.0140080.007004


Multiple Linear Regression - Regression Statistics
Multiple R0.227359729148448
R-squared0.0516924464384556
Adjusted R-squared-0.0447456098559387
F-TEST (value)0.536017091433854
F-TEST (DF numerator)12
F-TEST (DF denominator)118
p-value0.88736113578945
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation9.51205301061793
Sum Squared Residuals10676.5399922631


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.4-0.800386847195377.20038684719537
27.7-1.200386847195348.90038684719534
39.2-0.9549323017408210.1549323017408
48.6-1.300386847195349.90038684719534
57.4-0.8276595744680978.2276595744681
68.6-0.891295938104459.49129593810445
76.2-0.9640232108317247.16402321083172
86-0.773114119922646.77311411992264
96.6-0.7549323017408157.35493230174081
105.1-1.327659574468096.42765957446809
114.7-1.1367504835595.836750483559
125-2.560348162475837.56034816247583
133.6-1.460309477756295.06030947775629
141.9-1.860309477756293.76030947775629
15-0.1-1.614854932301741.51485493230174
16-5.7-1.96030947775628-3.73969052224372
17-5.6-1.48758220502901-4.11241779497099
18-6.4-1.55121856866538-4.84878143133462
19-7.7-1.62394584139265-6.07605415860735
20-8-1.43303675048356-6.56696324951644
21-11.9-1.41485493230174-10.4851450676983
22-15.4-1.98758220502901-13.4124177949710
23-15.5-1.79667311411992-13.7033268858801
24-13.4-3.22027079303675-10.1797292069632
25-10.9-2.12023210831722-8.77976789168278
26-10.8-2.52023210831721-8.27976789168279
27-7.3-2.27477756286267-5.02522243713733
28-6.5-2.62023210831721-3.87976789168279
29-5.1-2.14750483558994-2.95249516441006
30-5.3-2.21114119922630-3.08885880077370
31-6.8-2.28386847195358-4.51613152804642
32-8.4-2.09295938104449-6.30704061895551
33-8.4-2.07477756286267-6.32522243713734
34-9.7-2.64750483558994-7.05249516441006
35-8.8-2.45659574468085-6.34340425531915
36-9.6-3.88019342359768-5.71980657640232
37-11.5-2.78015473887815-8.71984526112185
38-11-3.18015473887814-7.81984526112186
39-14.9-2.9347001934236-11.9652998065764
40-16.2-3.28015473887814-12.9198452611219
41-14.4-2.80742746615087-11.5925725338491
42-17.3-2.87106382978723-14.4289361702128
43-15.7-2.9437911025145-12.7562088974855
44-12.6-2.75288201160542-9.84711798839458
45-9.4-2.73470019342359-6.6652998065764
46-8.1-3.30742746615087-4.79257253384913
47-5.4-3.11651837524178-2.28348162475822
48-4.6-4.54011605415861-0.0598839458413878
49-4.9-3.44007736943908-1.45992263056092
50-4-3.84007736943907-0.159922630560931
51-3.1-3.594622823984530.494622823984528
52-1.3-3.940077369439072.64007736943907
530-3.467350096711803.46735009671180
54-0.4-3.530986460348163.13098646034816
553-3.603713733075446.60371373307544
560.4-3.412804642166343.81280464216634
571.2-3.394622823984524.59462282398452
580.6-3.96735009671184.5673500967118
59-1.3-3.776441005802712.47644100580271
60-3.2-5.200038684719542.00003868471954
61-1.8-4.100000000000012.30000000000001
62-3.6-4.50.899999999999997
63-4.2-4.254545454545460.0545454545454559
64-6.9-4.59999999999999-2.30000000000001
65-8-4.12727272727272-3.87272727272728
66-7.5-4.19090909090909-3.30909090909091
67-8.2-4.26363636363636-3.93636363636363
68-7.6-4.07272727272727-3.52727272727273
69-3.7-4.054545454545450.354545454545453
70-1.7-4.627272727272732.92727272727273
71-0.7-4.436363636363643.73636363636364
720.2-5.859961315280476.05996131528047
730.6-4.759922630560945.35992263056094
742.2-5.159922630560937.35992263056093
753.3-4.914468085106388.21446808510638
765.3-5.2599226305609210.5599226305609
775.5-4.7871953578336510.2871953578336
786.3-4.8508317214700211.1508317214700
797.7-4.9235589941972912.6235589941973
806.5-4.732649903288211.2326499032882
815.5-4.7144680851063810.2144680851064
826.9-5.2871953578336612.1871953578337
835.7-5.0962862669245710.7962862669246
846.9-6.519883945841413.4198839458414
856.1-5.4198452611218611.5198452611219
864.8-5.8198452611218610.6198452611219
873.7-5.574390715667319.27439071566731
885.8-5.9198452611218511.7198452611219
896.8-5.4471179883945812.2471179883946
908.5-5.5107543520309414.0107543520309
917.2-5.5834816247582112.7834816247582
925-5.3925725338491310.3925725338491
934.7-5.3743907156673110.0743907156673
942.3-5.947117988394598.24711798839459
952.4-5.756208897485498.1562088974855
960.1-7.179806576402337.27980657640233
971.9-6.079767891682797.97976789168279
981.7-6.479767891682788.17976789168278
992-6.234313346228248.23431334622824
100-1.9-6.579767891682784.67976789168278
1010.5-6.107040618955516.60704061895551
102-1.3-6.170676982591874.87067698259187
103-3.3-6.243404255319152.94340425531915
104-2.8-6.052495164410063.25249516441006
105-8-6.03431334622824-1.96568665377176
106-13.9-6.60704061895551-7.29295938104449
107-21.9-6.41613152804642-15.4838684719536
108-28.8-7.83972920696325-20.9602707930367
109-27.6-6.73969052224371-20.8603094777563
110-31.4-7.1396905222437-24.2603094777563
111-31.8-6.89423597678917-24.9057640232108
112-29.4-7.2396905222437-22.1603094777563
113-27.6-6.76696324951644-20.8330367504836
114-23.6-6.83059961315279-16.7694003868472
115-22.8-6.90332688588007-15.8966731141199
116-18.2-6.71241779497098-11.4875822050290
117-17.8-6.69423597678916-11.1057640232108
118-14.2-7.26696324951644-6.93303675048356
119-8.8-7.07605415860735-1.72394584139265
120-7.9-8.499651837524180.599651837524182
121-7-7.399613152804650.399613152804649
122-7-7.799613152804640.79961315280464
123-3.6-7.55415860735013.9541586073501
124-2.4-7.899613152804645.49961315280464
125-4.9-7.426885880077372.52688588007736
126-7.7-7.49052224371373-0.209477756286270
127-6.5-7.5632495164411.06324951644101
128-5.1-7.372340425531922.27234042553192
129-3.4-7.35415860735013.9541586073501
130-2.8-7.926885880077375.12688588007737
1310.8-7.735976789168288.53597678916828


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.05965661121700210.1193132224340040.940343388782998
170.02685850919982570.05371701839965130.973141490800174
180.01493571157479150.02987142314958300.985064288425209
190.006094738574025560.01218947714805110.993905261425974
200.002336637439881510.004673274879763010.997663362560119
210.002044829234715160.004089658469430320.997955170765285
220.002256822746976730.004513645493953470.997743177253023
230.001840224036679830.003680448073359670.99815977596332
240.0009874776165694850.001974955233138970.99901252238343
250.0005359711716005210.001071942343201040.9994640288284
260.0002676731038139420.0005353462076278850.999732326896186
270.0002315463935890260.0004630927871780520.999768453606411
280.000386909156743470.000773818313486940.999613090843257
290.0006490884819758270.001298176963951650.999350911518024
300.0006985851278813720.001397170255762740.999301414872119
310.0006662167538042960.001332433507608590.999333783246196
320.0004741527061436250.000948305412287250.999525847293856
330.0003927376866380340.0007854753732760690.999607262313362
340.0003603253119489030.0007206506238978050.999639674688051
350.0003542197880609190.0007084395761218380.99964578021194
360.000247184781282030.000494369562564060.999752815218718
370.0001469708381181860.0002939416762363720.999853029161882
388.70151699533093e-050.0001740303399066190.999912984830047
394.99813704800139e-059.99627409600278e-050.99995001862952
403.03320884092612e-056.06641768185225e-050.99996966791159
411.81017860096253e-053.62035720192507e-050.99998189821399
421.31947446267686e-052.63894892535373e-050.999986805255373
439.4291395230195e-061.8858279046039e-050.999990570860477
448.36173193937206e-061.67234638787441e-050.99999163826806
451.31329145278071e-052.62658290556142e-050.999986867085472
463.5284912989641e-057.0569825979282e-050.99996471508701
470.0001144502299613780.0002289004599227550.999885549770039
480.0002524392309790550.000504878461958110.99974756076902
490.0004370190004029910.0008740380008059820.999562980999597
500.0006717615114536720.001343523022907340.999328238488546
510.001002640400392830.002005280800785660.998997359599607
520.001968968930718390.003937937861436780.998031031069282
530.003338992515648120.006677985031296240.996661007484352
540.004911841760664480.009823683521328970.995088158239335
550.009568408006057920.01913681601211580.990431591993942
560.01198672759416460.02397345518832920.988013272405835
570.01457738753543280.02915477507086560.985422612464567
580.01729990213853880.03459980427707760.982700097861461
590.01698596571484540.03397193142969090.983014034285155
600.01425192836967230.02850385673934460.985748071630328
610.01182279600307850.02364559200615710.988177203996921
620.009135886086232530.01827177217246510.990864113913767
630.00703691938543550.0140738387708710.992963080614565
640.005733670235654420.01146734047130880.994266329764346
650.004976618868375590.009953237736751180.995023381131624
660.004474853105924250.00894970621184850.995525146894076
670.004317443468308160.008634886936616310.995682556531692
680.004450659495774750.00890131899154950.995549340504225
690.004168974510550840.008337949021101690.99583102548945
700.004095877820480310.008191755640960630.99590412217952
710.004056502971323960.008113005942647930.995943497028676
720.003522407150354240.007044814300708490.996477592849646
730.002886286654233090.005772573308466190.997113713345767
740.002423762778851440.004847525557702890.997576237221149
750.002100078958209950.004200157916419910.99789992104179
760.002145439163101640.004290878326203280.997854560836898
770.002055368614889160.004110737229778330.99794463138511
780.002035447520506110.004070895041012220.997964552479494
790.002133758671134280.004267517342268560.997866241328866
800.00198350932108410.00396701864216820.998016490678916
810.001618785822611120.003237571645222250.998381214177389
820.001427129296369850.00285425859273970.99857287070363
830.001121164976549410.002242329953098810.99887883502345
840.001051401235220580.002102802470441160.99894859876478
850.0008260307239899830.001652061447979970.99917396927601
860.0006177502247958560.001235500449591710.999382249775204
870.0004200346451560190.0008400692903120390.999579965354844
880.0003320816969870660.0006641633939741310.999667918303013
890.0002761446367266560.0005522892734533120.999723855363273
900.0002803162603957270.0005606325207914540.999719683739604
910.0002612093072650770.0005224186145301550.999738790692735
920.0001922571216961830.0003845142433923660.999807742878304
930.0001476110848504080.0002952221697008160.99985238891515
940.0001042606269590230.0002085212539180470.99989573937304
957.64331816434637e-050.0001528663632869270.999923566818357
968.87338526142692e-050.0001774677052285380.999911266147386
970.0001286081440016710.0002572162880033420.999871391855998
980.0002822014383220410.0005644028766440830.999717798561678
990.0007294909205988330.001458981841197670.999270509079401
1000.001319310457922360.002638620915844730.998680689542078
1010.004636646051479140.009273292102958270.99536335394852
1020.01834690150395090.03669380300790180.98165309849605
1030.07500676527697890.1500135305539580.92499323472302
1040.3094063111996940.6188126223993880.690593688800306
1050.730880373788860.5382392524222810.269119626211140
1060.9582996733037770.08340065339244670.0417003266962233
1070.978281329286960.04343734142608130.0217186707130407
1080.9750168957033920.04996620859321510.0249831042966076
1090.967735336401510.06452932719698140.0322646635984907
1100.968324100476150.06335179904769980.0316758995238499
1110.9853528595413770.02929428091724560.0146471404586228
1120.9964296689668040.007140662066391570.00357033103319579
1130.9993029870188340.001394025962332660.000697012981166328
1140.9976948458045960.00461030839080810.00230515419540405
1150.9956139166096430.008772166780714580.00438608339035729


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level760.76NOK
5% type I error level920.92NOK
10% type I error level960.96NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/10i2jx1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/10i2jx1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/1tjm31293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/1tjm31293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/24s3o1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/24s3o1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/34s3o1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/34s3o1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/44s3o1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/44s3o1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/5xjlr1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/5xjlr1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/6xjlr1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/6xjlr1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/7pskc1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/7pskc1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/8pskc1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/8pskc1293195933.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/9i2jx1293195933.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293195814qon3xblbaurkxq2/9i2jx1293195933.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by