R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(8.1,9.9,11.5,23.4,25.4,27.9,26.1,18.8,14.1,11.5,15.8,12.4,4.5,-2.2,-4.2,-9.4,-14.5,-17.9,-15.1,-15.2,-15.7,-18,-18.1,-13.5,-9.9,-4.8,-1.7,-0.1,2.2,10.2,7.6,10.8,3.8,11,10.8,20.1,14.9,13,10.9,9.6,4,-1.1,-7.7,-8.9,-8,-7.1,-5.3,-2.5,-2.4,-2.9,-4.8,-7.2,1.7,2.2,13.4,12.3,13.7,4.4,-2.5),dim=c(1,59),dimnames=list(c('registraties_personenwagens'),1:59)) > y <- array(NA,dim=c(1,59),dimnames=list(c('registraties_personenwagens'),1:59)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > 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 registraties_personenwagens M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 8.1 1 0 0 0 0 0 0 0 0 0 0 2 9.9 0 1 0 0 0 0 0 0 0 0 0 3 11.5 0 0 1 0 0 0 0 0 0 0 0 4 23.4 0 0 0 1 0 0 0 0 0 0 0 5 25.4 0 0 0 0 1 0 0 0 0 0 0 6 27.9 0 0 0 0 0 1 0 0 0 0 0 7 26.1 0 0 0 0 0 0 1 0 0 0 0 8 18.8 0 0 0 0 0 0 0 1 0 0 0 9 14.1 0 0 0 0 0 0 0 0 1 0 0 10 11.5 0 0 0 0 0 0 0 0 0 1 0 11 15.8 0 0 0 0 0 0 0 0 0 0 1 12 12.4 0 0 0 0 0 0 0 0 0 0 0 13 4.5 1 0 0 0 0 0 0 0 0 0 0 14 -2.2 0 1 0 0 0 0 0 0 0 0 0 15 -4.2 0 0 1 0 0 0 0 0 0 0 0 16 -9.4 0 0 0 1 0 0 0 0 0 0 0 17 -14.5 0 0 0 0 1 0 0 0 0 0 0 18 -17.9 0 0 0 0 0 1 0 0 0 0 0 19 -15.1 0 0 0 0 0 0 1 0 0 0 0 20 -15.2 0 0 0 0 0 0 0 1 0 0 0 21 -15.7 0 0 0 0 0 0 0 0 1 0 0 22 -18.0 0 0 0 0 0 0 0 0 0 1 0 23 -18.1 0 0 0 0 0 0 0 0 0 0 1 24 -13.5 0 0 0 0 0 0 0 0 0 0 0 25 -9.9 1 0 0 0 0 0 0 0 0 0 0 26 -4.8 0 1 0 0 0 0 0 0 0 0 0 27 -1.7 0 0 1 0 0 0 0 0 0 0 0 28 -0.1 0 0 0 1 0 0 0 0 0 0 0 29 2.2 0 0 0 0 1 0 0 0 0 0 0 30 10.2 0 0 0 0 0 1 0 0 0 0 0 31 7.6 0 0 0 0 0 0 1 0 0 0 0 32 10.8 0 0 0 0 0 0 0 1 0 0 0 33 3.8 0 0 0 0 0 0 0 0 1 0 0 34 11.0 0 0 0 0 0 0 0 0 0 1 0 35 10.8 0 0 0 0 0 0 0 0 0 0 1 36 20.1 0 0 0 0 0 0 0 0 0 0 0 37 14.9 1 0 0 0 0 0 0 0 0 0 0 38 13.0 0 1 0 0 0 0 0 0 0 0 0 39 10.9 0 0 1 0 0 0 0 0 0 0 0 40 9.6 0 0 0 1 0 0 0 0 0 0 0 41 4.0 0 0 0 0 1 0 0 0 0 0 0 42 -1.1 0 0 0 0 0 1 0 0 0 0 0 43 -7.7 0 0 0 0 0 0 1 0 0 0 0 44 -8.9 0 0 0 0 0 0 0 1 0 0 0 45 -8.0 0 0 0 0 0 0 0 0 1 0 0 46 -7.1 0 0 0 0 0 0 0 0 0 1 0 47 -5.3 0 0 0 0 0 0 0 0 0 0 1 48 -2.5 0 0 0 0 0 0 0 0 0 0 0 49 -2.4 1 0 0 0 0 0 0 0 0 0 0 50 -2.9 0 1 0 0 0 0 0 0 0 0 0 51 -4.8 0 0 1 0 0 0 0 0 0 0 0 52 -7.2 0 0 0 1 0 0 0 0 0 0 0 53 1.7 0 0 0 0 1 0 0 0 0 0 0 54 2.2 0 0 0 0 0 1 0 0 0 0 0 55 13.4 0 0 0 0 0 0 1 0 0 0 0 56 12.3 0 0 0 0 0 0 0 1 0 0 0 57 13.7 0 0 0 0 0 0 0 0 1 0 0 58 4.4 0 0 0 0 0 0 0 0 0 1 0 59 -2.5 0 0 0 0 0 0 0 0 0 0 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 4.125 -1.085 -1.525 -1.785 -0.865 -0.365 M6 M7 M8 M9 M10 M11 0.135 0.735 -0.565 -2.545 -3.765 -3.985 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -22.16 -7.43 -1.56 8.95 23.64 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.125 6.630 0.622 0.537 M1 -1.085 8.895 -0.122 0.903 M2 -1.525 8.895 -0.171 0.865 M3 -1.785 8.895 -0.201 0.842 M4 -0.865 8.895 -0.097 0.923 M5 -0.365 8.895 -0.041 0.967 M6 0.135 8.895 0.015 0.988 M7 0.735 8.895 0.083 0.934 M8 -0.565 8.895 -0.064 0.950 M9 -2.545 8.895 -0.286 0.776 M10 -3.765 8.895 -0.423 0.674 M11 -3.985 8.895 -0.448 0.656 Residual standard error: 13.26 on 47 degrees of freedom Multiple R-squared: 0.0145, Adjusted R-squared: -0.2161 F-statistic: 0.06287 on 11 and 47 DF, p-value: 1 > 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.2937066 0.587413188 0.7062934059 [2,] 0.6948697 0.610260514 0.3051302568 [3,] 0.9113953 0.177209489 0.0886047446 [4,] 0.9831971 0.033605880 0.0168029402 [5,] 0.9943425 0.011314920 0.0056574599 [6,] 0.9969210 0.006157932 0.0030789660 [7,] 0.9978416 0.004316871 0.0021584354 [8,] 0.9986857 0.002628614 0.0013143071 [9,] 0.9992835 0.001433080 0.0007165402 [10,] 0.9995782 0.000843632 0.0004218160 [11,] 0.9995340 0.000932010 0.0004660050 [12,] 0.9991586 0.001682797 0.0008413983 [13,] 0.9982123 0.003575497 0.0017877484 [14,] 0.9962742 0.007451532 0.0037257662 [15,] 0.9924191 0.015161737 0.0075808685 [16,] 0.9876180 0.024763915 0.0123819576 [17,] 0.9776794 0.044641204 0.0223206020 [18,] 0.9660261 0.067947767 0.0339738833 [19,] 0.9419684 0.116063272 0.0580316360 [20,] 0.9271077 0.145784534 0.0728922669 [21,] 0.9147832 0.170433544 0.0852167720 [22,] 0.9300410 0.139917939 0.0699589695 [23,] 0.9228336 0.154332870 0.0771664352 [24,] 0.9086854 0.182629132 0.0913145659 [25,] 0.8897501 0.220499827 0.1102499136 [26,] 0.8729212 0.254157651 0.1270788254 [27,] 0.7870807 0.425838683 0.2129193416 [28,] 0.6718622 0.656275590 0.3281377952 [29,] 0.6867380 0.626524023 0.3132620116 [30,] 0.7239399 0.552120266 0.2760601331 > postscript(file="/var/www/html/rcomp/tmp/1ml9u1292954500.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/www/html/rcomp/tmp/2xcqx1292954500.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/www/html/rcomp/tmp/3xcqx1292954500.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/www/html/rcomp/tmp/4xcqx1292954500.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/www/html/rcomp/tmp/5xcqx1292954500.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 = 59 Frequency = 1 1 2 3 4 5 6 7 8 9 10 5.060 7.300 9.160 20.140 21.640 23.640 21.240 15.240 12.520 11.140 11 12 13 14 15 16 17 18 19 20 15.660 8.275 1.460 -4.800 -6.540 -12.660 -18.260 -22.160 -19.960 -18.760 21 22 23 24 25 26 27 28 29 30 -17.280 -18.360 -18.240 -17.625 -12.940 -7.400 -4.040 -3.360 -1.560 5.940 31 32 33 34 35 36 37 38 39 40 2.740 7.240 2.220 10.640 10.660 15.975 11.860 10.400 8.560 6.340 41 42 43 44 45 46 47 48 49 50 0.240 -5.360 -12.560 -12.460 -9.580 -7.460 -5.440 -6.625 -5.440 -5.500 51 52 53 54 55 56 57 58 59 -7.140 -10.460 -2.060 -2.060 8.540 8.740 12.120 4.040 -2.640 > postscript(file="/var/www/html/rcomp/tmp/6q38i1292954500.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 = 59 Frequency = 1 lag(myerror, k = 1) myerror 0 5.060 NA 1 7.300 5.060 2 9.160 7.300 3 20.140 9.160 4 21.640 20.140 5 23.640 21.640 6 21.240 23.640 7 15.240 21.240 8 12.520 15.240 9 11.140 12.520 10 15.660 11.140 11 8.275 15.660 12 1.460 8.275 13 -4.800 1.460 14 -6.540 -4.800 15 -12.660 -6.540 16 -18.260 -12.660 17 -22.160 -18.260 18 -19.960 -22.160 19 -18.760 -19.960 20 -17.280 -18.760 21 -18.360 -17.280 22 -18.240 -18.360 23 -17.625 -18.240 24 -12.940 -17.625 25 -7.400 -12.940 26 -4.040 -7.400 27 -3.360 -4.040 28 -1.560 -3.360 29 5.940 -1.560 30 2.740 5.940 31 7.240 2.740 32 2.220 7.240 33 10.640 2.220 34 10.660 10.640 35 15.975 10.660 36 11.860 15.975 37 10.400 11.860 38 8.560 10.400 39 6.340 8.560 40 0.240 6.340 41 -5.360 0.240 42 -12.560 -5.360 43 -12.460 -12.560 44 -9.580 -12.460 45 -7.460 -9.580 46 -5.440 -7.460 47 -6.625 -5.440 48 -5.440 -6.625 49 -5.500 -5.440 50 -7.140 -5.500 51 -10.460 -7.140 52 -2.060 -10.460 53 -2.060 -2.060 54 8.540 -2.060 55 8.740 8.540 56 12.120 8.740 57 4.040 12.120 58 -2.640 4.040 59 NA -2.640 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 7.300 5.060 [2,] 9.160 7.300 [3,] 20.140 9.160 [4,] 21.640 20.140 [5,] 23.640 21.640 [6,] 21.240 23.640 [7,] 15.240 21.240 [8,] 12.520 15.240 [9,] 11.140 12.520 [10,] 15.660 11.140 [11,] 8.275 15.660 [12,] 1.460 8.275 [13,] -4.800 1.460 [14,] -6.540 -4.800 [15,] -12.660 -6.540 [16,] -18.260 -12.660 [17,] -22.160 -18.260 [18,] -19.960 -22.160 [19,] -18.760 -19.960 [20,] -17.280 -18.760 [21,] -18.360 -17.280 [22,] -18.240 -18.360 [23,] -17.625 -18.240 [24,] -12.940 -17.625 [25,] -7.400 -12.940 [26,] -4.040 -7.400 [27,] -3.360 -4.040 [28,] -1.560 -3.360 [29,] 5.940 -1.560 [30,] 2.740 5.940 [31,] 7.240 2.740 [32,] 2.220 7.240 [33,] 10.640 2.220 [34,] 10.660 10.640 [35,] 15.975 10.660 [36,] 11.860 15.975 [37,] 10.400 11.860 [38,] 8.560 10.400 [39,] 6.340 8.560 [40,] 0.240 6.340 [41,] -5.360 0.240 [42,] -12.560 -5.360 [43,] -12.460 -12.560 [44,] -9.580 -12.460 [45,] -7.460 -9.580 [46,] -5.440 -7.460 [47,] -6.625 -5.440 [48,] -5.440 -6.625 [49,] -5.500 -5.440 [50,] -7.140 -5.500 [51,] -10.460 -7.140 [52,] -2.060 -10.460 [53,] -2.060 -2.060 [54,] 8.540 -2.060 [55,] 8.740 8.540 [56,] 12.120 8.740 [57,] 4.040 12.120 [58,] -2.640 4.040 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 7.300 5.060 2 9.160 7.300 3 20.140 9.160 4 21.640 20.140 5 23.640 21.640 6 21.240 23.640 7 15.240 21.240 8 12.520 15.240 9 11.140 12.520 10 15.660 11.140 11 8.275 15.660 12 1.460 8.275 13 -4.800 1.460 14 -6.540 -4.800 15 -12.660 -6.540 16 -18.260 -12.660 17 -22.160 -18.260 18 -19.960 -22.160 19 -18.760 -19.960 20 -17.280 -18.760 21 -18.360 -17.280 22 -18.240 -18.360 23 -17.625 -18.240 24 -12.940 -17.625 25 -7.400 -12.940 26 -4.040 -7.400 27 -3.360 -4.040 28 -1.560 -3.360 29 5.940 -1.560 30 2.740 5.940 31 7.240 2.740 32 2.220 7.240 33 10.640 2.220 34 10.660 10.640 35 15.975 10.660 36 11.860 15.975 37 10.400 11.860 38 8.560 10.400 39 6.340 8.560 40 0.240 6.340 41 -5.360 0.240 42 -12.560 -5.360 43 -12.460 -12.560 44 -9.580 -12.460 45 -7.460 -9.580 46 -5.440 -7.460 47 -6.625 -5.440 48 -5.440 -6.625 49 -5.500 -5.440 50 -7.140 -5.500 51 -10.460 -7.140 52 -2.060 -10.460 53 -2.060 -2.060 54 8.540 -2.060 55 8.740 8.540 56 12.120 8.740 57 4.040 12.120 58 -2.640 4.040 > 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/www/html/rcomp/tmp/70up21292954500.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/www/html/rcomp/tmp/80up21292954500.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/www/html/rcomp/tmp/90up21292954500.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/www/html/rcomp/tmp/10bmo61292954500.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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/11em5b1292954500.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/www/html/rcomp/tmp/12i54z1292954500.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/www/html/rcomp/tmp/13wf1q1292954500.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/www/html/rcomp/tmp/14zfie1292954500.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/www/html/rcomp/tmp/153yyk1292954500.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/www/html/rcomp/tmp/16oyf81292954500.tab") + } > > try(system("convert tmp/1ml9u1292954500.ps tmp/1ml9u1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/2xcqx1292954500.ps tmp/2xcqx1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/3xcqx1292954500.ps tmp/3xcqx1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/4xcqx1292954500.ps tmp/4xcqx1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/5xcqx1292954500.ps tmp/5xcqx1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/6q38i1292954500.ps tmp/6q38i1292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/70up21292954500.ps tmp/70up21292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/80up21292954500.ps tmp/80up21292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/90up21292954500.ps tmp/90up21292954500.png",intern=TRUE)) character(0) > try(system("convert tmp/10bmo61292954500.ps tmp/10bmo61292954500.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.442 1.605 5.645