Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
12.9 26 50 4 0 13 12 21 149 12.2 57 62 4 1 8 8 22 139 12.8 37 54 5 0 14 11 22 148 7.4 67 71 4 1 16 13 18 158 6.7 43 54 4 1 14 11 23 128 12.6 52 65 9 1 13 10 12 224 14.8 52 73 8 0 15 7 20 159 13.3 43 52 11 1 13 10 22 105 11.1 84 84 4 1 20 15 21 159 8.2 67 42 4 1 17 12 19 167 11.4 49 66 6 1 15 12 22 165 6.4 70 65 4 1 16 10 15 159 10.6 52 78 8 1 12 10 20 119 12 58 73 4 0 17 14 19 176 6.3 68 75 4 0 11 6 18 54 11.9 43 66 4 1 16 14 20 163 9.3 56 70 4 0 15 11 21 124 10 74 81 6 0 14 12 15 121 6.4 65 71 4 1 19 15 16 153 13.8 63 69 8 1 16 13 23 148 10.8 58 71 5 0 17 11 21 221 13.8 57 72 4 1 10 12 18 188 11.7 63 68 9 1 15 7 25 149 10.9 53 70 4 1 14 11 9 244 9.9 64 67 4 1 15 12 23 150 11.5 53 76 4 0 17 13 16 153 8.3 29 70 7 0 14 9 16 94 11.7 54 60 12 0 16 11 19 156 9 58 72 7 1 15 12 25 132 9.7 43 69 5 1 16 15 18 161 10.8 51 71 8 1 16 12 23 105 10.3 53 62 5 1 10 6 21 97 10.4 54 70 4 0 8 5 10 151 9.3 61 58 7 1 14 11 22 166 11.8 47 76 4 0 10 6 26 157 5.9 39 52 4 1 14 12 23 111 11.4 48 59 4 1 12 10 23 145 13 50 68 4 1 16 6 24 162 10.8 35 76 4 1 16 12 24 163 11.3 68 67 4 0 8 6 23 187 11.8 49 59 7 1 16 12 15 109 12.7 67 76 4 0 8 8 16 105 10.9 43 60 4 1 16 12 19 148 13.3 62 63 4 1 19 14 18 125 10.1 57 70 4 1 14 12 27 116 14.3 54 66 12 1 13 14 13 138 9.3 61 64 4 1 15 11 28 164 12.5 56 70 5 0 11 10 23 162 7.6 41 75 15 0 9 7 21 99 15.9 43 61 5 1 16 12 19 202 9.2 53 60 10 0 12 7 19 186 11.1 66 73 8 0 14 12 18 183 13 58 61 4 1 14 10 19 214 14.5 46 66 5 1 13 10 17 188 12.3 51 59 9 0 17 12 25 177 11.4 51 64 4 0 14 12 19 126 12.6 37 78 4 0 7 5 14 139 12.6 37 78 4 0 7 5 14 139 13.2 66 66 4 0 15 11 20 159 7.7 53 71 4 1 16 12 24 110 4.35 52 51 6 1 16 9 23 48 12.7 16 56 4 1 16 11 22 50 18.1 46 67 8 1 16 12 21 150 17.85 56 69 5 1 16 12 25 154 17.1 50 55 4 1 14 12 27 194 19.1 59 63 4 0 15 12 23 158 16.1 60 67 8 1 16 10 23 159 13.35 52 65 4 0 13 15 18 67 18.4 44 47 7 0 10 10 18 147 14.7 67 76 4 1 17 15 23 39 10.6 52 64 4 1 15 10 19 100 12.6 55 68 5 1 18 15 15 111 16.2 37 64 7 1 16 9 20 138 13.6 54 65 4 1 20 15 16 101 14.1 51 63 7 1 17 13 25 101 14.5 48 60 11 1 16 12 25 114 16.15 60 68 7 0 15 12 19 165 14.75 50 72 4 1 13 8 19 114 14.8 63 70 4 1 16 9 16 111 12.45 33 61 4 1 16 15 19 75 12.65 67 61 4 1 16 12 19 82 17.35 46 62 4 1 17 12 23 121 8.6 54 71 4 1 20 15 21 32 18.4 59 71 6 0 14 11 22 150 16.1 61 51 8 1 17 12 19 117 17.75 47 70 4 1 16 14 20 165 15.25 69 73 8 1 15 12 3 154 17.65 52 76 6 1 16 12 23 126 16.35 55 68 4 0 16 12 23 149 17.65 41 48 7 0 14 11 20 145 13.6 73 52 4 1 16 12 15 120 14.35 52 60 4 0 16 12 16 109 14.75 50 59 4 0 16 12 7 132 18.25 51 57 10 1 14 12 24 172 9.9 60 79 6 0 14 8 17 169 16 56 60 5 1 16 8 24 114 18.25 56 60 5 1 16 12 24 156 16.85 29 59 4 0 15 12 19 172 18.95 73 61 5 1 18 11 28 167 15.6 55 71 5 0 15 12 23 113 17.1 43 58 4 0 14 10 19 173 16.1 61 59 4 1 18 11 23 2 15.4 56 58 8 1 15 11 25 165 15.4 56 60 8 1 15 11 25 165 13.35 47 55 8 1 16 13 20 118 19.1 25 62 4 0 11 7 16 158 7.6 46 69 9 0 7 8 20 49 19.1 51 68 4 1 15 11 25 155 14.75 48 72 4 0 14 8 25 151 19.25 47 19 28 1 16 14 23 220 13.6 58 68 4 0 14 9 17 141 12.75 51 79 5 1 11 13 20 122 9.85 55 71 4 1 18 13 16 44 15.25 57 71 5 1 18 11 23 152 11.9 60 74 4 0 15 9 12 107 16.35 56 75 4 0 13 12 24 154 12.4 49 53 10 1 13 12 11 103 18.15 59 70 4 1 18 13 23 175 17.75 58 78 4 0 15 11 18 143 12.35 53 59 5 1 16 11 29 110 15.6 48 72 8 1 12 9 16 131 19.3 51 70 6 0 16 12 19 167 17.1 59 63 4 0 16 15 16 137 18.4 62 74 4 1 19 14 23 121 19.05 51 67 5 0 15 12 19 149 18.55 64 66 5 0 14 9 4 168 19.1 52 62 6 0 14 9 20 140 12.85 50 73 4 1 16 13 20 168 9.5 54 67 4 1 20 15 4 94 4.5 58 61 6 1 16 11 24 51 13.6 63 74 10 1 13 10 16 145 11.7 31 32 4 1 15 11 3 66 13.35 71 69 4 0 16 14 24 109 17.6 43 57 4 0 19 12 17 164 14.05 41 60 14 1 13 13 20 119 16.1 63 68 5 0 14 11 22 126 13.35 63 68 5 1 15 11 19 132 11.85 56 73 5 1 15 13 24 142 11.95 51 69 5 0 14 12 19 83 13.2 41 65 16 1 12 9 27 166 7.7 66 81 7 0 15 13 22 93 14.6 44 55 5 0 16 12 23 117
Names of X columns:
Totaal Tot_Intr._Motv Tot_Extr._Motv Demotivatie Geslacht_Bin Zelfvertrouwen_statis Zelfvertrouwen_software NUMERACYTOT LFM
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