Home » date » 2009 » Dec » 17 »

Multiple Regression

*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: Thu, 17 Dec 2009 05:59:13 -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/Dec/17/t1261054818knjsmd0boqilttp.htm/, Retrieved Thu, 17 Dec 2009 14:00:30 +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/Dec/17/t1261054818knjsmd0boqilttp.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 «
107.1 0 96.3 87.0 96.8 115.2 0 107.1 96.3 87.0 106.1 0 115.2 107.1 96.3 89.5 0 106.1 115.2 107.1 91.3 0 89.5 106.1 115.2 97.6 0 91.3 89.5 106.1 100.7 0 97.6 91.3 89.5 104.6 0 100.7 97.6 91.3 94.7 0 104.6 100.7 97.6 101.8 0 94.7 104.6 100.7 102.5 0 101.8 94.7 104.6 105.3 0 102.5 101.8 94.7 110.3 0 105.3 102.5 101.8 109.8 0 110.3 105.3 102.5 117.3 0 109.8 110.3 105.3 118.8 0 117.3 109.8 110.3 131.3 0 118.8 117.3 109.8 125.9 0 131.3 118.8 117.3 133.1 0 125.9 131.3 118.8 147.0 0 133.1 125.9 131.3 145.8 0 147.0 133.1 125.9 164.4 0 145.8 147.0 133.1 149.8 0 164.4 145.8 147.0 137.7 0 149.8 164.4 145.8 151.7 0 137.7 149.8 164.4 156.8 0 151.7 137.7 149.8 180.0 0 156.8 151.7 137.7 180.4 0 180.0 156.8 151.7 170.4 0 180.4 180.0 156.8 191.6 0 170.4 180.4 180.0 199.5 0 191.6 170.4 180.4 218.2 0 199.5 191.6 170.4 217.5 0 218.2 199.5 191.6 205.0 0 217.5 218.2 199.5 194.0 0 205.0 217.5 218.2 199.3 0 194.0 205.0 217.5 219.3 0 199.3 194.0 205.0 211.1 0 219.3 199.3 194.0 215.2 0 211.1 219.3 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 time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 15.1707908539916 + 2.58019404216615D[t] + 1.2970254593017Y1[t] -0.140546777544707Y2[t] -0.292873046833665Y3[t] + 0.300136115162012t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)15.17079085399166.1343862.47310.015660.00783
D2.580194042166157.6361260.33790.7363880.368194
Y11.29702545930170.11275811.502700
Y2-0.1405467775447070.190226-0.73880.462310.231155
Y3-0.2928730468336650.114306-2.56220.0124070.006204
t0.3001361151620120.1750541.71450.0905610.04528


