R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(3440,2678,2981,2260,2844,2546,2456,2295,2379,2479,2057,2280,2351,2276,2548,2311,2201,2725,2408,2139,1898,2539,2070,2063,2565,2442,2194,2798,2074,2628,2289,2154,2467,2137,1850,2075,1791,1755,2232,1952,1822,2522,2074,2366,2173,2094,1833,1858,2040,2133,2921,3252,3318,3554,2308,1621,1315,1501,1418,1657),dim=c(1,60),dimnames=list(c('Bouwvergunningen'),1:60)) > y <- array(NA,dim=c(1,60),dimnames=list(c('Bouwvergunningen'),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 Bouwvergunningen M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 3440 1 0 0 0 0 0 0 0 0 0 0 1 2 2678 0 1 0 0 0 0 0 0 0 0 0 2 3 2981 0 0 1 0 0 0 0 0 0 0 0 3 4 2260 0 0 0 1 0 0 0 0 0 0 0 4 5 2844 0 0 0 0 1 0 0 0 0 0 0 5 6 2546 0 0 0 0 0 1 0 0 0 0 0 6 7 2456 0 0 0 0 0 0 1 0 0 0 0 7 8 2295 0 0 0 0 0 0 0 1 0 0 0 8 9 2379 0 0 0 0 0 0 0 0 1 0 0 9 10 2479 0 0 0 0 0 0 0 0 0 1 0 10 11 2057 0 0 0 0 0 0 0 0 0 0 1 11 12 2280 0 0 0 0 0 0 0 0 0 0 0 12 13 2351 1 0 0 0 0 0 0 0 0 0 0 13 14 2276 0 1 0 0 0 0 0 0 0 0 0 14 15 2548 0 0 1 0 0 0 0 0 0 0 0 15 16 2311 0 0 0 1 0 0 0 0 0 0 0 16 17 2201 0 0 0 0 1 0 0 0 0 0 0 17 18 2725 0 0 0 0 0 1 0 0 0 0 0 18 19 2408 0 0 0 0 0 0 1 0 0 0 0 19 20 2139 0 0 0 0 0 0 0 1 0 0 0 20 21 1898 0 0 0 0 0 0 0 0 1 0 0 21 22 2539 0 0 0 0 0 0 0 0 0 1 0 22 23 2070 0 0 0 0 0 0 0 0 0 0 1 23 24 2063 0 0 0 0 0 0 0 0 0 0 0 24 25 2565 1 0 0 0 0 0 0 0 0 0 0 25 26 2442 0 1 0 0 0 0 0 0 0 0 0 26 27 2194 0 0 1 0 0 0 0 0 0 0 0 27 28 2798 0 0 0 1 0 0 0 0 0 0 0 28 29 2074 0 0 0 0 1 0 0 0 0 0 0 29 30 2628 0 0 0 0 0 1 0 0 0 0 0 30 31 2289 0 0 0 0 0 0 1 0 0 0 0 31 32 2154 0 0 0 0 0 0 0 1 0 0 0 32 33 2467 0 0 0 0 0 0 0 0 1 0 0 33 34 2137 0 0 0 0 0 0 0 0 0 1 0 34 35 1850 0 0 0 0 0 0 0 0 0 0 1 35 36 2075 0 0 0 0 0 0 0 0 0 0 0 36 37 1791 1 0 0 0 0 0 0 0 0 0 0 37 38 1755 0 1 0 0 0 0 0 0 0 0 0 38 39 2232 0 0 1 0 0 0 0 0 0 0 0 39 40 1952 0 0 0 1 0 0 0 0 0 0 0 40 41 1822 0 0 0 0 1 0 0 0 0 0 0 41 42 2522 0 0 0 0 0 1 0 0 0 0 0 42 43 2074 0 0 0 0 0 0 1 0 0 0 0 43 44 2366 0 0 0 0 0 0 0 1 0 0 0 44 45 2173 0 0 0 0 0 0 0 0 1 0 0 45 46 2094 0 0 0 0 0 0 0 0 0 1 0 46 47 1833 0 0 0 0 0 0 0 0 0 0 1 47 48 1858 0 0 0 0 0 0 0 0 0 0 0 48 49 2040 1 0 0 0 0 0 0 0 0 0 0 49 50 2133 0 1 0 0 0 0 0 0 0 0 0 50 51 2921 0 0 1 0 0 0 0 0 0 0 0 51 52 3252 0 0 0 1 0 0 0 0 0 0 0 52 53 3318 0 0 0 0 1 0 0 0 0 0 0 53 54 3554 0 0 0 0 0 1 0 0 0 0 0 54 55 2308 0 0 0 0 0 0 1 0 0 0 0 55 56 1621 0 0 0 0 0 0 0 1 0 0 0 56 57 1315 0 0 0 0 0 0 0 0 1 0 0 57 58 1501 0 0 0 0 0 0 0 0 0 1 0 58 59 1418 0 0 0 0 0 0 0 0 0 0 1 59 60 1657 0 0 0 0 0 0 0 0 0 0 0 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 2245.875 371.577 198.179 523.781 470.383 414.785 M6 M7 M8 M9 M10 M11 765.188 284.390 99.592 38.194 148.996 -148.202 t -7.202 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -559.98 -239.81 -11.51 163.27 1039.05 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2245.875 209.629 10.714 3.3e-14 *** M1 371.577 255.025 1.457 0.15176 M2 198.179 254.644 0.778 0.44032 M3 523.781 254.299 2.060 0.04499 * M4 470.383 253.990 1.852 0.07032 . M5 414.785 253.717 1.635 0.10876 M6 765.188 253.480 3.019 0.00409 ** M7 284.390 253.279 1.123 0.26721 M8 99.592 253.115 0.393 0.69576 M9 38.194 252.987 0.151 0.88064 M10 148.996 252.895 0.589 0.55858 M11 -148.202 252.840 -0.586 0.56058 t -7.202 3.041 -2.368 0.02203 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 399.7 on 47 degrees of freedom Multiple R-squared: 0.4031, Adjusted R-squared: 0.2507 F-statistic: 2.645 on 12 and 47 DF, p-value: 0.008631 > 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 + } [,1] [,2] [,3] [1,] 0.3852963559 0.7705927118 0.6147036 [2,] 0.2380483528 0.4760967056 0.7619516 [3,] 0.2762643023 0.5525286046 0.7237357 [4,] 0.1969809643 0.3939619287 0.8030190 [5,] 0.1211477952 0.2422955905 0.8788522 [6,] 0.0712408091 0.1424816182 0.9287592 [7,] 0.0574617921 0.1149235841 0.9425382 [8,] 0.0382560682 0.0765121363 0.9617439 [9,] 0.0196789973 0.0393579946 0.9803210 [10,] 0.0118822464 0.0237644928 0.9881178 [11,] 0.0096884239 0.0193768478 0.9903116 [12,] 0.0060293568 0.0120587136 0.9939706 [13,] 0.0221230908 0.0442461816 0.9778769 [14,] 0.0148937258 0.0297874516 0.9851063 [15,] 0.0103591096 0.0207182192 0.9896409 [16,] 0.0052633550 0.0105267100 0.9947366 [17,] 0.0027021623 0.0054043247 0.9972978 [18,] 0.0043820433 0.0087640866 0.9956180 [19,] 0.0026961332 0.0053922663 0.9973039 [20,] 0.0014209621 0.0028419242 0.9985790 [21,] 0.0009286033 0.0018572065 0.9990714 [22,] 0.0015775876 0.0031551751 0.9984224 [23,] 0.0009425367 0.0018850734 0.9990575 [24,] 0.0004965422 0.0009930843 0.9995035 [25,] 0.0011656267 0.0023312533 0.9988344 [26,] 0.0230665540 0.0461331080 0.9769334 [27,] 0.3866043750 0.7732087500 0.6133956 [28,] 0.7495755617 0.5008488766 0.2504244 [29,] 0.6765729213 0.6468541573 0.3234271 > postscript(file="/var/wessaorg/rcomp/tmp/187y21322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/277ar1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3d32w1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/40fye1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5yn9y1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 60 Frequency = 1 1 2 3 4 5 6 7 8 829.750 248.350 232.950 -427.450 219.350 -421.850 -23.850 7.150 9 10 11 12 13 14 15 16 159.750 156.150 38.550 120.550 -172.825 -67.225 -113.625 -290.025 17 18 19 20 21 22 23 24 -337.225 -156.425 14.575 -62.425 -234.825 302.575 137.975 -10.025 25 26 27 28 29 30 31 32 127.600 185.200 -381.200 283.400 -377.800 -167.000 -18.000 39.000 33 34 35 36 37 38 39 40 420.600 -13.000 4.400 88.400 -559.975 -415.375 -256.775 -476.175 41 42 43 44 45 46 47 48 -543.375 -186.575 -146.575 337.425 213.025 30.425 73.825 -42.175 49 50 51 52 53 54 55 56 -224.550 49.050 518.650 910.250 1039.050 931.850 173.850 -321.150 57 58 59 60 -558.550 -476.150 -254.750 -156.750 > postscript(file="/var/wessaorg/rcomp/tmp/6m2ab1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 829.750 NA 1 248.350 829.750 2 232.950 248.350 3 -427.450 232.950 4 219.350 -427.450 5 -421.850 219.350 6 -23.850 -421.850 7 7.150 -23.850 8 159.750 7.150 9 156.150 159.750 10 38.550 156.150 11 120.550 38.550 12 -172.825 120.550 13 -67.225 -172.825 14 -113.625 -67.225 15 -290.025 -113.625 16 -337.225 -290.025 17 -156.425 -337.225 18 14.575 -156.425 19 -62.425 14.575 20 -234.825 -62.425 21 302.575 -234.825 22 137.975 302.575 23 -10.025 137.975 24 127.600 -10.025 25 185.200 127.600 26 -381.200 185.200 27 283.400 -381.200 28 -377.800 283.400 29 -167.000 -377.800 30 -18.000 -167.000 31 39.000 -18.000 32 420.600 39.000 33 -13.000 420.600 34 4.400 -13.000 35 88.400 4.400 36 -559.975 88.400 37 -415.375 -559.975 38 -256.775 -415.375 39 -476.175 -256.775 40 -543.375 -476.175 41 -186.575 -543.375 42 -146.575 -186.575 43 337.425 -146.575 44 213.025 337.425 45 30.425 213.025 46 73.825 30.425 47 -42.175 73.825 48 -224.550 -42.175 49 49.050 -224.550 50 518.650 49.050 51 910.250 518.650 52 1039.050 910.250 53 931.850 1039.050 54 173.850 931.850 55 -321.150 173.850 56 -558.550 -321.150 57 -476.150 -558.550 58 -254.750 -476.150 59 -156.750 -254.750 60 NA -156.750 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 248.350 829.750 [2,] 232.950 248.350 [3,] -427.450 232.950 [4,] 219.350 -427.450 [5,] -421.850 219.350 [6,] -23.850 -421.850 [7,] 7.150 -23.850 [8,] 159.750 7.150 [9,] 156.150 159.750 [10,] 38.550 156.150 [11,] 120.550 38.550 [12,] -172.825 120.550 [13,] -67.225 -172.825 [14,] -113.625 -67.225 [15,] -290.025 -113.625 [16,] -337.225 -290.025 [17,] -156.425 -337.225 [18,] 14.575 -156.425 [19,] -62.425 14.575 [20,] -234.825 -62.425 [21,] 302.575 -234.825 [22,] 137.975 302.575 [23,] -10.025 137.975 [24,] 127.600 -10.025 [25,] 185.200 127.600 [26,] -381.200 185.200 [27,] 283.400 -381.200 [28,] -377.800 283.400 [29,] -167.000 -377.800 [30,] -18.000 -167.000 [31,] 39.000 -18.000 [32,] 420.600 39.000 [33,] -13.000 420.600 [34,] 4.400 -13.000 [35,] 88.400 4.400 [36,] -559.975 88.400 [37,] -415.375 -559.975 [38,] -256.775 -415.375 [39,] -476.175 -256.775 [40,] -543.375 -476.175 [41,] -186.575 -543.375 [42,] -146.575 -186.575 [43,] 337.425 -146.575 [44,] 213.025 337.425 [45,] 30.425 213.025 [46,] 73.825 30.425 [47,] -42.175 73.825 [48,] -224.550 -42.175 [49,] 49.050 -224.550 [50,] 518.650 49.050 [51,] 910.250 518.650 [52,] 1039.050 910.250 [53,] 931.850 1039.050 [54,] 173.850 931.850 [55,] -321.150 173.850 [56,] -558.550 -321.150 [57,] -476.150 -558.550 [58,] -254.750 -476.150 [59,] -156.750 -254.750 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 248.350 829.750 2 232.950 248.350 3 -427.450 232.950 4 219.350 -427.450 5 -421.850 219.350 6 -23.850 -421.850 7 7.150 -23.850 8 159.750 7.150 9 156.150 159.750 10 38.550 156.150 11 120.550 38.550 12 -172.825 120.550 13 -67.225 -172.825 14 -113.625 -67.225 15 -290.025 -113.625 16 -337.225 -290.025 17 -156.425 -337.225 18 14.575 -156.425 19 -62.425 14.575 20 -234.825 -62.425 21 302.575 -234.825 22 137.975 302.575 23 -10.025 137.975 24 127.600 -10.025 25 185.200 127.600 26 -381.200 185.200 27 283.400 -381.200 28 -377.800 283.400 29 -167.000 -377.800 30 -18.000 -167.000 31 39.000 -18.000 32 420.600 39.000 33 -13.000 420.600 34 4.400 -13.000 35 88.400 4.400 36 -559.975 88.400 37 -415.375 -559.975 38 -256.775 -415.375 39 -476.175 -256.775 40 -543.375 -476.175 41 -186.575 -543.375 42 -146.575 -186.575 43 337.425 -146.575 44 213.025 337.425 45 30.425 213.025 46 73.825 30.425 47 -42.175 73.825 48 -224.550 -42.175 49 49.050 -224.550 50 518.650 49.050 51 910.250 518.650 52 1039.050 910.250 53 931.850 1039.050 54 173.850 931.850 55 -321.150 173.850 56 -558.550 -321.150 57 -476.150 -558.550 58 -254.750 -476.150 59 -156.750 -254.750 > 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() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7hrxk1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8x5161322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9dz8l1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/107icl1322577658.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/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, mysum$coefficients[i,1], 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="/var/wessaorg/rcomp/tmp/11leil1322577658.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
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,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12uh0t1322577658.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, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > 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, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/134arq1322577658.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
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
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,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14d12v1322577658.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,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15t0gr1322577658.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,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + 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,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + 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,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + 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="/var/wessaorg/rcomp/tmp/166hxj1322577658.tab") + } > > try(system("convert tmp/187y21322577658.ps tmp/187y21322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/277ar1322577658.ps tmp/277ar1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/3d32w1322577658.ps tmp/3d32w1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/40fye1322577658.ps tmp/40fye1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/5yn9y1322577658.ps tmp/5yn9y1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/6m2ab1322577658.ps tmp/6m2ab1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/7hrxk1322577658.ps tmp/7hrxk1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/8x5161322577658.ps tmp/8x5161322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/9dz8l1322577658.ps tmp/9dz8l1322577658.png",intern=TRUE)) character(0) > try(system("convert tmp/107icl1322577658.ps tmp/107icl1322577658.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.135 0.492 3.688