Home » date » 2009 » Dec » 14 »

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: Mon, 14 Dec 2009 15:31:19 -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/14/t1260830109ig5xr85vfh36vkm.htm/, Retrieved Mon, 14 Dec 2009 23:35:21 +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/14/t1260830109ig5xr85vfh36vkm.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 «
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 199.3 240.2 0 215.2 211 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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 20.1262051422475 + 4.01724153834693D[t] + 1.26626523267027Y1[t] -0.0803516098227803Y2[t] -0.306798158642251Y3[t] -6.05261134619861M1[t] + 0.499696022840562M2[t] -4.75192659910419M3[t] -1.26056324317434M4[t] + 1.06889829441157M5[t] -8.30291994875169M6[t] -13.4549723969567M7[t] -18.0682013486370M8[t] -11.5986055519801M9[t] -6.88514406451962M10[t] -7.89200668271265M11[t] + 0.251263515884337t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)20.12620514224759.9103762.03080.0464980.023249
D4.017241538346938.0383060.49980.6189840.309492
Y11.266265232670270.12158910.414300
Y2-0.08035160982278030.203957-0.3940.6949380.347469
Y3-0.3067981586422510.125386-2.44680.0172140.008607
M1-6.0526113461986110.769735-0.5620.5761090.288054
M20.49969602284056210.8027440.04630.9632520.481626
M3-4.7519265991041910.876344-0.43690.6636740.331837
M4-1.2605632431743410.930399-0.11530.9085530.454277
M51.0688982944115710.935540.09770.9224450.461222
M6-8.3029199487516911.034938-0.75240.45460.2273
M7-13.454972396956710.995851-1.22360.2256450.112822
M8-18.068201348637010.848424-1.66550.1007760.050388
M9-11.598605551980111.209761-1.03470.304770.152385
M10-6.8851440645196211.158865-0.6170.5394510.269725
M11-7.8920066827126511.116314-0.70990.4803560.240178
t0.2512635158843370.187741.33840.1855890.092794


