Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
21 12.9 149 96 86 13 12 22 12.2 139 70 70 8 8 22 12.8 148 88 71 14 11 18 7.4 158 114 108 16 13 23 6.7 128 69 64 14 11 12 12.6 224 176 119 13 10 20 14.8 159 114 97 15 7 22 13.3 105 121 129 13 10 21 11.1 159 110 153 20 15 19 8.2 167 158 78 17 12 22 11.4 165 116 80 15 12 15 6.4 159 181 99 16 10 20 10.6 119 77 68 12 10 19 12.0 176 141 147 17 14 18 6.3 54 35 40 11 6 15 11.3 91 80 57 16 12 20 11.9 163 152 120 16 14 21 9.3 124 97 71 15 11 21 9.6 137 99 84 13 8 15 10.0 121 84 68 14 12 16 6.4 153 68 55 19 15 23 13.8 148 101 137 16 13 21 10.8 221 107 79 17 11 18 13.8 188 88 116 10 12 25 11.7 149 112 101 15 7 9 10.9 244 171 111 14 11 30 16.1 148 137 189 14 7 20 13.4 92 77 66 16 12 23 9.9 150 66 81 15 12 16 11.5 153 93 63 17 13 16 8.3 94 105 69 14 9 19 11.7 156 131 71 16 11 25 9.0 132 102 64 15 12 18 9.7 161 161 143 16 15 23 10.8 105 120 85 16 12 21 10.3 97 127 86 10 6 10 10.4 151 77 55 8 5 14 12.7 131 108 69 17 13 22 9.3 166 85 120 14 11 26 11.8 157 168 96 10 6 23 5.9 111 48 60 14 12 23 11.4 145 152 95 12 10 24 13.0 162 75 100 16 6 24 10.8 163 107 68 16 12 18 12.3 59 62 57 16 11 23 11.3 187 121 105 8 6 15 11.8 109 124 85 16 12 19 7.9 90 72 103 15 12 16 12.7 105 40 57 8 8 25 12.3 83 58 51 13 10 23 11.6 116 97 69 14 11 17 6.7 42 88 41 13 7 19 10.9 148 126 49 16 12 21 12.1 155 104 50 19 13 18 13.3 125 148 93 19 14 27 10.1 116 146 58 14 12 21 5.7 128 80 54 15 6 13 14.3 138 97 74 13 14 8 8.0 49 25 15 10 10 29 13.3 96 99 69 16 12 28 9.3 164 118 107 15 11 23 12.5 162 58 65 11 10 21 7.6 99 63 58 9 7 19 15.9 202 139 107 16 12 19 9.2 186 50 70 12 7 20 9.1 66 60 53 12 12 18 11.1 183 152 136 14 12 19 13.0 214 142 126 14 10 17 14.5 188 94 95 13 10 19 12.2 104 66 69 15 12 25 12.3 177 127 136 17 12 19 11.4 126 67 58 14 12 22 8.8 76 90 59 11 8 23 14.6 99 75 118 9 10 14 12.6 139 128 82 7 5 16 13.0 162 146 102 15 10 24 12.6 108 69 65 12 12 20 13.2 159 186 90 15 11 12 9.9 74 81 64 14 9 24 7.7 110 85 83 16 12 22 10.5 96 54 70 14 11 12 13.4 116 46 50 13 10 22 10.9 87 106 77 16 12 20 4.3 97 34 37 13 10 10 10.3 127 60 81 16 9 23 11.8 106 95 101 16 11 17 11.2 80 57 79 16 12 22 11.4 74 62 71 10 7 24 8.6 91 36 60 12 11 18 13.2 133 56 55 12 12 21 12.6 74 54 44 12 6 20 5.6 114 64 40 12 9 20 9.9 140 76 56 19 15 22 8.8 95 98 43 14 10 19 7.7 98 88 45 13 11 20 9.0 121 35 32 16 12 26 7.3 126 102 56 15 12 23 11.4 98 61 40 12 12 24 13.6 95 80 34 8 11 21 7.9 110 49 89 10 9 21 10.7 70 78 50 16 11 19 10.3 102 90 56 16 12 8 8.3 86 45 46 10 12 17 9.6 130 55 76 18 14 20 14.2 96 96 64 12 8 11 8.5 102 43 74 16 10 8 13.5 100 52 57 10 9 15 4.9 94 60 45 14 10 18 6.4 52 54 30 12 9 18 9.6 98 51 62 11 10 19 11.6 118 51 51 15 12 19 11.1 99 38 36 7 11 23 4.4 48 41 34 16 9 22 12.7 50 146 61 16 11 21 18.1 150 182 70 16 12 25 17.9 154 192 69 16 12 30 16.6 109 263 145 12 7 17 12.6 68 35 23 15 12 27 17.1 194 439 120 14 12 23 19.1 158 214 147 15 12 23 16.1 159 341 215 16 10 18 13.4 67 58 24 13 15 18 18.4 147 292 84 10 10 23 14.7 39 85 30 17 15 19 10.6 100 200 77 15 10 15 12.6 111 158 46 18 15 20 16.2 138 199 61 16 9 16 13.6 101 297 178 20 15 24 18.9 131 227 160 16 12 25 14.1 101 108 57 17 13 25 14.5 114 86 42 16 12 19 16.2 165 302 163 15 12 19 14.8 114 148 75 13 8 16 14.8 111 178 94 16 9 19 12.5 75 120 45 16 15 19 12.7 82 207 78 16 12 23 17.4 121 157 47 17 12 21 8.6 32 128 29 20 15 22 18.4 150 296 97 14 11 19 16.1 117 323 116 17 12 20 11.6 71 79 32 6 6 20 17.8 165 70 50 16 14 3 15.3 154 146 118 15 12 23 17.7 126 246 66 16 12 23 16.4 149 196 86 16 12 20 17.7 145 199 89 14 11 15 13.6 120 127 76 16 12 16 14.4 109 153 75 16 12 7 14.8 132 299 57 16 12 24 18.3 172 228 72 14 12 17 9.9 169 190 60 14 8 24 16.0 114 180 109 16 8 24 18.3 156 212 76 16 12 19 16.9 172 269 65 15 12 25 14.6 68 130 40 16 11 20 13.9 89 179 58 16 10 28 19.0 167 243 123 18 11 23 15.6 113 190 71 15 12 27 14.9 115 299 102 16 13 18 11.8 78 121 80 16 12 28 18.5 118 137 97 16 12 21 15.9 87 305 46 17 10 19 17.1 173 157 93 14 10 23 16.1 2 96 19 18 11 27 19.9 162 183 140 9 8 22 11.0 49 52 78 15 12 28 18.5 122 238 98 14 9 25 15.1 96 40 40 15 12 21 15.0 100 226 80 13 9 22 11.4 82 190 76 16 11 28 16.0 100 214 79 20 15 20 18.1 115 145 87 14 8 29 14.6 141 119 95 12 8 25 15.4 165 222 49 15 11 25 15.4 165 222 49 15 11 20 17.6 110 159 80 15 11 20 13.4 118 165 86 16 13 16 19.1 158 249 69 11 7 20 15.4 146 125 79 16 12 20 7.6 49 122 52 7 8 23 13.4 90 186 120 11 8 18 13.9 121 148 69 9 4 25 19.1 155 274 94 15 11 18 15.3 104 172 72 16 10 19 12.9 147 84 43 14 7 25 16.1 110 168 87 15 12 25 17.4 108 102 52 13 11 25 13.2 113 106 71 13 9 24 12.2 115 2 61 12 10 19 12.6 61 139 51 16 8 26 10.4 60 95 50 14 8 10 15.4 109 130 67 16 11 17 9.6 68 72 30 14 12 13 18.2 111 141 70 15 10 17 13.6 77 113 52 10 10 30 14.9 73 206 75 16 12 25 14.8 151 268 87 14 8 4 14.1 89 175 69 16 11 16 14.9 78 77 72 12 8 21 16.3 110 125 79 16 10 23 19.3 220 255 121 16 14 22 13.6 65 111 43 15 9 17 13.6 141 132 58 14 9 20 15.7 117 211 57 16 10 20 12.8 122 92 50 11 13 22 14.6 63 76 69 15 12 16 9.9 44 171 64 18 13 23 12.7 52 83 38 13 8 0 19.2 131 266 90 7 3 18 16.6 101 186 96 7 8 25 11.2 42 50 49 17 12 23 15.3 152 117 56 18 11 12 11.9 107 219 102 15 9 18 13.2 77 246 40 8 12 24 16.4 154 279 100 13 12 11 12.4 103 148 67 13 12 18 15.9 96 137 78 15 10 23 18.2 175 181 55 18 13 24 11.2 57 98 59 16 9 29 15.7 112 226 96 14 12 18 17.8 143 234 86 15 11 15 7.7 49 138 38 19 14 29 12.4 110 85 43 16 11 16 15.6 131 66 23 12 9 19 19.3 167 236 77 16 12 22 15.2 56 106 48 11 8 16 17.1 137 135 26 16 15 23 15.6 86 122 91 15 12 23 18.4 121 218 94 19 14 19 19.1 149 199 62 15 12 4 18.6 168 112 74 14 9 20 19.1 140 278 114 14 9 24 13.1 88 94 52 17 13 20 12.9 168 113 64 16 13 4 9.5 94 84 31 20 15 24 4.5 51 86 38 16 11 22 11.9 48 62 27 9 7 16 13.6 145 222 105 13 10 3 11.7 66 167 64 15 11 15 12.4 85 82 62 19 14 24 13.4 109 207 65 16 14 17 11.4 63 184 58 17 13 20 14.9 102 83 76 16 12 27 19.9 162 183 140 9 8 26 11.2 86 89 68 11 13 23 14.6 114 225 80 14 9 17 17.6 164 237 71 19 12 20 14.1 119 102 76 13 13 22 16.1 126 221 63 14 11 19 13.4 132 128 46 15 11 24 11.9 142 91 53 15 13 19 12.0 83 198 74 14 12 23 14.8 94 204 70 16 12 15 15.2 81 158 78 17 10 27 13.2 166 138 56 12 9 26 16.9 110 226 100 15 10 22 7.9 64 44 51 17 13 22 7.7 93 196 52 15 13 18 12.6 104 83 102 10 9 15 7.9 105 79 78 16 11 22 11.0 49 52 78 15 12 27 12.4 88 105 55 11 8 10 10.0 95 116 98 16 12 20 14.9 102 83 76 16 12 17 16.7 99 196 73 16 12 23 13.4 63 153 47 14 9 19 14.0 76 157 45 14 12 13 15.7 109 75 83 16 12 27 16.9 117 106 60 16 11 23 11.0 57 58 48 18 12 16 15.4 120 75 50 14 6 25 12.2 73 74 56 20 7 2 15.1 91 185 77 15 10 26 17.8 108 265 91 16 12 20 15.2 105 131 76 16 10 23 14.6 117 139 68 16 12 22 16.7 119 196 74 12 9 24 8.1 31 78 29 8 3
Names of X columns:
Numeracy Examen LFM B H Confstat Confsoft
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
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