Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
43 44 124 15 26 0 252 50 54 97 22 29 3 255 88 71 165 39 39 2 404 58 61 139 28 20 0 306 59 44 118 24 30 1 276 70 59 155 25 35 0 344 75 54 137 41 33 0 340 51 46 143 31 25 1 297 65 57 159 25 38 1 345 49 47 130 29 15 3 273 62 56 147 38 30 0 333 74 68 134 18 28 0 322 46 72 132 25 24 1 300 52 60 138 35 21 1 307 71 77 169 36 26 1 380 61 45 116 33 19 1 275 56 58 107 27 22 0 270 91 89 124 26 24 2 356 50 37 124 22 21 1 255 58 56 153 26 39 1 333 50 66 136 29 25 0 306 49 56 117 25 19 0 266 56 54 170 24 34 1 339 39 38 127 32 20 0 256 45 53 127 29 29 0 283 26 64 130 34 14 1 269 51 68 125 45 19 1 309 50 58 124 20 11 0 263 43 46 121 41 15 2 268 47 41 118 36 25 2 269 36 43 128 28 22 0 257 46 45 125 35 17 1 269 43 43 122 31 15 4 258 41 57 135 37 18 1 289 38 48 145 27 21 0 279 26 34 111 20 21 2 214 49 56 157 34 10 0 306 37 55 129 25 15 1 262 56 52 118 29 11 0 266 36 57 113 25 18 1 250 42 56 122 27 13 0 260 35 48 130 32 13 1 259 36 44 127 26 14 1 248 36 61 101 26 9 0 233 37 55 116 29 13 1 251 50 46 140 29 25 2 292 38 51 98 24 14 2 227 40 43 95 32 20 1 231 54 40 131 36 14 2 277 35 55 117 35 17 0 259 47 47 81 33 21 0 229 46 44 123 18 16 0 247 37 57 104 28 19 1 246 45 38 99 28 17 0 227 37 48 133 22 29 1 270 38 33 88 26 16 0 201 43 66 112 30 14 0 265 46 47 137 24 17 0 271 34 60 103 28 23 2 250 34 45 116 24 15 3 237 32 52 103 22 12 0 221 31 36 113 23 15 2 220 50 50 134 30 14 1 279 34 62 110 26 14 1 247 26 36 84 28 17 1 192 42 54 110 30 12 0 248 40 45 100 26 14 1 226 36 46 76 17 13 0 188 48 71 123 33 24 0 299 33 40 88 29 21 0 211 37 42 77 21 10 1 188 37 37 76 11 17 1 179 24 37 65 14 9 0 149 37 42 76 15 15 0 185 34 60 103 23 16 0 236 22 50 91 24 13 4 204 33 31 83 10 9 0 166 40 42 98 11 26 1 218 32 33 65 7 10 1 148 32 40 68 13 6 3 162 30 35 74 18 14 2 173 20 42 64 16 9 2 153 26 35 90 14 14 2 181 35 34 77 14 10 0 170 32 42 59 15 11 1 160 36 40 83 20 11 0 190 35 60 79 19 10 0 203 22 40 60 14 13 1 150 40 47 84 20 19 1 211 30 31 78 12 10 1 162 34 31 77 13 16 3 174 37 47 100 17 21 0 222 25 42 79 15 17 0 178 41 52 103 14 18 1 229 40 62 85 19 40 1 247 25 46 74 17 18 0 180 34 59 90 11 24 1 219 25 49 97 20 16 2 209 32 54 68 16 31 1 202 19 70 85 12 15 1 202 46 60 103 22 18 1 250 27 43 80 15 24 0 189 48 52 92 21 21 0 234 49 61 100 12 19 0 241 43 53 84 12 18 1 211 55 63 94 17 27 0 256 52 55 80 17 15 1 220 40 35 89 17 12 0 193 54 68 124 18 26 0 290 47 58 99 10 24 0 238 52 43 100 10 35 0 240 38 45 79 9 21 1 193 53 56 96 11 30 1 247 43 51 100 18 32 1 245 56 55 115 15 55 1 297 42 48 74 15 39 0 218 50 49 77 18 48 1 243 52 58 108 22 50 3 293 38 43 64 13 52 1 211 48 45 83 14 51 1 242 57 68 103 20 47 2 297 50 63 96 24 45 0 278 47 76 106 16 41 1 287 59 109 122 30 49 1 370 72 95 105 21 59 0 352 79 86 112 23 51 2 353 74 68 105 21 62 1 331 64 57 96 20 35 0 272 77 79 144 27 74 0 401 67 70 113 16 67 2 335 61 62 112 28 48 3 314 49 65 113 25 56 1 309 57 62 126 43 54 1 343 43 77 116 30 70 1 337 96 94 156 42 74 0 462 60 76 91 23 60 0 310 65 65 108 19 60 0 317 67 71 151 19 77 2 387 44 52 132 36 55 2 321 71 78 120 20 64 1 354 43 67 160 27 55 2 354 57 61 118 24 49 1 310 59 94 155 23 62 2 395 45 77 122 26 54 3 327 47 86 123 31 59 3 349 46 72 146 51 73 1 389 58 102 156 39 72 0 427 52 57 127 32 58 0 326 46 94 128 30 59 1 358 51 97 147 46 62 2 405 50 67 128 31 50 4 330 51 70 139 31 51 4 346 76 74 130 40 74 1 395 47 59 118 29 49 4 306 47 65 147 43 68 1 371 53 71 98 17 62 2 303 45 63 141 53 41 2 345 39 58 138 47 60 1 343 44 72 130 49 53 0 348 39 53 145 44 44 1 326 48 73 123 48 50 4 346 42 62 116 51 48 2 321 30 77 90 47 47 1 292 37 98 110 44 50 4 343 30 70 102 33 41 3 279 36 56 109 47 46 3 297 37 67 111 41 40 2 298 30 33 93 36 47 2 241 50 48 120 46 41 5 310 29 52 81 24 33 1 220 25 69 84 17 29 5 229 34 55 87 22 33 1 232 42 52 110 30 35 3 272 26 43 90 24 39 1 223 28 49 108 18 40 5 248 25 68 101 24 45 3 266 39 59 87 24 34 2 245 51 48 118 28 50 5 300 43 50 82 19 38 1 233 27 44 86 22 27 1 207 31 57 103 26 31 3 251 22 50 93 14 35 1 215 19 52 83 16 33 5 208 38 74 91 21 25 3 252 24 35 69 15 22 1 166 35 37 95 23 48 0 238 29 53 96 29 33 4 244 30 45 105 17 37 0 234 34 62 121 24 30 2 273 28 57 101 18 51 5 260 55 68 111 22 52 4 312 46 69 130 8 49 3 305 67 83 134 26 43 9 362 71 81 161 22 51 3 389 113 95 186 34 63 1 492 62 89 244 25 65 2 487 43 84 145 20 63 2 357 105 87 170 35 93 15 505 63 100 164 38 78 5 448 67 63 124 24 62 5 345 73 94 154 14 99 0 434 60 95 126 25 67 6 379 58 95 173 31 74 8 439 71 98 140 17 59 6 391 65 83 142 32 62 3 387 65 121 129 27 54 5 401 77 148 171 30 58 5 489 65 93 107 19 58 0 342 41 79 98 36 34 1 289 105 129 185 27 57 13 516 54 85 142 28 47 0 356 63 86 135 38 36 2 360 52 88 126 26 45 3 340 106 92 126 25 39 11 399 76 86 134 30 57 9 392 54 69 119 27 33 0 302 61 103 134 30 45 4 377 51 112 133 50 49 0 395 65 87 129 48 62 6 397 65 82 96 34 42 1 320 71 82 150 41 57 6 407 31 71 113 26 42 3 286 52 64 99 39 49 3 306 53 97 164 33 36 12 395 80 130 127 38 34 7 416 71 114 148 28 49 2 412 82 117 166 36 61 2 464 53 89 115 20 78 3 358 73 121 199 39 60 7 499 66 142 141 22 97 12 480 53 117 149 32 87 7 445 82 143 131 32 77 6 471 100 131 171 31 66 12 511 74 125 178 28 52 5 462 73 147 181 44 91 8 544 64 107 129 40 55 3 398
Names of X columns:
Industrie Bouw Handel Horeca Financiƫle_dienstverlening gezondheidszorg totaal_aantal_faillissementen
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