Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
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 16.6 0 52 57 30 145 263 109 3 8.5 12.6 1 55 56 17 23 35 68 1.5 7 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 18.9 1 72 71 24 160 227 131 3 9.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 11.6 1 33 56 20 32 79 71 1.5 6 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 14.6 1 66 62 25 40 130 68 1.5 9 13.85 1 66 59 20 58 179 89 2.25 7.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 14.85 0 64 57 27 102 299 115 2.25 7.5 11.75 0 40 66 18 80 121 78 1.5 6 18.45 0 46 63 28 97 137 118 2.25 10.5 15.9 1 58 69 21 46 305 87 3 8.5 17.1 0 43 58 19 93 157 173 3 8 16.1 1 61 59 23 19 96 2 3 10 19.9 0 51 48 27 140 183 162 3 10.5 10.95 1 50 66 22 78 52 49 1.5 6.5 18.45 0 52 73 28 98 238 122 2.25 9.5 15.1 1 54 67 25 40 40 96 1.5 8.5 15 0 66 61 21 80 226 100 2.25 7.5 11.35 0 61 68 22 76 190 82 2.25 5 15.95 1 80 75 28 79 214 100 2.25 8 18.1 0 51 62 20 87 145 115 3 10 14.6 1 56 69 29 95 119 141 1.5 7 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 17.6 1 53 74 20 80 159 110 3 9.5 13.35 1 47 55 20 86 165 118 2.25 6 19.1 0 25 62 16 69 249 158 3 10 15.35 1 47 63 20 79 125 146 2.25 7 7.6 0 46 69 20 52 122 49 1.5 3 13.4 0 50 58 23 120 186 90 3 6 13.9 0 39 58 18 69 148 121 1.5 7 19.1 1 51 68 25 94 274 155 3 10 15.25 0 58 72 18 72 172 104 3 7 12.9 1 35 62 19 43 84 147 3 3.5 16.1 0 58 62 25 87 168 110 3 8 17.35 0 60 65 25 52 102 108 2.25 10 13.15 0 62 69 25 71 106 113 2.25 5.5 12.15 0 63 66 24 61 2 115 0.75 6 12.6 1 53 72 19 51 139 61 3 6.5 10.35 1 46 62 26 50 95 60 0.75 6.5 15.4 1 67 75 10 67 130 109 1.5 8.5 9.6 1 59 58 17 30 72 68 1.5 4 18.2 0 64 66 13 70 141 111 3 9.5 13.6 0 38 55 17 52 113 77 1.5 8 14.85 1 50 47 30 75 206 73 2.25 8.5 14.75 0 48 72 25 87 268 151 3 5.5 14.1 0 48 62 4 69 175 89 3 7 14.9 0 47 64 16 72 77 78 1.5 9 16.25 0 66 64 21 79 125 110 3 8 19.25 1 47 19 23 121 255 220 3 10 13.6 1 63 50 22 43 111 65 1.5 8 13.6 0 58 68 17 58 132 141 1.5 6 15.65 0 44 70 20 57 211 117 2.25 8 12.75 1 51 79 20 50 92 122 1.5 5 14.6 0 43 69 22 69 76 63 1.5 9 9.85 1 55 71 16 64 171 44 2.25 4.5 12.65 1 38 48 23 38 83 52 1.5 8.5 11.9 1 56 66 16 53 119 62 2.25 7 19.2 0 45 73 0 90 266 131 3 9.5 16.6 1 50 74 18 96 186 101 3 8.5 11.2 1 54 66 25 49 50 42 0.75 7.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 13.2 0 55 78 18 40 246 77 2.25 7 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 15.85 1 37 60 18 78 137 96 2.25 8.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 11.15 1 46 69 24 59 98 57 0.75 7 15.65 0 51 65 29 96 226 112 2.25 8 17.75 0 58 78 18 86 234 143 3 8.5 7.65 0 64 78 15 38 138 49 0.75 3.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 15.2 0 47 63 22 48 106 56 3 8.5 17.1 0 59 63 16 26 135 137 3 8 15.6 1 62 71 23 91 122 86 1.5 10 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 13.1 1 67 80 24 52 94 88 1.5 7.5 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 11.85 0 56 73 22 27 62 48 2.25 6.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 12.4 1 65 69 15 62 82 85 3 5 13.35 0 71 69 24 65 207 109 2.25 6 11.4 0 50 84 17 58 184 63 3 4 14.9 1 57 64 20 76 83 102 1.5 8 19.9 0 47 58 27 140 183 162 3 10.5 17.75 1 54 60 23 48 85 128 3 8.5 11.2 1 47 59 26 68 89 86 0.75 6.5 14.6 1 57 78 23 80 225 114 1.5 8 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 14.75 1 50 67 23 70 204 94 1.5 9 15.15 0 22 60 15 78 158 81 2.25 8.5 13.2 1 41 65 27 56 138 166 2.25 5 16.85 0 59 66 26 100 226 110 2.25 9.5 7.85 1 56 74 22 51 44 64 0.75 3 7.7 0 66 81 22 52 196 93 2.25 1.5 12.6 0 53 72 18 102 83 104 1.5 6 7.85 1 42 55 15 78 79 105 2.25 0.5 10.95 1 52 49 22 78 52 49 1.5 6.5 12.35 0 54 74 27 55 105 88 0.75 7.5 9.95 1 44 53 10 98 116 95 1.5 4.5 14.9 1 62 64 20 76 83 102 1.5 8 16.65 0 53 65 17 73 196 99 2.25 9 13.4 1 50 57 23 47 153 63 1.5 7.5 13.95 0 36 51 19 45 157 76 1.5 8.5 15.7 0 76 80 13 83 75 109 3 7 16.85 1 66 67 27 60 106 117 2.25 9.5 10.95 1 62 70 23 48 58 57 1.5 6.5 15.35 0 59 74 16 50 75 120 0.75 9.5 12.2 1 47 75 25 56 74 73 2.25 6 15.1 0 55 70 2 77 185 91 3 8 17.75 0 58 69 26 91 265 108 3 9.5 15.2 1 60 65 20 76 131 105 1.5 8 14.6 0 44 55 23 68 139 117 1.5 8 16.65 0 57 71 22 74 196 119 2.25 9 8.1 1 45 65 24 29 78 31 0.75 5
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
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation