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(17823.2,0,17872,0,17420.4,0,16704.4,0,15991.2,0,16583.6,0,19123.5,0,17838.7,0,17209.4,0,18586.5,0,16258.1,0,15141.6,0,19202.1,0,17746.5,0,19090.1,0,18040.3,0,17515.5,0,17751.8,0,21072.4,0,17170,0,19439.5,0,19795.4,0,17574.9,0,16165.4,0,19464.6,0,19932.1,0,19961.2,0,17343.4,0,18924.2,0,18574.1,0,21350.6,0,18594.6,0,19823.1,0,20844.4,0,19640.2,0,17735.4,0,19813.6,0,22160,0,20664.3,0,17877.4,0,20906.5,0,21164.1,0,21374.4,0,22952.3,0,21343.5,0,23899.3,0,22392.9,0,18274.1,0,22786.7,0,22321.5,0,17842.2,1,16373.5,1,15993.8,1,16446.1,1,17729,1,16643,1,16196.7,1,18252.1,1,17570.4,1,15836.8,1),dim=c(2,60),dimnames=list(c('uitvoer','dummy'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('uitvoer','dummy'),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 = 'No Linear Trend' > par2 = 'Do not include Seasonal 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 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 uitvoer dummy 1 17823.2 0 2 17872.0 0 3 17420.4 0 4 16704.4 0 5 15991.2 0 6 16583.6 0 7 19123.5 0 8 17838.7 0 9 17209.4 0 10 18586.5 0 11 16258.1 0 12 15141.6 0 13 19202.1 0 14 17746.5 0 15 19090.1 0 16 18040.3 0 17 17515.5 0 18 17751.8 0 19 21072.4 0 20 17170.0 0 21 19439.5 0 22 19795.4 0 23 17574.9 0 24 16165.4 0 25 19464.6 0 26 19932.1 0 27 19961.2 0 28 17343.4 0 29 18924.2 0 30 18574.1 0 31 21350.6 0 32 18594.6 0 33 19823.1 0 34 20844.4 0 35 19640.2 0 36 17735.4 0 37 19813.6 0 38 22160.0 0 39 20664.3 0 40 17877.4 0 41 20906.5 0 42 21164.1 0 43 21374.4 0 44 22952.3 0 45 21343.5 0 46 23899.3 0 47 22392.9 0 48 18274.1 0 49 22786.7 0 50 22321.5 0 51 17842.2 1 52 16373.5 1 53 15993.8 1 54 16446.1 1 55 17729.0 1 56 16643.0 1 57 16196.7 1 58 18252.1 1 59 17570.4 1 60 15836.8 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) dummy 19145 -2256 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4003.1 -1339.3 -232.9 1056.3 4754.6 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 19144.7 269.7 70.979 < 2e-16 *** dummy -2256.3 660.7 -3.415 0.00117 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1907 on 58 degrees of freedom Multiple R-squared: 0.1674, Adjusted R-squared: 0.1531 F-statistic: 11.66 on 1 and 58 DF, p-value: 0.001170 > 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.13555261 0.271105225 0.864447387 [2,] 0.06750979 0.135019575 0.932490212 [3,] 0.13391624 0.267832472 0.866083764 [4,] 0.07499990 0.149999797 0.925000101 [5,] 0.03970393 0.079407870 0.960296065 [6,] 0.03158864 0.063177287 0.968411357 [7,] 0.03249439 0.064988770 0.967505615 [8,] 0.10000759 0.200015173 0.899992413 [9,] 0.12651489 0.253029780 0.873485110 [10,] 0.09184997 0.183699935 0.908150032 [11,] 0.09597204 0.191944078 0.904027961 [12,] 0.07072396 0.141447917 0.929276042 [13,] 0.05335099 0.106701984 0.946649008 [14,] 0.03974593 0.079491852 0.960254074 [15,] 0.16014007 0.320280139 0.839859931 [16,] 0.15395663 0.307913264 0.846043368 [17,] 0.15217069 0.304341377 0.847829311 [18,] 0.16101216 0.322024320 0.838987840 [19,] 0.15090181 0.301803623 0.849098188 [20,] 0.27090433 0.541808651 0.729095674 [21,] 0.26510092 0.530201848 0.734899076 [22,] 0.27618471 0.552369427 0.723815286 [23,] 0.27937676 0.558753518 0.720623241 [24,] 0.33808204 0.676164075 0.661917963 [25,] 0.32225543 0.644510866 0.677744567 [26,] 0.32355147 0.647102944 0.676448528 [27,] 0.43092249 0.861844971 0.569077515 [28,] 0.44063238 0.881264753 0.559367623 [29,] 0.42672736 0.853454724 0.573272638 [30,] 0.44714360 0.894287197 0.552856401 [31,] 0.42710938 0.854218761 0.572890619 [32,] 0.58874809 0.822503819 0.411251909 [33,] 0.59095997 0.818080062 0.409040031 [34,] 0.68209090 0.635818205 0.317909103 [35,] 0.66245675 0.675086507 0.337543254 [36,] 0.87416455 0.251670890 0.125835445 [37,] 0.86872297 0.262554059 0.131277030 [38,] 0.85961930 0.280761395 0.140380697 [39,] 0.84653424 0.306931525 0.153465763 [40,] 0.87891861 0.242162789 0.121081395 [41,] 0.85271809 0.294563822 0.147281911 [42,] 0.93489143 0.130217148 0.065108574 [43,] 0.93046260 0.139074810 0.069537405 [44,] 0.99708962 0.005820759 0.002910380 [45,] 0.99482736 0.010345281 0.005172640 [46,] 0.98928715 0.021425692 0.010712846 [47,] 0.98397462 0.032050755 0.016025378 [48,] 0.96518644 0.069627125 0.034813562 [49,] 0.94303646 0.113927088 0.056963544 [50,] 0.88545074 0.229098522 0.114549261 [51,] 0.79740597 0.405188058 0.202594029 > postscript(file="/var/www/html/rcomp/tmp/1d3cd1258558520.ps",horizontal=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/209wi1258558520.ps",horizontal=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/357sy1258558520.ps",horizontal=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/4ncd81258558520.ps",horizontal=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/5zrok1258558520.ps",horizontal=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 -1321.50 -1272.70 -1724.30 -2440.30 -3153.50 -2561.10 -21.20 -1306.00 9 10 11 12 13 14 15 16 -1935.30 -558.20 -2886.60 -4003.10 57.40 -1398.20 -54.60 -1104.40 17 18 19 20 21 22 23 24 -1629.20 -1392.90 1927.70 -1974.70 294.80 650.70 -1569.80 -2979.30 25 26 27 28 29 30 31 32 319.90 787.40 816.50 -1801.30 -220.50 -570.60 2205.90 -550.10 33 34 35 36 37 38 39 40 678.40 1699.70 495.50 -1409.30 668.90 3015.30 1519.60 -1267.30 41 42 43 44 45 46 47 48 1761.80 2019.40 2229.70 3807.60 2198.80 4754.60 3248.20 -870.60 49 50 51 52 53 54 55 56 3642.00 3176.80 953.84 -514.86 -894.56 -442.26 840.64 -245.36 57 58 59 60 -691.66 1363.74 682.04 -1051.56 > postscript(file="/var/www/html/rcomp/tmp/6uvyq1258558520.ps",horizontal=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 -1321.50 NA 1 -1272.70 -1321.50 2 -1724.30 -1272.70 3 -2440.30 -1724.30 4 -3153.50 -2440.30 5 -2561.10 -3153.50 6 -21.20 -2561.10 7 -1306.00 -21.20 8 -1935.30 -1306.00 9 -558.20 -1935.30 10 -2886.60 -558.20 11 -4003.10 -2886.60 12 57.40 -4003.10 13 -1398.20 57.40 14 -54.60 -1398.20 15 -1104.40 -54.60 16 -1629.20 -1104.40 17 -1392.90 -1629.20 18 1927.70 -1392.90 19 -1974.70 1927.70 20 294.80 -1974.70 21 650.70 294.80 22 -1569.80 650.70 23 -2979.30 -1569.80 24 319.90 -2979.30 25 787.40 319.90 26 816.50 787.40 27 -1801.30 816.50 28 -220.50 -1801.30 29 -570.60 -220.50 30 2205.90 -570.60 31 -550.10 2205.90 32 678.40 -550.10 33 1699.70 678.40 34 495.50 1699.70 35 -1409.30 495.50 36 668.90 -1409.30 37 3015.30 668.90 38 1519.60 3015.30 39 -1267.30 1519.60 40 1761.80 -1267.30 41 2019.40 1761.80 42 2229.70 2019.40 43 3807.60 2229.70 44 2198.80 3807.60 45 4754.60 2198.80 46 3248.20 4754.60 47 -870.60 3248.20 48 3642.00 -870.60 49 3176.80 3642.00 50 953.84 3176.80 51 -514.86 953.84 52 -894.56 -514.86 53 -442.26 -894.56 54 840.64 -442.26 55 -245.36 840.64 56 -691.66 -245.36 57 1363.74 -691.66 58 682.04 1363.74 59 -1051.56 682.04 60 NA -1051.56 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1272.70 -1321.50 [2,] -1724.30 -1272.70 [3,] -2440.30 -1724.30 [4,] -3153.50 -2440.30 [5,] -2561.10 -3153.50 [6,] -21.20 -2561.10 [7,] -1306.00 -21.20 [8,] -1935.30 -1306.00 [9,] -558.20 -1935.30 [10,] -2886.60 -558.20 [11,] -4003.10 -2886.60 [12,] 57.40 -4003.10 [13,] -1398.20 57.40 [14,] -54.60 -1398.20 [15,] -1104.40 -54.60 [16,] -1629.20 -1104.40 [17,] -1392.90 -1629.20 [18,] 1927.70 -1392.90 [19,] -1974.70 1927.70 [20,] 294.80 -1974.70 [21,] 650.70 294.80 [22,] -1569.80 650.70 [23,] -2979.30 -1569.80 [24,] 319.90 -2979.30 [25,] 787.40 319.90 [26,] 816.50 787.40 [27,] -1801.30 816.50 [28,] -220.50 -1801.30 [29,] -570.60 -220.50 [30,] 2205.90 -570.60 [31,] -550.10 2205.90 [32,] 678.40 -550.10 [33,] 1699.70 678.40 [34,] 495.50 1699.70 [35,] -1409.30 495.50 [36,] 668.90 -1409.30 [37,] 3015.30 668.90 [38,] 1519.60 3015.30 [39,] -1267.30 1519.60 [40,] 1761.80 -1267.30 [41,] 2019.40 1761.80 [42,] 2229.70 2019.40 [43,] 3807.60 2229.70 [44,] 2198.80 3807.60 [45,] 4754.60 2198.80 [46,] 3248.20 4754.60 [47,] -870.60 3248.20 [48,] 3642.00 -870.60 [49,] 3176.80 3642.00 [50,] 953.84 3176.80 [51,] -514.86 953.84 [52,] -894.56 -514.86 [53,] -442.26 -894.56 [54,] 840.64 -442.26 [55,] -245.36 840.64 [56,] -691.66 -245.36 [57,] 1363.74 -691.66 [58,] 682.04 1363.74 [59,] -1051.56 682.04 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1272.70 -1321.50 2 -1724.30 -1272.70 3 -2440.30 -1724.30 4 -3153.50 -2440.30 5 -2561.10 -3153.50 6 -21.20 -2561.10 7 -1306.00 -21.20 8 -1935.30 -1306.00 9 -558.20 -1935.30 10 -2886.60 -558.20 11 -4003.10 -2886.60 12 57.40 -4003.10 13 -1398.20 57.40 14 -54.60 -1398.20 15 -1104.40 -54.60 16 -1629.20 -1104.40 17 -1392.90 -1629.20 18 1927.70 -1392.90 19 -1974.70 1927.70 20 294.80 -1974.70 21 650.70 294.80 22 -1569.80 650.70 23 -2979.30 -1569.80 24 319.90 -2979.30 25 787.40 319.90 26 816.50 787.40 27 -1801.30 816.50 28 -220.50 -1801.30 29 -570.60 -220.50 30 2205.90 -570.60 31 -550.10 2205.90 32 678.40 -550.10 33 1699.70 678.40 34 495.50 1699.70 35 -1409.30 495.50 36 668.90 -1409.30 37 3015.30 668.90 38 1519.60 3015.30 39 -1267.30 1519.60 40 1761.80 -1267.30 41 2019.40 1761.80 42 2229.70 2019.40 43 3807.60 2229.70 44 2198.80 3807.60 45 4754.60 2198.80 46 3248.20 4754.60 47 -870.60 3248.20 48 3642.00 -870.60 49 3176.80 3642.00 50 953.84 3176.80 51 -514.86 953.84 52 -894.56 -514.86 53 -442.26 -894.56 54 840.64 -442.26 55 -245.36 840.64 56 -691.66 -245.36 57 1363.74 -691.66 58 682.04 1363.74 59 -1051.56 682.04 > 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/76a8k1258558520.ps",horizontal=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/8odcd1258558520.ps",horizontal=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/97xm91258558520.ps",horizontal=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/10viyh1258558520.ps",horizontal=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/11a3uv1258558520.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/12eaym1258558520.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/134xgl1258558520.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/14nvwn1258558521.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/15j9m71258558521.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/1612wh1258558521.tab") + } > > system("convert tmp/1d3cd1258558520.ps tmp/1d3cd1258558520.png") > system("convert tmp/209wi1258558520.ps tmp/209wi1258558520.png") > system("convert tmp/357sy1258558520.ps tmp/357sy1258558520.png") > system("convert tmp/4ncd81258558520.ps tmp/4ncd81258558520.png") > system("convert tmp/5zrok1258558520.ps tmp/5zrok1258558520.png") > system("convert tmp/6uvyq1258558520.ps tmp/6uvyq1258558520.png") > system("convert tmp/76a8k1258558520.ps tmp/76a8k1258558520.png") > system("convert tmp/8odcd1258558520.ps tmp/8odcd1258558520.png") > system("convert tmp/97xm91258558520.ps tmp/97xm91258558520.png") > system("convert tmp/10viyh1258558520.ps tmp/10viyh1258558520.png") > > > proc.time() user system elapsed 2.529 1.606 5.192