Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1 1 1 13 38 38 14 14 1 2 2 16 32 32 18 18 1 3 3 19 35 35 11 11 1 4 4 15 33 33 12 12 1 5 5 14 37 37 16 16 1 6 6 13 29 29 18 18 1 7 7 19 31 31 14 14 1 8 8 15 36 36 14 14 1 9 9 14 35 35 15 15 1 10 10 15 38 38 15 15 1 11 11 16 31 31 17 17 1 12 12 16 34 34 19 19 1 13 13 16 35 35 10 10 1 14 14 16 38 38 16 16 1 15 15 17 37 37 18 18 1 16 16 15 33 33 14 14 1 17 17 15 32 32 14 14 1 18 18 20 38 38 17 17 1 19 19 18 38 38 14 14 1 20 20 16 32 32 16 16 1 21 21 16 33 33 18 18 1 22 22 16 31 31 11 11 1 23 23 19 38 38 14 14 1 24 24 16 39 39 12 12 1 25 25 17 32 32 17 17 1 26 26 17 32 32 9 9 1 27 27 16 35 35 16 16 1 28 28 15 37 37 14 14 1 29 29 16 33 33 15 15 1 30 30 14 33 33 11 11 1 31 31 15 31 31 16 16 1 32 32 12 32 32 13 13 1 33 33 14 31 31 17 17 1 34 34 16 37 37 15 15 1 35 35 14 30 30 14 14 1 36 36 10 33 33 16 16 1 37 37 10 31 31 9 9 1 38 38 14 33 33 15 15 1 39 39 16 31 31 17 17 1 40 40 16 33 33 13 13 1 41 41 16 32 32 15 15 1 42 42 14 33 33 16 16 1 43 43 20 32 32 16 16 1 44 44 14 33 33 12 12 1 45 45 14 28 28 15 15 1 46 46 11 35 35 11 11 1 47 47 14 39 39 15 15 1 48 48 15 34 34 15 15 1 49 49 16 38 38 17 17 1 50 50 14 32 32 13 13 1 51 51 16 38 38 16 16 1 52 52 14 30 30 14 14 1 53 53 12 33 33 11 11 1 54 54 16 38 38 12 12 1 55 55 9 32 32 12 12 1 56 56 14 35 35 15 15 1 57 57 16 34 34 16 16 1 58 58 16 34 34 15 15 1 59 59 15 36 36 12 12 1 60 60 16 34 34 12 12 1 61 61 12 28 28 8 8 1 62 62 16 34 34 13 13 1 63 63 16 35 35 11 11 1 64 64 14 35 35 14 14 1 65 65 16 31 31 15 15 1 66 66 17 37 37 10 10 1 67 67 18 35 35 11 11 1 68 68 18 27 27 12 12 1 69 69 12 40 40 15 15 1 70 70 16 37 37 15 15 1 71 71 10 36 36 14 14 1 72 72 14 38 38 16 16 1 73 73 18 39 39 15 15 1 74 74 18 41 41 15 15 1 75 75 16 27 27 13 13 1 76 76 17 30 30 12 12 1 77 77 16 37 37 17 17 1 78 78 16 31 31 13 13 1 79 79 13 31 31 15 15 1 80 80 16 27 27 13 13 1 81 81 16 36 36 15 15 1 82 82 16 37 37 15 15 1 83 83 15 33 33 16 16 1 84 84 15 34 34 15 15 1 85 85 16 31 31 14 14 1 86 86 14 39 39 15 15 1 87 87 16 34 34 14 14 1 88 88 16 32 32 13 13 1 89 89 15 33 33 7 7 1 90 90 12 36 36 17 17 1 91 91 17 32 32 13 13 1 92 92 16 41 41 15 15 1 93 93 15 28 28 14 14 1 94 94 13 30 30 13 13 1 95 95 16 36 36 16 16 1 96 96 16 35 35 12 12 1 97 97 16 31 31 14 14 1 98 98 16 34 34 17 17 1 99 99 14 36 36 15 15 1 100 100 16 36 36 17 17 1 101 101 16 35 35 12 12 1 102 102 20 37 37 16 16 1 103 103 15 28 28 11 11 1 104 104 16 39 39 15 15 1 105 105 13 32 32 9 9 1 106 106 17 35 35 16 16 1 107 107 16 39 39 15 15 1 108 108 16 35 35 10 10 1 109 109 12 42 42 10 10 1 110 110 16 34 34 15 15 1 111 111 16 33 33 11 11 1 112 112 17 41 41 13 13 1 113 113 13 33 33 14 14 1 114 114 12 34 34 18 18 1 115 115 18 32 32 16 16 1 116 116 14 40 40 14 14 1 117 117 14 40 40 14 14 1 118 118 13 35 35 14 14 1 119 119 16 36 36 14 14 1 120 120 13 37 37 12 12 1 121 121 16 27 27 14 14 1 122 122 13 39 39 15 15 1 123 123 16 38 38 15 15 1 124 124 15 31 31 15 15 1 125 125 16 33 33 13 13 1 126 126 15 32 32 17 17 1 127 127 17 39 39 17 17 1 128 128 15 36 36 19 19 1 129 129 12 33 33 15 15 1 130 130 16 33 33 13 13 1 131 131 10 32 32 9 9 1 132 132 16 37 37 15 15 1 133 133 12 30 30 15 15 1 134 134 14 38 38 15 15 1 135 135 15 29 29 16 16 1 136 136 13 22 22 11 11 1 137 137 15 35 35 14 14 1 138 138 11 35 35 11 11 1 139 139 12 34 34 15 15 1 140 140 11 35 35 13 13 1 141 141 16 34 34 15 15 1 142 142 15 37 37 16 16 1 143 143 17 35 35 14 14 1 144 144 16 23 23 15 15 1 145 145 10 31 31 16 16 1 146 146 18 27 27 16 16 1 147 147 13 36 36 11 11 1 148 148 16 31 31 12 12 1 149 149 13 32 32 9 9 1 150 150 10 39 39 16 16 1 151 151 15 37 37 13 13 1 152 152 16 38 38 16 16 1 153 153 16 39 39 12 12 1 154 154 14 34 34 9 9 1 155 155 10 31 31 13 13 1 156 156 17 32 32 13 13 1 157 157 13 37 37 14 14 1 158 158 15 36 36 19 19 1 159 159 16 32 32 13 13 1 160 160 12 38 38 12 12 1 161 161 13 36 36 13 13 0 162 0 13 26 0 10 0 0 163 0 12 26 0 14 0 0 164 0 17 33 0 16 0 0 165 0 15 39 0 10 0 0 166 0 10 30 0 11 0 0 167 0 14 33 0 14 0 0 168 0 11 25 0 12 0 0 169 0 13 38 0 9 0 0 170 0 16 37 0 9 0 0 171 0 12 31 0 11 0 0 172 0 16 37 0 16 0 0 173 0 12 35 0 9 0 0 174 0 9 25 0 13 0 0 175 0 12 28 0 16 0 0 176 0 15 35 0 13 0 0 177 0 12 33 0 9 0 0 178 0 12 30 0 12 0 0 179 0 14 31 0 16 0 0 180 0 12 37 0 11 0 0 181 0 16 36 0 14 0 0 182 0 11 30 0 13 0 0 183 0 19 36 0 15 0 0 184 0 15 32 0 14 0 0 185 0 8 28 0 16 0 0 186 0 16 36 0 13 0 0 187 0 17 34 0 14 0 0 188 0 12 31 0 15 0 0 189 0 11 28 0 13 0 0 190 0 11 36 0 11 0 0 191 0 14 36 0 11 0 0 192 0 16 40 0 14 0 0 193 0 12 33 0 15 0 0 194 0 16 37 0 11 0 0 195 0 13 32 0 15 0 0 196 0 15 38 0 12 0 0 197 0 16 31 0 14 0 0 198 0 16 37 0 14 0 0 199 0 14 33 0 8 0 0 200 0 16 32 0 13 0 0 201 0 16 30 0 9 0 0 202 0 14 30 0 15 0 0 203 0 11 31 0 17 0 0 204 0 12 32 0 13 0 0 205 0 15 34 0 15 0 0 206 0 15 36 0 15 0 0 207 0 16 37 0 14 0 0 208 0 16 36 0 16 0 0 209 0 11 33 0 13 0 0 210 0 15 33 0 16 0 0 211 0 12 33 0 9 0 0 212 0 12 44 0 16 0 0 213 0 15 39 0 11 0 0 214 0 15 32 0 10 0 0 215 0 16 35 0 11 0 0 216 0 14 25 0 15 0 0 217 0 17 35 0 17 0 0 218 0 14 34 0 14 0 0 219 0 13 35 0 8 0 0 220 0 15 39 0 15 0 0 221 0 13 33 0 11 0 0 222 0 14 36 0 16 0 0 223 0 15 32 0 10 0 0 224 0 12 32 0 15 0 0 225 0 13 36 0 9 0 0 226 0 8 36 0 16 0 0 227 0 14 32 0 19 0 0 228 0 14 34 0 12 0 0 229 0 11 33 0 8 0 0 230 0 12 35 0 11 0 0 231 0 13 30 0 14 0 0 232 0 10 38 0 9 0 0 233 0 16 34 0 15 0 0 234 0 18 33 0 13 0 0 235 0 13 32 0 16 0 0 236 0 11 31 0 11 0 0 237 0 4 30 0 12 0 0 238 0 13 27 0 13 0 0 239 0 16 31 0 10 0 0 240 0 10 30 0 11 0 0 241 0 12 32 0 12 0 0 242 0 12 35 0 8 0 0 243 0 10 28 0 12 0 0 244 0 13 33 0 12 0 0 245 0 15 31 0 15 0 0 246 0 12 35 0 11 0 0 247 0 14 35 0 13 0 0 248 0 10 32 0 14 0 0 249 0 12 21 0 10 0 0 250 0 12 20 0 12 0 0 251 0 11 34 0 15 0 0 252 0 10 32 0 13 0 0 253 0 12 34 0 13 0 0 254 0 16 32 0 13 0 0 255 0 12 33 0 12 0 0 256 0 14 33 0 12 0 0 257 0 16 37 0 9 0 0 258 0 14 32 0 9 0 0 259 0 13 34 0 15 0 0 260 0 4 30 0 10 0 0 261 0 15 30 0 14 0 0 262 0 11 38 0 15 0 0 263 0 11 36 0 7 0 0 264 0 14 32 0 14 0
Names of X columns:
Pop t Pop_t Doorzettingsvermogen Zelfstandig Zelfstandig_p Stressbestendig Stressbestendig_p
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
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') }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation