Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
12.9 0 26 50 21 86 96 149 2.1 7.5 7.4 0 51 68 26 62 75 152 1.5 2.5 12.2 1 57 62 22 70 70 139 2.0 6.0 12.8 0 37 54 22 71 88 148 2.0 6.5 7.4 1 67 71 18 108 114 158 2.1 1.0 6.7 1 43 54 23 64 69 128 2.0 1.0 12.6 1 52 65 12 119 176 224 2.3 5.5 14.8 0 52 73 20 97 114 159 2.1 8.5 13.3 1 43 52 22 129 121 105 2.1 6.5 11.1 1 84 84 21 153 110 159 2.2 4.5 8.2 1 67 42 19 78 158 167 2.1 2.0 11.4 1 49 66 22 80 116 165 2.1 5.0 6.4 1 70 65 15 99 181 159 2.1 0.5 10.6 1 52 78 20 68 77 119 2.0 5.0 12.0 0 58 73 19 147 141 176 2.3 5.0 6.3 0 68 75 18 40 35 54 1.8 2.5 11.9 1 43 66 20 120 152 163 2.2 5.5 9.3 0 56 70 21 71 97 124 2.0 3.5 10.0 0 74 81 15 68 84 121 2.0 4.0 6.4 1 65 71 16 55 68 153 1.8 0.5 13.8 1 63 69 23 137 101 148 2.2 6.5 10.8 0 58 71 21 79 107 221 2.2 4.5 13.8 1 57 72 18 116 88 188 1.7 7.5 11.7 1 63 68 25 101 112 149 2.1 5.5 10.9 1 53 70 9 111 171 244 2.3 4.0 9.9 1 64 67 23 81 66 150 2.0 4.0 11.5 0 53 76 16 63 93 153 2.0 5.5 8.3 0 29 70 16 69 105 94 1.9 2.5 11.7 0 54 60 19 71 131 156 2.0 5.5 6.1 1 51 77 25 70 89 146 2.0 0.5 9.0 1 58 72 25 64 102 132 2.0 3.5 9.7 1 43 69 18 143 161 161 2.1 2.5 10.8 1 51 71 23 85 120 105 2.0 4.5 10.3 1 53 62 21 86 127 97 1.8 4.5 10.4 0 54 70 10 55 77 151 2.0 4.5 9.3 1 61 58 22 120 85 166 2.2 2.5 11.8 0 47 76 26 96 168 157 2.1 5.0 5.9 1 39 52 23 60 48 111 1.8 0.0 11.4 1 48 59 23 95 152 145 1.9 5.0 13.0 1 50 68 24 100 75 162 2.1 6.5 10.8 1 35 76 24 68 107 163 2.0 5.0 11.3 0 68 67 23 105 121 187 2.2 4.5 11.8 1 49 59 15 85 124 109 2.0 5.5 12.7 0 67 76 16 57 40 105 1.7 7.5 10.9 1 43 60 19 49 126 148 2.0 5.0 13.3 1 62 63 18 93 148 125 2.0 7.0 10.1 1 57 70 27 58 146 116 1.9 4.5 14.3 1 54 66 13 74 97 138 2.0 8.5 9.3 1 61 64 28 107 118 164 2.1 3.5 12.5 0 56 70 23 65 58 162 2.0 6.0 7.6 0 41 75 21 58 63 99 1.9 1.5 15.9 1 43 61 19 107 139 202 2.2 9.0 9.2 0 53 60 19 70 50 186 2.1 3.5 11.1 0 66 73 18 136 152 183 2.3 4.0 13.0 1 58 61 19 126 142 214 2.3 6.5 14.5 1 46 66 17 95 94 188 2.2 7.5 12.3 0 51 59 25 136 127 177 2.2 5.0 11.4 0 51 64 19 58 67 126 1.9 5.5 7.3 1 45 66 26 110 96 157 1.8 1.0 12.6 0 37 78 14 82 128 139 2.0 6.5 13.0 0 42 67 16 102 146 162 2.1 6.5 13.2 0 66 66 20 90 186 159 2.1 7.0 7.7 1 53 71 24 83 85 110 2.0 1.5 4.35 1 52 51 23 34 41 48 0.75 0.5 12.7 1 16 56 22 61 146 50 1.5 7.5 18.1 1 46 67 21 70 182 150 3 9 17.85 1 56 69 25 69 192 154 2.25 9.5 17.1 1 50 55 27 120 439 194 3 8 19.1 0 59 63 23 147 214 158 3 10 16.1 1 60 67 23 215 341 159 3 7 13.35 0 52 65 18 24 58 67 0.75 8.5 18.4 0 44 47 18 84 292 147 3 9 14.7 1 67 76 23 30 85 39 2.25 9.5 10.6 1 52 64 19 77 200 100 1.5 4 12.6 1 55 68 15 46 158 111 1.5 6 16.2 1 37 64 20 61 199 138 2.25 8 13.6 1 54 65 16 178 297 101 3 5.5 14.1 1 51 63 25 57 108 101 1.5 7.5 14.5 1 48 60 25 42 86 114 2.25 7 16.15 0 60 68 19 163 302 165 2.25 7.5 14.75 1 50 72 19 75 148 114 1.5 8 14.8 1 63 70 16 94 178 111 2.25 7 12.45 1 33 61 19 45 120 75 1.5 7 12.65 1 67 61 19 78 207 82 2.25 6 17.35 1 46 62 23 47 157 121 2.25 10 8.6 1 54 71 21 29 128 32 3 2.5 18.4 0 59 71 22 97 296 150 3 9 16.1 1 61 51 19 116 323 117 3 8 17.75 1 47 70 20 50 70 165 3 8.5 15.25 1 69 73 3 118 146 154 3 6 17.65 1 52 76 23 66 246 126 2.25 9 15.6 0 55 59 14 48 145 138 1.5 8 16.35 0 55 68 23 86 196 149 2.25 8 17.65 0 41 48 20 89 199 145 2.25 9 13.6 1 73 52 15 76 127 120 3 5.5 11.7 0 51 59 13 39 91 138 0.75 5 14.35 0 52 60 16 75 153 109 2.25 7 14.75 0 50 59 7 57 299 132 3 5.5 18.25 1 51 57 24 72 228 172 3 9 9.9 0 60 79 17 60 190 169 1.5 2 16 1 56 60 24 109 180 114 2.25 8.5 18.25 1 56 60 24 76 212 156 3 9 16.85 0 29 59 19 65 269 172 2.25 8.5 18.95 1 73 61 28 123 243 167 2.25 10 15.6 0 55 71 23 71 190 113 1.5 9 17.1 0 43 58 19 93 157 173 3 8 16.1 1 61 59 23 19 96 2 3 10 15.4 1 56 58 25 49 222 165 2.25 7.5 15.4 1 56 60 25 49 222 165 2.25 7.5 13.35 1 47 55 20 86 165 118 2.25 6 19.1 0 25 62 16 69 249 158 3 10 7.6 0 46 69 20 52 122 49 1.5 3 19.1 1 51 68 25 94 274 155 3 10 14.75 0 48 72 25 87 268 151 3 5.5 19.25 1 47 19 23 121 255 220 3 10 13.6 0 58 68 17 58 132 141 1.5 6 12.75 1 51 79 20 50 92 122 1.5 5 9.85 1 55 71 16 64 171 44 2.25 4.5 15.25 1 57 71 23 56 117 152 1.5 7.5 11.9 0 60 74 12 102 219 107 1.5 5 16.35 0 56 75 24 100 279 154 2.25 8 12.4 1 49 53 11 67 148 103 1.5 5.5 14.35 0 43 50 14 62 130 154 0.75 7.5 18.15 1 59 70 23 55 181 175 2.25 9.5 17.75 0 58 78 18 86 234 143 3 8.5 12.35 1 53 59 29 43 85 110 0.75 6.5 15.6 1 48 72 16 23 66 131 3 6.5 19.3 0 51 70 19 77 236 167 3 10.5 17.1 0 59 63 16 26 135 137 3 8 18.4 1 62 74 23 94 218 121 3 10 19.05 0 51 67 19 62 199 149 3 9.5 18.55 0 64 66 4 74 112 168 3 9 19.1 0 52 62 20 114 278 140 3 10 12.85 1 50 73 20 64 113 168 2.25 4.5 9.5 1 54 67 4 31 84 94 0.75 4.5 4.5 1 58 61 24 38 86 51 0.75 0.5 13.6 1 63 74 16 105 222 145 3 4.5 11.7 1 31 32 3 64 167 66 2.25 5.5 13.35 0 71 69 24 65 207 109 2.25 6 17.75 1 54 60 23 48 85 128 3 8.5 17.6 0 43 57 17 71 237 164 3 8.5 14.05 1 41 60 20 76 102 119 3 5.5 16.1 0 63 68 22 63 221 126 3 7 13.35 1 63 68 19 46 128 132 2.25 5 11.85 1 56 73 24 53 91 142 2.25 3.5 11.95 0 51 69 19 74 198 83 3 5 13.2 1 41 65 27 56 138 166 2.25 5 7.7 0 66 81 22 52 196 93 2.25 1.5 14.6 0 44 55 23 68 139 117 1.5 8
Names of X columns:
TOT geslacht IM EM Numeracy_tot uren_rfc blogs zinvolle_teksten PE ruwe_examenscore
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, signif(mysum$coefficients[i,1],6), 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,signif(mysum$coefficients[i,1],6)) a<-table.element(a, signif(mysum$coefficients[i,2],6)) a<-table.element(a, signif(mysum$coefficients[i,3],4)) a<-table.element(a, signif(mysum$coefficients[i,4],6)) a<-table.element(a, signif(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, signif(sqrt(mysum$r.squared),6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a, signif(mysum$r.squared,6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a, signif(mysum$adj.r.squared,6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[1],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[2],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[3],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6)) 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, signif(mysum$sigma,6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a, signif(sum(myerror*myerror),6)) 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,signif(x[i],6)) a<-table.element(a,signif(x[i]-mysum$resid[i],6)) a<-table.element(a,signif(mysum$resid[i],6)) 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,signif(gqarr[mypoint-kp3+1,1],6)) a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6)) a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6)) 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,signif(numsignificant1,6)) a<-table.element(a,signif(numsignificant1/numgqtests,6)) 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,signif(numsignificant5,6)) a<-table.element(a,signif(numsignificant5/numgqtests,6)) 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,signif(numsignificant10,6)) a<-table.element(a,signif(numsignificant10/numgqtests,6)) 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
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation