Home » date » 2009 » Nov » 17 »

ws3

*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, 17 Nov 2009 08:02:21 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg.htm/, Retrieved Tue, 17 Nov 2009 16:03:26 +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/2009/Nov/17/t1258470193s51uyvfj3lnf4dg.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
395.3 0 395.1 0 403.5 0 403.3 0 405.7 0 406.7 0 407.2 0 412.4 0 415.9 0 414.0 0 411.8 0 409.9 0 412.4 0 415.9 0 416.3 0 417.2 0 421.8 0 421.4 0 415.1 0 412.4 0 411.8 0 408.8 0 404.5 0 402.5 0 409.4 0 410.7 0 413.4 0 415.2 0 417.7 0 417.8 0 417.9 0 418.4 0 418.2 0 416.6 0 418.9 0 421.0 0 423.5 0 432.3 0 432.3 0 428.6 0 426.7 0 427.3 0 428.5 0 437.0 0 442.0 0 444.9 0 441.4 0 440.3 0 447.1 0 455.3 0 478.6 0 486.5 0 487.8 0 485.9 0 483.8 0 488.4 0 494.0 0 493.6 0 487.3 0 482.1 0 484.2 0 496.8 0 501.1 0 499.8 0 495.5 0 498.1 0 503.8 0 516.2 0 526.1 0 527.1 0 525.1 0 528.9 0 540.1 0 549.0 0 556.0 0 568.9 0 589.1 0 590.3 0 603.3 0 638.8 0 643.0 0 656.7 0 656.1 0 654.1 0 659.9 0 662.1 0 669.2 0 673.1 0 678.3 0 677.4 0 678.5 0 672.4 0 665.3 0 667.9 0 672.1 0 662.5 0 682.3 0 692.1 0 702.7 0 721.4 0 733.2 0 747.7 0 737.6 0 729.3 0 706.1 0 674.3 0 659.0 0 645.7 0 646.1 0 633.0 1 622.3 1 628.2 1 637.3 1 639.6 1 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 334.951619017219 -71.0679068117941X[t] + 3.29705980435749t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)334.9516190172197.33899645.6400
X-71.067906811794115.498156-4.58561.2e-056e-06
t3.297059804357490.11581728.467800


Multiple Linear Regression - Regression Statistics
Multiple R0.941323218705861
R-squared0.886089402074763
Adjusted R-squared0.884090970532215
F-TEST (value)443.392422111688
F-TEST (DF numerator)2
F-TEST (DF denominator)114
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation38.0529531418478
Sum Squared Residuals165075.105680986


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1395.3338.24867882157757.0513211784233
2395.1341.54573862593353.5542613740666
3403.5344.84279843029158.6572015697091
4403.3348.13985823464955.1601417653514
5405.7351.43691803900654.2630819609939
6406.7354.73397784336451.9660221566364
7407.2358.03103764772149.1689623522789
8412.4361.32809745207951.0719025479214
9415.9364.62515725643651.2748427435639
10414367.92221706079446.0777829392064
11411.8371.21927686515140.5807231348489
12409.9374.51633666950935.3836633304914
13412.4377.81339647386634.5866035261339
14415.9381.11045627822434.7895437217764
15416.3384.40751608258131.8924839174190
16417.2387.70457588693929.4954241130615
17421.8391.00163569129630.798364308704
18421.4394.29869549565427.1013045043465
19415.1397.59575530001117.504244699989
20412.4400.89281510436811.5071848956315
21411.8404.1898749087267.61012509127402
22408.8407.4869347130831.31306528691652
23404.5410.783994517441-6.28399451744097
24402.5414.081054321798-11.5810543217985
25409.4417.378114126156-7.97811412615599
26410.7420.675173930513-9.97517393051347
27413.4423.972233734871-10.5722337348710
28415.2427.269293539228-12.0692935392285
29417.7430.566353343586-12.8663533435859
30417.8433.863413147943-16.0634131479434
31417.9437.160472952301-19.2604729523009
32418.4440.457532756658-22.0575327566584
33418.2443.754592561016-25.5545925610159
34416.6447.051652365373-30.4516523653734
35418.9450.348712169731-31.4487121697309
36421453.645771974088-32.6457719740884
37423.5456.942831778446-33.4428317784459
38432.3460.239891582803-27.9398915828033
39432.3463.536951387161-31.2369513871608
40428.6466.834011191518-38.2340111915183
41426.7470.131070995876-43.4310709958759
42427.3473.428130800233-46.1281308002333
43428.5476.725190604591-48.2251906045908
44437480.022250408948-43.0222504089483
45442483.319310213306-41.3193102133058
46444.9486.616370017663-41.7163700176633
47441.4489.913429822021-48.5134298220208
48440.3493.210489626378-52.9104896263783
49447.1496.507549430736-49.4075494307357
50455.3499.804609235093-44.5046092350933
51478.6503.101669039451-24.5016690394507
52486.5506.398728843808-19.8987288438083
53487.8509.695788648166-21.8957886481657
54485.9512.992848452523-27.0928484525233
55483.8516.289908256881-32.4899082568807
56488.4519.586968061238-31.1869680612383
57494522.884027865596-28.8840278655957
58493.6526.181087669953-32.5810876699532
59487.3529.478147474311-42.1781474743107
60482.1532.775207278668-50.6752072786682
61484.2536.072267083026-51.8722670830257
62496.8539.369326887383-42.5693268873832
63501.1542.666386691741-41.5663866917407
64499.8545.963446496098-46.1634464960982
65495.5549.260506300456-53.7605063004557
66498.1552.557566104813-54.4575661048131
67503.8555.854625909171-52.0546259091706
68516.2559.151685713528-42.9516857135281
69526.1562.448745517886-36.3487455178856
70527.1565.745805322243-38.6458053222431
71525.1569.042865126601-43.9428651266006
72528.9572.339924930958-43.4399249309581
73540.1575.636984735316-35.5369847353156
74549578.934044539673-29.9340445396731
75556582.23110434403-26.2311043440306
76568.9585.528164148388-16.6281641483881
77589.1588.8252239527460.274776047254456
78590.3592.122283757103-1.82228375710310
79603.3595.419343561467.8806564385394
80638.8598.71640336581840.0835966341819
81643602.01346317017640.9865368298245
82656.7605.31052297453351.389477025467
83656.1608.60758277889147.4924172211095
84654.1611.90464258324842.195357416752
85659.9615.20170238760644.6982976123945
86662.1618.49876219196343.601237808037
87669.2621.7958219963247.4041780036796
88673.1625.09288180067848.007118199322
89678.3628.38994160503549.9100583949645
90677.4631.68700140939345.712998590607
91678.5634.9840612137543.5159387862495
92672.4638.28112101810834.118878981892
93665.3641.57818082246523.7218191775345
94667.9644.87524062682323.024759373177
95672.1648.1723004311823.9276995688196
96662.5651.46936023553811.0306397644621
97682.3654.76642003989527.5335799601045
98692.1658.06347984425334.0365201557471
99702.7661.3605396486141.3394603513896
100721.4664.65759945296856.7424005470321
101733.2667.95465925732565.2453407426747
102747.7671.25171906168376.4482809383172
103737.6674.5487788660463.0512211339596
104729.3677.84583867039851.4541613296021
105706.1681.14289847475524.9571015252447
106674.3684.439958279113-10.1399582791129
107659687.73701808347-28.7370180834703
108645.7691.034077887828-45.3340778878278
109646.1694.331137692185-48.2311376921853
110633626.5602906847496.43970931525123
111622.3629.857350489106-7.55735048910632
112628.2633.154410293464-4.95441029346372
113637.3636.4514700978210.8485299021787
114639.6639.748529902179-0.148529902178725
115638.5643.045589706536-4.54558970653624
116650.5646.3426495108944.15735048910627
117655.4649.6397093152515.76029068474875


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
60.0004664964091127650.000932992818225530.999533503590887
74.67225613695761e-059.34451227391522e-050.99995327743863
83.26775694149021e-066.53551388298042e-060.999996732243059
92.65011113019184e-075.30022226038367e-070.999999734988887
103.34438975567698e-086.68877951135396e-080.999999966556102
112.4690428822045e-084.938085764409e-080.999999975309571
122.70635959672774e-085.41271919345548e-080.999999972936404
136.44626045788952e-091.28925209157790e-080.99999999355374
148.5947329924625e-101.7189465984925e-090.999999999140527
151.25420397619654e-102.50840795239307e-100.99999999987458
161.86994623996367e-113.73989247992735e-110.9999999999813
172.77581865162598e-125.55163730325196e-120.999999999997224
183.82549915356283e-137.65099830712566e-130.999999999999617
195.94414174728479e-131.18882834945696e-120.999999999999406
202.02226227465294e-124.04452454930588e-120.999999999997978
213.57476735045427e-127.14953470090854e-120.999999999996425
221.02949763125221e-112.05899526250443e-110.999999999989705
235.34240043491488e-111.06848008698298e-100.999999999946576
241.59524283069442e-103.19048566138884e-100.999999999840476
256.63304815564183e-111.32660963112837e-100.99999999993367
262.27221313087698e-114.54442626175395e-110.999999999977278
276.53825254359825e-121.30765050871965e-110.999999999993462
281.82190376380821e-123.64380752761642e-120.999999999998178
295.37709978123681e-131.07541995624736e-120.999999999999462
301.51133701808610e-133.02267403617219e-130.999999999999849
314.05372217462707e-148.10744434925415e-140.99999999999996
321.05374906795391e-142.10749813590781e-140.99999999999999
332.58553450998887e-155.17106901997775e-150.999999999999997
346.16509898392692e-161.23301979678538e-151
351.38805272018870e-162.77610544037741e-161
363.23664600003903e-176.47329200007806e-171
378.7779480060419e-181.75558960120838e-171
381.57074398685388e-173.14148797370776e-171
391.48496333492108e-172.96992666984216e-171
404.53382491913846e-189.06764983827692e-181
419.97167871601507e-191.99433574320301e-181
422.09745647098200e-194.19491294196401e-191
434.41084552149511e-208.82169104299021e-201
443.59826695025642e-207.19653390051284e-201
457.96624948624072e-201.59324989724814e-191
462.06310751595031e-194.12621503190063e-191
471.12357722407772e-192.24715444815545e-191
483.92590957765078e-207.85181915530156e-201
494.04772930607288e-208.09545861214576e-201
502.44662457244236e-194.89324914488472e-191
512.60828429831531e-155.21656859663062e-150.999999999999997
522.65340976645963e-125.30681953291926e-120.999999999997347
531.39129238181187e-102.78258476362374e-100.99999999986087
549.97890965677005e-101.99578193135401e-090.999999999002109
552.38804261368671e-094.77608522737342e-090.999999997611957
565.83623916318255e-091.16724783263651e-080.99999999416376
571.59099481347724e-083.18198962695449e-080.999999984090052
582.56700992173972e-085.13401984347944e-080.9999999743299
591.99142447851969e-083.98284895703937e-080.999999980085755
601.15028190178852e-082.30056380357704e-080.999999988497181
616.90485148372367e-091.38097029674473e-080.999999993095149
626.39580289518823e-091.27916057903765e-080.999999993604197
636.49757600376684e-091.29951520075337e-080.999999993502424
645.58544060450661e-091.11708812090132e-080.99999999441456
654.47232518507631e-098.94465037015262e-090.999999995527675
664.23437698258845e-098.4687539651769e-090.999999995765623
675.05696845564153e-091.01139369112831e-080.999999994943032
689.26254377702879e-091.85250875540576e-080.999999990737456
692.52651509139618e-085.05303018279236e-080.999999974734849
706.6931922376245e-081.3386384475249e-070.999999933068078
711.94243485314202e-073.88486970628405e-070.999999805756515
727.97343517219955e-071.59468703443991e-060.999999202656483
734.76919393781294e-069.53838787562587e-060.999995230806062
743.72908345343161e-057.45816690686321e-050.999962709165466
750.0003405525616818360.0006811051233636710.999659447438318
760.003109084560824190.006218169121648390.996890915439176
770.02210365041955510.04420730083911020.977896349580445
780.09597197939537250.1919439587907450.904028020604628
790.274136732345920.548273464691840.72586326765408
800.538320956726870.923358086546260.46167904327313
810.7213270279239760.5573459441520480.278672972076024
820.83962126338540.3207574732292010.160378736614600
830.8937913207645170.2124173584709650.106208679235483
840.9201623611527180.1596752776945640.079837638847282
850.9354493470880710.1291013058238580.0645506529119289
860.943378634484040.1132427310319220.0566213655159608
870.9473052029430280.1053895941139450.0526947970569723
880.9476657343526540.1046685312946930.0523342656473463
890.9454714584430540.1090570831138920.054528541556946
900.9392255419275950.121548916144810.0607744580724049
910.9294470018072950.141105996385410.070552998192705
920.916638526547130.1667229469057410.0833614734528705
930.9086925935775390.1826148128449230.0913074064224614
940.9041228402432690.1917543195134630.0958771597567314
950.9027797967852760.1944404064294480.0972202032147241
960.9360210409203680.1279579181592630.0639789590796315
970.94766003268770.1046799346245990.0523399673122997
980.9543833787871060.09123324242578730.0456166212128936
990.9535220567990180.09295588640196350.0464779432009817
1000.9375867357436450.1248265285127090.0624132642563546
1010.9180062755650440.1639874488699120.081993724434956
1020.9369993642127870.1260012715744270.0630006357872133
1030.9650151660517880.06996966789642320.0349848339482116
1040.9945542628695540.01089147426089180.00544573713044592
1050.999856237071050.0002875258579006120.000143762928950306
1060.9999864461367882.71077264242438e-051.35538632121219e-05
1070.9999953866832989.22663340315218e-064.61331670157609e-06
1080.999968147521296.37049574198638e-053.18524787099319e-05
1090.9997674373699170.0004651252601658740.000232562630082937
1100.9998772317370740.0002455365258528680.000122768262926434
1110.998599780777240.002800438445519670.00140021922275984


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level780.735849056603774NOK
5% type I error level800.754716981132076NOK
10% type I error level830.783018867924528NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/10gb7u1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/10gb7u1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/1xvbo1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/1xvbo1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/2d29s1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/2d29s1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/31wia1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/31wia1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/4iw7f1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/4iw7f1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/5h2zd1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/5h2zd1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/6yeof1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/6yeof1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/79fpz1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/79fpz1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/8idho1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/8idho1258470133.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/9r6yx1258470133.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/17/t1258470193s51uyvfj3lnf4dg/9r6yx1258470133.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by