Multiple Linear Regression - Regression Statistics
Multiple R0.980540725989927
R-squared0.961460115324854
Adjusted R-squared0.95167220810577
F-TEST (value)98.2293858946853
F-TEST (DF numerator)16
F-TEST (DF denominator)63
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation19.2071413719472
Sum Squared Residuals23241.5996199639


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1115.2115.512563903109-0.312563903108759
2106.1128.851862911203-22.7518629112027
389.5108.364222034942-18.8642220349417
491.389.3329806088151.96701939118509
597.698.3186830477942-0.718683047794248
6100.7102.123815822118-1.42381582211837
7104.6100.0899972836364.51000271636403
894.798.4845478653572-3.7845478653572
9101.891.40493580436310.395064195637
10102.5104.959112078207-2.45911207820746
11105.3107.556703979584-2.25670397958450
12110.3117.011003776422-6.71100377642231
13109.8117.101238890906-7.301238890906
14117.3122.010884266182-4.71088426618217
15118.8125.013699416849-6.21369941684888
16131.3130.2064861433191.09351385668127
17125.9146.194013000616-20.2940130006163
18133.1128.771033656174.32896634383019
19147129.58627610909017.4137238909101
20145.8143.9035758733551.89642412664526
21164.4145.77908278793118.6209172120691
22149.8170.128268645603-20.3282686456027
23137.7149.758814993975-12.0588149939751
24151.7138.04696362992913.6530363700714
25156.8155.4248366520311.37516334796950
26180171.2736954056258.72630459437528
27180.4190.945722266427-10.5457222664268
28170.4191.766027274345-21.3660272743451
29191.6174.53424207668317.0657579233166
30199.5192.9393071167856.56069288321505
31218.2199.40654098073918.7934590192610
32217.5211.5848367150615.91516328493875
33205213.493029807774-8.49302980777357
34194196.948559963006-2.94855996300592
35199.3183.48319713515915.8168028648414
36219.3203.05651775798716.2434822420133
37211.1225.529390794082-14.4293907940818
38215.2218.716524333850-3.5165243338496
39240.2213.43077270943926.7692272905609
40242.2251.016333698603-8.81633369860295
41240.7252.862926521411-12.1629265214110
42255.4234.01231675942521.3876832405751
43253247.2325578448075.76744215519323
44218.2239.110584424171-20.9105844241707
45203.7197.4483245713206.25167542867976
46205.6187.58475530352018.0152446964797
47215.6201.07673440646614.5232655935342
48188.5226.178562173415-37.6785621734148
49202.9184.67499393808818.2250060619118
50214208.8223312132385.17766878676157
51230.3225.0346831075755.26531689242510
52230244.107636918433-14.1076369184332
53241241.593291601062-0.593291601062043
54259.6245.44219146858114.157808531419
55247.8263.302107603469-15.5021076034694
56270.3239.12889273439631.1711072656042
57289.7269.58242302718120.117576972819
58322.7300.92500059529521.7749994047051
59315333.494374371092-18.4943743710924
60320.2323.283914876317-3.08391487631701
61329.5314.56151441632914.9384855836708
62360.6335.08586941555325.5141305844469
63382.2367.12373864924615.0762613507536
64435.4392.86553660587742.5344633941231
65464451.53455453145912.4654454685408
66468.8467.7276395893051.07236041069461
67403450.285205693103-47.2852056931028
68351.6353.442872883286-1.84287288328556
69252298.892204001431-46.8922040014313
70188202.054303414369-14.0543034143687
71146.5144.0301751137242.46982488627646
72152.9135.32303778593117.5769622140695
73148.1160.595461405455-12.4954614054555
74165.1173.538832454349-8.4388324543493
75177188.487161815522-11.4871618155223
76206.1207.404998750608-1.30499875060823
77244.9240.6622892209744.23771077902616
78228.6274.683695587616-46.0836955876156
79253.4237.09731448515616.3026855148438
80241.1253.544689504375-12.4446895043748


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.1188228165394250.2376456330788500.881177183460575
210.05395930891658840.1079186178331770.946040691083412
220.04318681549714080.08637363099428150.95681318450286
230.01876767672882600.03753535345765190.981232323271174
240.008000131113620590.01600026222724120.99199986888638
250.004494214609834260.008988429219668520.995505785390166
260.005974512440073240.01194902488014650.994025487559927
270.002875081704889890.005750163409779780.99712491829511
280.002902015276494790.005804030552989580.997097984723505
290.004615382744932860.009230765489865730.995384617255067
300.002027152631151560.004054305262303120.997972847368849
310.001344458103082420.002688916206164840.998655541896918
320.0005995381882354150.001199076376470830.999400461811765
330.0008498253652388570.001699650730477710.99915017463476
340.0004261208648346640.0008522417296693280.999573879135165
350.0001831024772078010.0003662049544156020.999816897522792
369.7837348278315e-050.000195674696556630.999902162651722
370.0001020246032136400.0002040492064272790.999897975396786
385.69998977736926e-050.0001139997955473850.999943000102226
398.34840522075551e-050.0001669681044151100.999916515947793
405.01978147724308e-050.0001003956295448620.999949802185228
414.49479421650433e-058.98958843300865e-050.999955052057835
422.74538328833122e-055.49076657666244e-050.999972546167117
432.94665489343854e-055.89330978687708e-050.999970533451066
440.0001677798016978040.0003355596033956070.999832220198302
450.0002570249115267240.0005140498230534490.999742975088473
460.0001685097038160910.0003370194076321820.999831490296184
470.0001467413688321830.0002934827376643660.999853258631168
480.002023259869380980.004046519738761960.997976740130619
490.001452119530678480.002904239061356960.998547880469322
500.001009185352820680.002018370705641360.99899081464718
510.0006949790020988360.001389958004197670.9993050209979
520.0003781808095773030.0007563616191546060.999621819190423
530.0001622925559486030.0003245851118972070.999837707444051
546.44699813740608e-050.0001289399627481220.999935530018626
550.0002921968687728860.0005843937375457720.999707803131227
560.002091419664822610.004182839329645220.997908580335177
570.001046940819697260.002093881639394520.998953059180303
580.001076093369771890.002152186739543770.998923906630228
590.0005429179140404040.001085835828080810.99945708208596
600.01132197432517980.02264394865035950.98867802567482


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level340.829268292682927NOK
5% type I error level380.926829268292683NOK
10% type I error level390.951219512195122NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/10we741260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/10we741260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/16wv21260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/16wv21260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/2jwy21260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/2jwy21260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/3vakb1260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/3vakb1260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/4qjgd1260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/4qjgd1260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/50loa1260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/50loa1260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/6z4rt1260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/6z4rt1260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/7tf2f1260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/7tf2f1260829874.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/8kka91260829874.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260830109ig5xr85vfh36vkm/8kka91260829874.ps (open in new window)


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