Home » date » 2010 » Dec » 03 »

workshop 7

*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, 03 Dec 2010 16:03:28 +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/03/t12913921695t0euqjb8tf219f.htm/, Retrieved Fri, 03 Dec 2010 17:02:49 +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/03/t12913921695t0euqjb8tf219f.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 «
0 162556 1081 213118 6282154 0 29790 309 81767 4321023 0 87550 458 153198 4111912 1 84738 588 -26007 223193 0 54660 302 126942 1491348 0 42634 156 157214 1629616 1 40949 481 129352 1398893 0 45187 353 234817 1926517 0 37704 452 60448 983660 0 16275 109 47818 1443586 1 25830 115 245546 1073089 1 12679 110 48020 984885 0 18014 239 -1710 1405225 1 43556 247 32648 227132 0 24811 505 95350 929118 1 6575 159 151352 1071292 1 7123 109 288170 638830 0 21950 519 114337 856956 0 37597 248 37884 992426 1 17821 373 122844 444477 0 12988 119 82340 857217 0 22330 84 79801 711969 1 13326 102 165548 702380 1 16189 295 116384 358589 1 7146 105 134028 297978 1 15824 64 63838 585715 0 27664 282 74996 657954 1 11920 182 31080 209458 1 8568 37 32168 786690 1 14416 361 49857 439798 0 3369 28 87161 688779 0 11819 85 106113 574339 0 6984 45 80570 741409 0 4519 49 102129 597793 1 2220 22 301670 644190 1 18562 155 102313 377934 1 10327 91 88577 640273 0 5336 81 112477 697458 0 2365 79 191778 55060 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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Wealth[t] = + 205204.989348910 -210280.941099507Group[t] + 30.6772483966378Costs[t] -324.567875602376Trades[t] + 2.3730252473845Dividends[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)205204.989348910126632.6599011.62050.1084450.054223
Group-210280.941099507100241.326173-2.09770.0385820.019291
Costs30.67724839663783.1906389.614800
Trades-324.567875602376358.607505-0.90510.3677140.183857
Dividends2.37302524738450.9269332.56010.0120420.006021


Multiple Linear Regression - Regression Statistics
Multiple R0.821002770953783
R-squared0.67404554991379
Adjusted R-squared0.660321152015423
F-TEST (value)49.1129414131897
F-TEST (DF numerator)4
F-TEST (DF denominator)95
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation487513.442644005
Sum Squared Residuals22578588892067.9


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
162821545346852.30085869935301.69914131
243210231212823.900926503108199.09907350
341119123105888.721297471006023.27870253
42231932341891.54442077-2118698.54442077
514913482085240.4592307-593892.459230699
616296161835539.00013950-205923.000139503
713988931401965.10647826-3072.10647826221
819265172034072.02207523-107555.022075230
99836601358599.91327737-374939.913277366
101443586782572.629842963661013.370157037
1110730891332678.92603456-259589.926034559
12984885462131.086733516522753.913266484
131405225676195.346523948729029.653476052
142271321328408.54241618-1101276.54241618
159291181028699.37947680-99581.379476803
161071292504182.781478658567109.218521342
17638830861894.875676787-223064.875676787
18856956981444.451927678-124488.451927678
199924261367984.35263983-375558.352639827
20444477712071.387815901-267594.387815901
21857217760412.41319739996804.5868026011
227119691052334.03226176-340365.032261763
23702380763472.720725566-61092.7207255656
24358589671992.66963147-313403.669631470
25297978498115.866209977-200137.866209977
26585715611077.66858178-25362.6685817795
276579541140299.64952648-482345.649526476
28209458375279.120466404-165821.120466404
29786690322093.177272373464596.822727627
30439798438310.1778017251487.82219827473
31688779506303.992267596182475.007732404
32574339791999.946798282-217660.946798282
33741409596043.98193069145365.018069309
34597793570286.34443893127506.6555610687
35644190771757.572805169-127567.572805169
36377934756838.444405076-378904.444405076
37640273492387.773099243147885.226900757
38697458609519.54961964387938.4503803568
39550608707209.855527275-156601.855527275
40207393262064.336855251-54671.3368552506
41301607286792.13285068314814.867149317
42345783624829.440402476-279046.440402476
43501749283002.128840440218746.871159560
44379983450444.367620285-70461.3676202853
45387475280891.19862556106583.801374440
46377305551814.14777581-174509.147775810
47370837784499.36254241-413662.362542409
48430866655531.013438052-224665.013438052
49469107407328.77925184461778.2207481563
50194493235586.391668363-41093.3916683634
51530670523601.5548080097068.44519199109
52518365603616.898166888-85251.8981668882
53491303839563.835773396-348260.835773396
54527021534387.252754684-7366.25275468426
55233773668452.625977665-434679.625977665
56405972182155.877370101223816.122629899
57652925226463.085565390426461.91443461
58446211346431.84429855699779.1557014437
59341340235705.458586665105634.541413335
60387699665997.823809616-278298.823809616
61493408584575.983739852-91167.9837398521
62146494172620.425600293-26126.4256002927
63414462514598.351242623-100136.351242623
64364304604514.865314149-240210.865314149
65355178191393.656562713163784.343437287
66357760309663.35324928148096.6467507191
67261216189621.08680531071594.9131946903
68397144489289.597318375-92145.597318375
69374943319240.64799565855702.3520043418
70424898546511.456244787-121613.456244787
71202055344647.053942752-142592.053942752
72378525228697.589519919149827.410480081
73310768281428.68650120329339.3134987966
74325738196494.303968394129243.696031606
75394510326259.35262099668250.6473790036
76247060437060.314034655-190000.314034655
77368078283062.09506531385015.9049346867
78236761181455.66448494155305.3355150587
79312378161058.683561186151319.316438814
80339836449841.042937028-110005.042937028
81347385173531.711907103173853.288092897
82426280538223.028001819-111943.028001819
83352850332429.50483858920420.495161411
84301881108084.232111034193796.767888966
85377516249592.654328812127923.345671188
86357312508891.769045934-151579.769045934
87458343292931.754487573165411.245512427
88354228253645.516843247100582.483156753
89308636291533.84324430317102.1567556972
90386212253988.095649622132223.904350378
91393343266176.628172588127166.371827412
92378509479095.824054814-100586.824054814
93452469182815.463759315269653.536240685
94364839682437.496599533-317598.496599533
95358649127320.334527143231328.665472857
96376641427935.21662891-51294.21662891
97429112268811.704636681160300.295363319
98330546350866.583174919-20320.5831749190
99403560375265.52556974928294.474430251
100317892417816.658888574-99924.6588885743


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
811.14950965585681e-155.74754827928404e-16
916.50192402395504e-243.25096201197752e-24
1019.8389847131465e-264.91949235657325e-26
1111.09331675281288e-255.46658376406438e-26
1215.56955056448243e-282.78477528224121e-28
1311.19906892278859e-315.99534461394296e-32
1416.14506189946576e-343.07253094973288e-34
1516.80467709672857e-353.40233854836428e-35
1611.81358795447156e-389.06793977235778e-39
1711.00611277651984e-375.03056388259921e-38
1814.14645866930642e-382.07322933465321e-38
1916.45718189579459e-383.22859094789729e-38
2014.8059319749975e-372.40296598749875e-37
2111.28743242062180e-376.43716210310901e-38
2213.96508430295402e-371.98254215147701e-37
2311.39043656624749e-366.95218283123747e-37
2416.30361347947488e-363.15180673973744e-36
2512.30446578924454e-351.15223289462227e-35
2611.07255870838167e-345.36279354190836e-35
2712.8229844597628e-341.4114922298814e-34
2814.27595018248717e-342.13797509124359e-34
2915.71056452836322e-362.85528226418161e-36
3013.73588069179919e-351.86794034589960e-35
3111.52453543166418e-357.6226771583209e-36
3216.1702786543498e-353.0851393271749e-35
3316.03071074959444e-363.01535537479722e-36
3418.7183147117415e-364.35915735587075e-36
3514.62526601527646e-352.31263300763823e-35
3611.46046141829268e-347.30230709146342e-35
3711.12673394782425e-345.63366973912124e-35
3818.82644793150257e-364.41322396575128e-36
3912.49612257980424e-351.24806128990212e-35
4014.68516129621032e-352.34258064810516e-35
4113.15945586510931e-341.57972793255466e-34
4218.85011631103996e-344.42505815551998e-34
4312.13197647725125e-331.06598823862563e-33
4411.45530460245198e-327.2765230122599e-33
4511.08419570529626e-315.42097852648129e-32
4617.4121730740075e-313.70608653700375e-31
4712.02728265934929e-301.01364132967465e-30
4811.33020707434613e-296.65103537173064e-30
4918.83389851278769e-294.41694925639384e-29
5011.09850310028250e-285.49251550141249e-29
5111.66036095582744e-288.30180477913721e-29
5214.02085181224515e-282.01042590612258e-28
5312.46548157216292e-271.23274078608146e-27
5418.74873256765517e-284.37436628382759e-28
5518.1781997733751e-284.08909988668755e-28
5614.6803253177759e-272.34016265888795e-27
5715.30178978807201e-302.65089489403600e-30
5814.01979073556749e-292.00989536778375e-29
5914.11344415346927e-282.05672207673463e-28
6012.73768883310221e-271.36884441655110e-27
6119.16671822180903e-274.58335911090451e-27
6215.88655577201967e-282.94327788600983e-28
6314.19669479827719e-272.09834739913859e-27
6413.585170659887e-261.7925853299435e-26
6513.88709899949494e-251.94354949974747e-25
6612.63461669667776e-241.31730834833888e-24
6719.03853465591332e-244.51926732795666e-24
6815.5502768073258e-232.7751384036629e-23
6915.82214151830326e-222.91107075915163e-22
7013.45704794732006e-211.72852397366003e-21
7114.96030486154134e-212.48015243077067e-21
7215.30294113769182e-202.65147056884591e-20
7313.13731943233893e-191.56865971616947e-19
7413.36360402352731e-181.68180201176365e-18
7513.71466028589896e-171.85733014294948e-17
7611.16785932064480e-165.83929660322401e-17
7711.31203610752780e-156.56018053763902e-16
7816.97345101787183e-163.48672550893592e-16
790.9999999999999983.7449693448447e-151.87248467242235e-15
800.9999999999999764.75893121137737e-142.37946560568869e-14
810.9999999999997455.09366704066196e-132.54683352033098e-13
820.9999999999984293.14222237310169e-121.57111118655085e-12
830.9999999999858672.82653649342057e-111.41326824671029e-11
840.999999999952289.54390588863874e-114.77195294431937e-11
850.9999999993956751.20865028835267e-096.04325144176336e-10
860.9999999934033961.31932072034809e-086.59660360174044e-09
870.9999999582987188.34025633430263e-084.17012816715132e-08
880.9999995907942068.18411587533157e-074.09205793766579e-07
890.9999994797511281.04049774354137e-065.20248871770684e-07
900.999992820660211.43586795808325e-057.17933979041623e-06
910.999908072580560.0001838548388810429.1927419440521e-05
920.9990223264759420.001955347048116630.000977673524058315


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level851NOK
5% type I error level851NOK
10% type I error level851NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/10nn011291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/10nn011291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/1y4381291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/1y4381291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/2rwks1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/2rwks1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/3rwks1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/3rwks1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/4rwks1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/4rwks1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/5252d1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/5252d1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/6252d1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/6252d1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/7cejg1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/7cejg1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/8cejg1291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/8cejg1291392198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/9nn011291392198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12913921695t0euqjb8tf219f/9nn011291392198.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 5 ; 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