Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
11.3 0 62 72 15 57 80 91 2.0 5.0 9.6 1 56 61 21 84 99 137 2.1 3.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 12.7 1 56 64 14 69 108 131 2.2 6.0 12.3 1 30 65 18 57 62 59 1.9 6.0 7.9 1 61 69 19 103 72 90 2.0 1.0 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 12.1 1 67 73 21 50 104 155 2.2 6.5 5.7 0 41 75 21 54 80 128 2.0 0.0 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.1 1 44 62 20 53 60 66 1.8 3.5 12.2 0 37 64 19 69 66 104 2.1 6.0 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 12.6 1 38 59 24 65 69 108 2.1 6.5 9.9 0 34 68 12 64 81 74 1.8 3.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 16.6 0 52 57 30 145 263 109 3 8.5 12.6 1 55 56 17 23 35 68 1.5 7 18.9 1 72 71 24 160 227 131 3 9.5 11.6 1 33 56 20 32 79 71 1.5 6 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 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 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 17.6 1 53 74 20 80 159 110 3 9.5 15.35 1 47 63 20 79 125 146 2.25 7 13.4 0 50 58 23 120 186 90 3 6 13.9 0 39 58 18 69 148 121 1.5 7 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.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 13.6 1 63 50 22 43 111 65 1.5 8 15.65 0 44 70 20 57 211 117 2.25 8 14.6 0 43 69 22 69 76 63 1.5 9 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 13.2 0 55 78 18 40 246 77 2.25 7 15.85 1 37 60 18 78 137 96 2.25 8.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 7.65 0 64 78 15 38 138 49 0.75 3.5 15.2 0 47 63 22 48 106 56 3 8.5 15.6 1 62 71 23 91 122 86 1.5 10 13.1 1 67 80 24 52 94 88 1.5 7.5 11.85 0 56 73 22 27 62 48 2.25 6.5 12.4 1 65 69 15 62 82 85 3 5 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 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 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 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 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 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