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.3 0 62 72 15 57 80 91 2.0 5.0 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 9.6 1 56 61 21 84 99 137 2.1 3.0 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 16.1 1 57 68 30 189 137 148 2.7 7.5 13.4 0 51 61 20 66 77 92 1.9 7.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 12.7 1 56 64 14 69 108 131 2.2 6.0 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 12.3 1 30 65 18 57 62 59 1.9 6.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 7.9 1 61 69 19 103 72 90 2.0 1.0 12.7 0 67 76 16 57 40 105 1.7 7.5 12.3 1 47 63 25 51 58 83 2.0 6.0 11.6 1 56 75 23 69 97 116 2.2 5.0 6.7 1 50 63 17 41 88 42 1.7 1.0 10.9 1 43 60 19 49 126 148 2.0 5.0 12.1 1 67 73 21 50 104 155 2.2 6.5 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 5.7 0 41 75 21 54 80 128 2.0 0.0 14.3 1 54 66 13 74 97 138 2.0 8.5 8.0 0 45 63 8 15 25 49 1.6 3.5 13.3 1 48 63 29 69 99 96 2.1 7.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 9.1 1 44 62 20 53 60 66 1.8 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.2 0 37 64 19 69 66 104 2.1 6.0 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 8.8 0 56 60 22 59 90 76 1.8 3.5 14.6 1 66 56 23 118 75 99 2.1 7.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 12.6 1 38 59 24 65 69 108 2.1 6.5 13.2 0 66 66 20 90 186 159 2.1 7.0 9.9 0 34 68 12 64 81 74 1.8 3.5 7.7 1 53 71 24 83 85 110 2.0 1.5 10.5 0 49 66 22 70 54 96 2.1 4.0 13.4 0 55 73 12 50 46 116 1.9 7.5 10.9 0 49 72 22 77 106 87 2.1 4.5 4.3 1 59 71 20 37 34 97 1.0 0.0 10.3 0 40 59 10 81 60 127 2.2 3.5 11.8 1 58 64 23 101 95 106 2.1 5.5 11.2 1 60 66 17 79 57 80 1.9 5.0 11.4 0 63 78 22 71 62 74 2.0 4.5 8.6 0 56 68 24 60 36 91 1.9 2.5 13.2 0 54 73 18 55 56 133 2.0 7.5 12.6 1 52 62 21 44 54 74 1.8 7.0 5.6 1 34 65 20 40 64 114 2.0 0.0 9.9 1 69 68 20 56 76 140 2.0 4.5 8.8 0 32 65 22 43 98 95 2.0 3.0 7.7 1 48 60 19 45 88 98 1.8 1.5 9.0 0 67 71 20 32 35 121 2.0 3.5 7.3 1 58 65 26 56 102 126 1.1 2.5 11.4 1 57 68 23 40 61 98 1.8 5.5 13.6 1 42 64 24 34 80 95 1.8 8.0 7.9 1 64 74 21 89 49 110 2.0 1.0 10.7 1 58 69 21 50 78 70 1.9 5.0 10.3 0 66 76 19 56 90 102 2.1 4.5 8.3 1 26 68 8 46 45 86 1.6 3.0 9.6 1 61 72 17 76 55 130 2.2 3.0 14.2 1 52 67 20 64 96 96 1.9 8.0 8.5 0 51 63 11 74 43 102 2.0 2.5 13.5 0 55 59 8 57 52 100 2.1 7.0 4.9 0 50 73 15 45 60 94 1.3 0.0 6.4 0 60 66 18 30 54 52 1.8 1.0 9.6 0 56 62 18 62 51 98 1.9 3.5 11.6 0 63 69 19 51 51 118 2.1 5.5 11.1 1 61 66 19 36 38 99 1.8 5.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
par3 <- 'No Linear Trend' par2 <- 'Do not include Seasonal Dummies' par1 <- '1' 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