Multiple Linear Regression - Regression Statistics
Multiple R0.978714772026642
R-squared0.957882604983162
Adjusted R-squared0.955074778648706
F-TEST (value)341.147382667025
F-TEST (DF numerator)5
F-TEST (DF denominator)75
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation18.5544241079048
Sum Squared Residuals25819.9990482000


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1107.199.79679812001937.30320187998065
2115.2115.667880023444-0.467880023443807
3106.1122.232297825913-16.1322978259132
489.5106.428044457514-16.9280444575143
591.384.10426194457227.1957380554278
697.691.73726511990575.86273488009425
7100.7104.817370006527-4.11737000652681
8104.6107.725668862692-3.12566886269187
994.7110.803409063690-16.1034090636898
10101.896.80695425415634.99304574584372
11102.5106.565179345402-4.06517934540167
12105.3109.674794325161-4.37479432516073
13110.3111.428820349567-1.12882034956719
14109.8117.615541651329-7.81554165132895
15117.3115.7443866179821.55561338201768
16118.8124.378121832511-5.57812183251111
17131.3125.7161318284575.58386817154281
18125.9139.821718167321-13.9217181673209
19133.1130.9217725126942.17822748730556
20147137.6585314481499.34146855185073
21145.8156.556899102185-10.7568991021848
22164.4151.23831852111113.161681478889
23149.8171.760848961350-21.9608489613503
24137.7150.861690964576-13.1616909645764
25151.7132.07236330323419.6276366967656
26156.8156.5074183406830.292581659317393
27180164.99849327934515.0015067206552
28180.4190.572608829157-10.1726088291569
29170.4186.637217350151-16.2372173501507
30191.6167.11622547473724.4837745252632
31199.5196.2016198838083.29838011619154
32218.2206.69739591184311.5026040881572
33217.5223.932679980470-6.43267998046969
34205218.382976464049-13.3829764640485
35194197.091951106431-3.09195110643108
36199.3185.08665302136714.2133469786332
37219.3197.46795170924021.8320482907596
38211.1226.185302604620-15.0853026046198
39215.2211.4866672543953.71333274560472
40240.2212.39963039188827.8003696081124
41242.2246.950720185695-4.75072018569482
42240.7245.130458288825-4.43045828882452
43255.4235.88213648910319.5178635108971
44253254.873620928650-1.87362092864971
45218.2250.434167881831-32.2341678818310
46203.7201.6298964909462.07010350905378
47205.6188.71708661719016.8829133828098
48215.6203.71148140923511.8885185907648
49188.5220.961492419167-32.4614924191674
50202.9184.15031202282218.7496879771777
51214204.0077019550549.99229804494628
52230.3224.6178066410135.68219335898689
53230240.282016637642-10.2820166376418
54241234.6512418211816.34875817881907
55259.6247.06718540070212.5328145992977
56247.8270.033842419934-22.2338424199343
57270.3249.19330453783421.1066954621656
58289.7274.88752679120614.8124732087940
59322.7300.64355627470222.0564437252977
60315334.429281508696-19.4292815086957
61320.2314.4225408196865.77745918031379
62329.5312.88460896480016.6153910351997
63360.6326.77136106885533.8286389311451
64382.2364.57896409359917.621035906401
65435.4385.80012601248449.5998739875157
66464442.95785441100421.042145588996
67468.8466.5497722852092.25022771479086
68403453.47514667569-50.4751466756897
69351.6359.380213897142-7.78021389714243
70252300.855428741837-48.8554287418372
71188198.466979958003-10.4669799580030
72146.5144.8096203285591.69037967144065
73152.9129.44834911019523.4516508898050
74148.1162.626014430348-14.5260144303478
75165.1167.955160408173-2.85516040817264
76177189.104966363943-12.1049663639427
77206.1203.8562008513362.24379914866349
78244.9235.2484293832249.65157061677632
79228.6278.29805283542-49.6980528354201
80253.4243.480853332379.91914666762991
81241.1266.874659095047-25.7746590950468


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.02230446951759460.04460893903518920.977695530482405
100.01432628707217590.02865257414435170.985673712927824
110.007537196239786280.01507439247957260.992462803760214
120.002554527183124880.005109054366249760.997445472816875
130.00202244715647350.0040448943129470.997977552843527
140.0007632817730932240.001526563546186450.999236718226907
150.0009200109973752570.001840021994750510.999079989002625
160.0003619331446799820.0007238662893599640.99963806685532
170.0006809826287366770.001361965257473350.999319017371263
180.0002865021986587110.0005730043973174220.999713497801341
190.0002265751802658810.0004531503605317610.999773424819734
200.0001925547289611950.000385109457922390.999807445271039
218.03599389054704e-050.0001607198778109410.999919640061095
220.0001555239498699020.0003110478997398030.99984447605013
230.0002651520803159900.0005303041606319810.999734847919684
240.0002364233804145970.0004728467608291930.999763576619585
250.0001481899296122450.000296379859224490.999851810070388
266.41929908395996e-050.0001283859816791990.99993580700916
270.000168812811205640.000337625622411280.999831187188794
288.80625258630217e-050.0001761250517260430.999911937474137
296.7636498666953e-050.0001352729973339060.999932363501333
309.79538793228484e-050.0001959077586456970.999902046120677
314.78995994222496e-059.57991988444991e-050.999952100400578
326.88650748277579e-050.0001377301496555160.999931134925172
333.65537540240901e-057.31075080481801e-050.999963446245976
343.89079716364752e-057.78159432729505e-050.999961092028363
353.42426127995193e-056.84852255990387e-050.9999657573872
361.53029244667751e-053.06058489335501e-050.999984697075533
371.21800553574767e-052.43601107149534e-050.999987819944643
381.23070600818785e-052.46141201637571e-050.999987692939918
395.83025304774715e-061.16605060954943e-050.999994169746952
408.96665696003511e-061.79333139200702e-050.99999103334304
414.32367556395301e-068.64735112790601e-060.999995676324436
422.11257081655950e-064.22514163311901e-060.999997887429183
431.52600449770315e-063.05200899540631e-060.999998473995502
447.038922921419e-071.4077845842838e-060.999999296107708
452.18288626453530e-054.36577252907060e-050.999978171137355
462.40806152129645e-054.8161230425929e-050.999975919384787
471.83930006808305e-053.67860013616611e-050.99998160699932
489.5895617048996e-061.91791234097992e-050.999990410438295
490.0001825100055950500.0003650200111901000.999817489994405
500.0001134212897736950.0002268425795473910.999886578710226
516.13296360600287e-050.0001226592721200570.99993867036394
523.38716547974193e-056.77433095948387e-050.999966128345203
531.97693057429495e-053.9538611485899e-050.999980230694257
549.76853525306571e-061.95370705061314e-050.999990231464747
554.5704691866225e-069.140938373245e-060.999995429530813
563.72365684482919e-057.44731368965839e-050.999962763431552
573.21014241942270e-056.42028483884541e-050.999967898575806
581.83229603378106e-053.66459206756212e-050.999981677039662
592.11520315738060e-054.23040631476119e-050.999978847968426
600.0002000181448771990.0004000362897543990.999799981855123
610.000544234144785250.00108846828957050.999455765855215
620.0004231895961544210.0008463791923088430.999576810403846
630.0003957401364849960.0007914802729699920.999604259863515
640.0002546855333501030.0005093710667002050.99974531446665
650.002993411588894420.005986823177788840.997006588411106
660.01450776590724980.02901553181449960.98549223409275
670.08522187699172320.1704437539834460.914778123008277
680.1658721938728860.3317443877457710.834127806127114
690.3685676552294190.7371353104588390.63143234477058
700.5023710328555880.9952579342888240.497628967144412
710.3671514915911720.7343029831823430.632848508408828
720.2292090029483590.4584180058967170.770790997051641


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level540.84375NOK
5% type I error level580.90625NOK
10% type I error level580.90625NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/106muh1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/106muh1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/1djwk1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/1djwk1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/25sk41261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/25sk41261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/34mib1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/34mib1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/4onb41261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/4onb41261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/51uzh1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/51uzh1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/6r58o1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/6r58o1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/7ea331261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/7ea331261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/8p5am1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/8p5am1261054749.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/9tobr1261054749.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/17/t1261054818knjsmd0boqilttp/9tobr1261054749.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