Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
0 12 149 1.11627907 12.9 0 8 139 1 12.2 1 11 148 1.23943662 12.8 0 13 158 1.055555556 7.4 1 11 128 1.078125 6.7 1 10 224 1.478991597 12.6 1 7 159 1.175257732 14.8 0 10 105 0.937984496 13.3 1 15 159 0.718954248 11.1 1 12 167 2.025641026 8.2 1 12 165 1.45 11.4 1 10 159 1.828282828 6.4 1 10 119 1.132352941 10.6 1 14 176 0.959183673 12 0 6 54 0.875 6.3 0 12 91 1.403508772 11.3 0 14 163 1.266666667 11.9 1 11 124 1.366197183 9.3 0 8 137 1.178571429 9.6 1 12 121 1.235294118 10 0 15 153 1.236363636 6.4 1 13 148 0.737226277 13.8 1 11 221 1.35443038 10.8 0 12 188 0.75862069 13.8 1 7 149 1.108910891 11.7 1 11 244 1.540540541 10.9 1 7 148 0.724867725 16.1 1 12 92 1.166666667 13.4 0 12 150 0.814814815 9.9 1 13 153 1.476190476 11.5 0 9 94 1.52173913 8.3 0 11 156 1.845070423 11.7 0 12 132 1.59375 9 1 15 161 1.125874126 9.7 1 12 105 1.411764706 10.8 1 6 97 1.476744186 10.3 1 5 151 1.4 10.4 1 13 131 1.565217391 12.7 0 11 166 0.708333333 9.3 1 6 157 1.75 11.8 1 12 111 0.8 5.9 0 10 145 1.6 11.4 1 6 162 0.75 13 1 12 163 1.573529412 10.8 1 11 59 1.087719298 12.3 1 6 187 1.152380952 11.3 1 12 109 1.458823529 11.8 0 12 90 0.699029126 7.9 1 8 105 0.701754386 12.7 1 10 83 1.137254902 12.3 0 11 116 1.405797101 11.6 1 7 42 2.146341463 6.7 1 12 148 2.571428571 10.9 1 13 155 2.08 12.1 1 14 125 1.591397849 13.3 1 12 116 2.517241379 10.1 1 6 128 1.481481481 5.7 1 14 138 1.310810811 14.3 0 10 49 1.666666667 8 1 12 96 1.434782609 13.3 0 11 164 1.102803738 9.3 1 10 162 0.892307692 12.5 1 7 99 1.086206897 7.6 0 12 202 1.299065421 15.9 0 7 186 0.714285714 9.2 1 12 66 1.132075472 9.1 0 12 183 1.117647059 11.1 1 10 214 1.126984127 13 0 10 188 0.989473684 14.5 1 12 104 0.956521739 12.2 1 12 177 0.933823529 12.3 0 12 126 1.155172414 11.4 0 8 76 1.525423729 8.8 0 10 99 0.63559322 14.6 0 5 139 1.56097561 12.6 1 10 78 0.82 NA 1 10 162 1.431372549 13 0 12 108 1.061538462 12.6 1 11 159 2.066666667 13.2 0 9 74 1.265625 9.9 1 12 110 1.024096386 7.7 0 11 96 0.771428571 10.5 0 10 116 0.92 13.4 1 12 87 1.376623377 10.9 0 10 97 0.918918919 4.3 0 9 127 0.740740741 10.3 0 11 106 0.940594059 11.8 1 12 80 0.721518987 11.2 0 7 74 0.873239437 11.4 1 11 91 0.6 8.6 1 12 133 1.018181818 13.2 0 6 74 1.227272727 12.6 0 9 114 1.6 5.6 0 15 140 1.357142857 9.9 1 10 95 2.279069767 8.8 1 11 98 1.955555556 7.7 1 12 121 1.09375 9 0 12 126 1.821428571 7.3 1 12 98 1.525 11.4 0 11 95 2.352941176 13.6 1 9 110 0.550561798 7.9 1 11 70 1.56 10.7 1 12 102 1.607142857 10.3 1 12 86 0.97826087 8.3 1 14 130 0.723684211 9.6 0 8 96 1.5 14.2 1 10 102 0.581081081 8.5 1 9 100 0.912280702 13.5 1 10 94 1.333333333 4.9 0 9 52 1.8 6.4 0 10 98 0.822580645 9.6 0 12 118 1 11.6 0 11 99 1.055555556 11.1 0 9 48 1.202071864 4.35 0 11 50 2.386671692 12.7 1 12 150 2.597165791 18.1 1 12 154 2.780370072 17.85 1 7 109 1.813483908 16.6 1 12 68 1.494732846 12.6 1 12 194 3.663446895 17.1 0 12 158 1.451976773 19.1 1 10 159 1.583677134 16.1 1 15 67 2.463774956 13.35 0 10 147 3.494669233 18.4 1 15 39 2.84714727 14.7 0 10 100 2.59362257 10.6 0 15 111 3.449530602 12.6 1 9 138 3.287354423 16.2 1 15 101 1.666593926 13.6 1 12 131 1.420896145 18.9 1 13 101 1.892099705 14.1 1 12 114 2.028979809 14.5 1 12 165 1.854457812 16.15 1 8 114 1.960531787 14.75 1 9 111 1.886553595 14.8 0 15 75 2.653204112 12.45 1 12 82 2.650165369 12.65 1 12 121 3.366409759 17.35 1 15 32 4.432346123 8.6 1 11 150 3.048831081 18.4 1 12 117 2.78707896 16.1 1 6 71 2.437602852 11.6 0 14 165 1.386924385 17.75 1 12 154 1.234335957 15.25 1 12 126 3.737386952 17.65 1 12 149 2.271022894 16.35 1 11 145 2.231393375 17.65 1 12 120 1.663331757 13.6 0 12 109 2.040937319 14.35 0 12 132 5.256295689 14.75 0 12 172 3.186978738 18.25 1 8 169 3.154850583 9.9 0 8 114 1.657827478 16 0 12 156 2.786092899 18.25 0 12 172 4.157829204 16.85 1 11 68 3.253977083 14.6 0 10 89 3.085394173 13.85 1 11 167 1.974829279 18.95 1 12 113 2.676087748 15.6 0 13 115 2.938302205 14.85 1 12 78 1.52151285 11.75 1 12 118 1.40896573 18.45 1 10 87 6.682327738 15.9 0 10 173 1.696706252 17.1 0 11 2 4.926304986 16.1 0 8 162 1.30443047 19.9 0 12 49 0.670266245 10.95 1 9 122 2.433199197 18.45 0 12 96 0.998675368 15.1 1 9 100 2.820974235 15 0 11 82 2.50988911 11.35 1 15 100 2.710471412 15.95 0 8 115 1.674354155 18.1 1 8 141 1.251350957 14.6 0 11 165 4.514387067 15.4 0 11 165 4.514387067 15.4 1 11 110 1.979157302 17.6 0 13 118 1.920608387 13.35 1 7 158 3.629649425 19.1 1 12 146 1.582790495 15.35 1 8 49 2.34019086 7.6 1 8 90 1.54775003 13.4 1 4 121 2.15829961 13.9 0 11 155 2.918939073 19.1 1 10 104 2.380805906 15.25 0 7 147 1.953892277 12.9 0 12 110 1.92379262 16.1 0 11 108 1.974172321 17.35 1 9 113 1.493366728 13.15 0 10 115 0.032849713 12.15 1 8 61 2.738331719 12.6 0 8 60 1.897070081 10.35 0 11 109 1.949001137 15.4 0 12 68 2.37702212 9.6 0 10 111 2.016350073 18.2 1 10 77 2.166803379 13.6 1 12 73 2.74018157 14.85 1 8 151 3.07241577 14.75 1 11 89 2.55164034 14.1 0 8 78 1.070014128 14.9 0 10 110 1.591371232 16.25 1 14 220 2.10554805 19.25 0 9 65 2.594434561 13.6 0 9 141 2.266256528 13.6 0 10 117 3.700762466 15.65 0 13 122 1.85790817 12.75 1 12 63 1.101227611 14.6 1 13 44 2.684458399 9.85 0 8 52 2.210091865 12.65 0 3 131 2.966983938 19.2 1 8 101 1.946760632 16.6 0 12 42 1.021317159 11.2 1 11 152 2.102079622 15.25 1 9 107 2.149370919 11.9 1 12 77 6.22215977 13.2 0 12 154 2.786408629 16.35 1 12 103 2.198192103 12.4 1 10 96 1.751439113 15.85 1 13 175 3.263711495 18.15 0 9 57 1.672902115 11.15 0 12 112 2.365776496 15.65 0 11 143 2.719042009 17.75 1 14 49 3.620041389 7.65 1 11 110 1.994914923 12.35 0 9 131 2.888578202 15.6 1 12 167 3.053204679 19.3 1 8 56 2.217779431 15.2 0 15 137 5.217167271 17.1 0 12 86 1.345332688 15.6 0 14 121 2.321172417 18.4 1 12 149 3.192726787 19.05 1 9 168 1.517089836 18.55 0 9 140 2.444959104 19.1 0 13 88 1.796111609 13.1 0 13 168 1.773708306 12.85 1 15 94 2.7 9.5 1 11 51 2.26381983 4.5 0 7 48 2.32245981 11.85 0 10 145 2.111414637 13.6 0 11 66 2.59516019 11.7 1 14 85 1.324010244 12.4 1 14 109 3.200769697 13.35 1 13 63 3.177328914 11.4 1 12 102 1.09368423 14.9 0 8 162 1.30443047 19.9 1 13 86 1.315146764 11.2 1 9 114 2.805680637 14.6 1 12 164 3.353734036 17.6 0 13 119 1.347305389 14.05 0 11 126 3.528065772 16.1 1 11 132 2.772363006 13.35 0 13 142 1.703278135 11.85 1 12 83 2.6730969 11.95 1 12 94 2.932075969 14.75 1 10 81 2.017150031 15.15 0 9 166 2.471137728 13.2 1 10 110 2.26995628 16.85 0 13 64 0.855351618 7.85 1 13 93 3.793548387 7.7 1 9 104 0.810597449 12.6 0 11 105 1.00980333 7.85 1 12 49 0.670266245 10.95 0 8 88 1.893360715 12.35 1 12 95 1.184815298 9.95 0 12 102 1.09368423 14.9 1 12 99 2.69969353 16.65 0 9 63 3.255896436 13.4 0 12 76 3.497481467 13.95 1 12 109 0.904277231 15.7 1 11 117 1.756582581 16.85 0 12 57 1.210877016 10.95 1 6 120 1.513928139 15.35 1 7 73 1.315490593 12.2 0 10 91 2.392439031 15.1 1 12 108 2.90221895 17.75 0 10 105 1.725929938 15.2 0 12 117 2.045579969 14.6 1 9 119 2.634526636 16.65 1 3 31 2.665578159 8.1
Names of X columns:
gender CONFSOFTTOT LFM BOH TOT
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