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(3016,0,2155,0,2172,0,2150,0,2533,0,2058,0,2160,0,2260,0,2498,0,2695,0,2799,0,2946,0,2930,0,2318,0,2540,0,2570,0,2669,0,2450,0,2842,0,3440,0,2678,0,2981,0,2260,0,2844,0,2546,0,2456,0,2295,0,2379,0,2479,0,2057,0,2280,0,2351,0,2276,0,2548,1,2311,1,2201,1,2725,1,2408,1,2139,1,1898,1,2537,1,2068,1,2063,1,2520,1,2434,1,2190,1,2794,1,2070,1,2615,1,2265,1,2139,1,2428,1,2137,1,1823,1,2063,1,1806,1,1758,1,2243,1,1993,1,1932,1,2465,1),dim=c(2,61),dimnames=list(c('y','x'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('y','x'),1:61)) > 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 y x 1 3016 0 2 2155 0 3 2172 0 4 2150 0 5 2533 0 6 2058 0 7 2160 0 8 2260 0 9 2498 0 10 2695 0 11 2799 0 12 2946 0 13 2930 0 14 2318 0 15 2540 0 16 2570 0 17 2669 0 18 2450 0 19 2842 0 20 3440 0 21 2678 0 22 2981 0 23 2260 0 24 2844 0 25 2546 0 26 2456 0 27 2295 0 28 2379 0 29 2479 0 30 2057 0 31 2280 0 32 2351 0 33 2276 0 34 2548 1 35 2311 1 36 2201 1 37 2725 1 38 2408 1 39 2139 1 40 1898 1 41 2537 1 42 2068 1 43 2063 1 44 2520 1 45 2434 1 46 2190 1 47 2794 1 48 2070 1 49 2615 1 50 2265 1 51 2139 1 52 2428 1 53 2137 1 54 1823 1 55 2063 1 56 1806 1 57 1758 1 58 2243 1 59 1993 1 60 1932 1 61 2465 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x 2517.7 -282.9 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -476.75 -237.67 -38.67 199.25 922.33 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2517.67 53.14 47.374 < 2e-16 *** x -282.92 78.44 -3.607 0.000639 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 305.3 on 59 degrees of freedom Multiple R-squared: 0.1807, Adjusted R-squared: 0.1668 F-statistic: 13.01 on 1 and 59 DF, p-value: 0.0006392 > 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.8915952 0.21680951 0.10840475 [2,] 0.8809719 0.23805626 0.11902813 [3,] 0.8341074 0.33178528 0.16589264 [4,] 0.7584856 0.48302885 0.24151443 [5,] 0.6850136 0.62997290 0.31498645 [6,] 0.6850415 0.62991692 0.31495846 [7,] 0.7232065 0.55358700 0.27679350 [8,] 0.8156211 0.36875771 0.18437886 [9,] 0.8592267 0.28154659 0.14077330 [10,] 0.8204424 0.35911515 0.17955757 [11,] 0.7572196 0.48556072 0.24278036 [12,] 0.6871551 0.62568978 0.31284489 [13,] 0.6283490 0.74330191 0.37165095 [14,] 0.5486450 0.90271004 0.45135502 [15,] 0.5557218 0.88855642 0.44427821 [16,] 0.9472491 0.10550171 0.05275086 [17,] 0.9311475 0.13770497 0.06885248 [18,] 0.9619038 0.07619236 0.03809618 [19,] 0.9548882 0.09022365 0.04511183 [20,] 0.9651107 0.06977869 0.03488934 [21,] 0.9530047 0.09399059 0.04699529 [22,] 0.9359468 0.12810647 0.06405323 [23,] 0.9192299 0.16154020 0.08077010 [24,] 0.8938658 0.21226849 0.10613425 [25,] 0.8679558 0.26408835 0.13204417 [26,] 0.8820965 0.23580698 0.11790349 [27,] 0.8526838 0.29463231 0.14731616 [28,] 0.8119533 0.37609342 0.18804671 [29,] 0.7704610 0.45907792 0.22953896 [30,] 0.7502455 0.49950903 0.24975452 [31,] 0.6962260 0.60754801 0.30377401 [32,] 0.6353000 0.72939998 0.36469999 [33,] 0.7206131 0.55877381 0.27938691 [34,] 0.6748103 0.65037940 0.32518970 [35,] 0.6214941 0.75701171 0.37850585 [36,] 0.6477588 0.70448245 0.35224122 [37,] 0.6474773 0.70504544 0.35252272 [38,] 0.5936878 0.81262443 0.40631221 [39,] 0.5357210 0.92855793 0.46427896 [40,] 0.5305290 0.93894208 0.46947104 [41,] 0.4909786 0.98195724 0.50902138 [42,] 0.4059859 0.81197178 0.59401411 [43,] 0.6848023 0.63039548 0.31519774 [44,] 0.6089430 0.78211396 0.39105698 [45,] 0.7657314 0.46853714 0.23426857 [46,] 0.7121878 0.57562436 0.28781218 [47,] 0.6209021 0.75819582 0.37909791 [48,] 0.6911823 0.61763544 0.30881772 [49,] 0.5960015 0.80799700 0.40399850 [50,] 0.5487678 0.90246444 0.45123222 [51,] 0.4072238 0.81444754 0.59277623 [52,] 0.3574214 0.71484274 0.64257863 > postscript(file="/var/www/html/rcomp/tmp/12b5q1261270163.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/2a0ub1261270163.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/322ob1261270163.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/4z5ac1261270163.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/5e66n1261270163.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 = 61 Frequency = 1 1 2 3 4 5 6 7 498.33333 -362.66667 -345.66667 -367.66667 15.33333 -459.66667 -357.66667 8 9 10 11 12 13 14 -257.66667 -19.66667 177.33333 281.33333 428.33333 412.33333 -199.66667 15 16 17 18 19 20 21 22.33333 52.33333 151.33333 -67.66667 324.33333 922.33333 160.33333 22 23 24 25 26 27 28 463.33333 -257.66667 326.33333 28.33333 -61.66667 -222.66667 -138.66667 29 30 31 32 33 34 35 -38.66667 -460.66667 -237.66667 -166.66667 -241.66667 313.25000 76.25000 36 37 38 39 40 41 42 -33.75000 490.25000 173.25000 -95.75000 -336.75000 302.25000 -166.75000 43 44 45 46 47 48 49 -171.75000 285.25000 199.25000 -44.75000 559.25000 -164.75000 380.25000 50 51 52 53 54 55 56 30.25000 -95.75000 193.25000 -97.75000 -411.75000 -171.75000 -428.75000 57 58 59 60 61 -476.75000 8.25000 -241.75000 -302.75000 230.25000 > postscript(file="/var/www/html/rcomp/tmp/6rxu21261270163.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 498.33333 NA 1 -362.66667 498.33333 2 -345.66667 -362.66667 3 -367.66667 -345.66667 4 15.33333 -367.66667 5 -459.66667 15.33333 6 -357.66667 -459.66667 7 -257.66667 -357.66667 8 -19.66667 -257.66667 9 177.33333 -19.66667 10 281.33333 177.33333 11 428.33333 281.33333 12 412.33333 428.33333 13 -199.66667 412.33333 14 22.33333 -199.66667 15 52.33333 22.33333 16 151.33333 52.33333 17 -67.66667 151.33333 18 324.33333 -67.66667 19 922.33333 324.33333 20 160.33333 922.33333 21 463.33333 160.33333 22 -257.66667 463.33333 23 326.33333 -257.66667 24 28.33333 326.33333 25 -61.66667 28.33333 26 -222.66667 -61.66667 27 -138.66667 -222.66667 28 -38.66667 -138.66667 29 -460.66667 -38.66667 30 -237.66667 -460.66667 31 -166.66667 -237.66667 32 -241.66667 -166.66667 33 313.25000 -241.66667 34 76.25000 313.25000 35 -33.75000 76.25000 36 490.25000 -33.75000 37 173.25000 490.25000 38 -95.75000 173.25000 39 -336.75000 -95.75000 40 302.25000 -336.75000 41 -166.75000 302.25000 42 -171.75000 -166.75000 43 285.25000 -171.75000 44 199.25000 285.25000 45 -44.75000 199.25000 46 559.25000 -44.75000 47 -164.75000 559.25000 48 380.25000 -164.75000 49 30.25000 380.25000 50 -95.75000 30.25000 51 193.25000 -95.75000 52 -97.75000 193.25000 53 -411.75000 -97.75000 54 -171.75000 -411.75000 55 -428.75000 -171.75000 56 -476.75000 -428.75000 57 8.25000 -476.75000 58 -241.75000 8.25000 59 -302.75000 -241.75000 60 230.25000 -302.75000 61 NA 230.25000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -362.66667 498.33333 [2,] -345.66667 -362.66667 [3,] -367.66667 -345.66667 [4,] 15.33333 -367.66667 [5,] -459.66667 15.33333 [6,] -357.66667 -459.66667 [7,] -257.66667 -357.66667 [8,] -19.66667 -257.66667 [9,] 177.33333 -19.66667 [10,] 281.33333 177.33333 [11,] 428.33333 281.33333 [12,] 412.33333 428.33333 [13,] -199.66667 412.33333 [14,] 22.33333 -199.66667 [15,] 52.33333 22.33333 [16,] 151.33333 52.33333 [17,] -67.66667 151.33333 [18,] 324.33333 -67.66667 [19,] 922.33333 324.33333 [20,] 160.33333 922.33333 [21,] 463.33333 160.33333 [22,] -257.66667 463.33333 [23,] 326.33333 -257.66667 [24,] 28.33333 326.33333 [25,] -61.66667 28.33333 [26,] -222.66667 -61.66667 [27,] -138.66667 -222.66667 [28,] -38.66667 -138.66667 [29,] -460.66667 -38.66667 [30,] -237.66667 -460.66667 [31,] -166.66667 -237.66667 [32,] -241.66667 -166.66667 [33,] 313.25000 -241.66667 [34,] 76.25000 313.25000 [35,] -33.75000 76.25000 [36,] 490.25000 -33.75000 [37,] 173.25000 490.25000 [38,] -95.75000 173.25000 [39,] -336.75000 -95.75000 [40,] 302.25000 -336.75000 [41,] -166.75000 302.25000 [42,] -171.75000 -166.75000 [43,] 285.25000 -171.75000 [44,] 199.25000 285.25000 [45,] -44.75000 199.25000 [46,] 559.25000 -44.75000 [47,] -164.75000 559.25000 [48,] 380.25000 -164.75000 [49,] 30.25000 380.25000 [50,] -95.75000 30.25000 [51,] 193.25000 -95.75000 [52,] -97.75000 193.25000 [53,] -411.75000 -97.75000 [54,] -171.75000 -411.75000 [55,] -428.75000 -171.75000 [56,] -476.75000 -428.75000 [57,] 8.25000 -476.75000 [58,] -241.75000 8.25000 [59,] -302.75000 -241.75000 [60,] 230.25000 -302.75000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -362.66667 498.33333 2 -345.66667 -362.66667 3 -367.66667 -345.66667 4 15.33333 -367.66667 5 -459.66667 15.33333 6 -357.66667 -459.66667 7 -257.66667 -357.66667 8 -19.66667 -257.66667 9 177.33333 -19.66667 10 281.33333 177.33333 11 428.33333 281.33333 12 412.33333 428.33333 13 -199.66667 412.33333 14 22.33333 -199.66667 15 52.33333 22.33333 16 151.33333 52.33333 17 -67.66667 151.33333 18 324.33333 -67.66667 19 922.33333 324.33333 20 160.33333 922.33333 21 463.33333 160.33333 22 -257.66667 463.33333 23 326.33333 -257.66667 24 28.33333 326.33333 25 -61.66667 28.33333 26 -222.66667 -61.66667 27 -138.66667 -222.66667 28 -38.66667 -138.66667 29 -460.66667 -38.66667 30 -237.66667 -460.66667 31 -166.66667 -237.66667 32 -241.66667 -166.66667 33 313.25000 -241.66667 34 76.25000 313.25000 35 -33.75000 76.25000 36 490.25000 -33.75000 37 173.25000 490.25000 38 -95.75000 173.25000 39 -336.75000 -95.75000 40 302.25000 -336.75000 41 -166.75000 302.25000 42 -171.75000 -166.75000 43 285.25000 -171.75000 44 199.25000 285.25000 45 -44.75000 199.25000 46 559.25000 -44.75000 47 -164.75000 559.25000 48 380.25000 -164.75000 49 30.25000 380.25000 50 -95.75000 30.25000 51 193.25000 -95.75000 52 -97.75000 193.25000 53 -411.75000 -97.75000 54 -171.75000 -411.75000 55 -428.75000 -171.75000 56 -476.75000 -428.75000 57 8.25000 -476.75000 58 -241.75000 8.25000 59 -302.75000 -241.75000 60 230.25000 -302.75000 > 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/73owk1261270163.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/8dt0h1261270163.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/9ofby1261270163.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/10cyba1261270163.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/11ra5e1261270163.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/12v7n11261270163.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/13t5j71261270163.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/14sly91261270163.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/15zabf1261270163.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/16ma651261270163.tab") + } > > try(system("convert tmp/12b5q1261270163.ps tmp/12b5q1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/2a0ub1261270163.ps tmp/2a0ub1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/322ob1261270163.ps tmp/322ob1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/4z5ac1261270163.ps tmp/4z5ac1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/5e66n1261270163.ps tmp/5e66n1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/6rxu21261270163.ps tmp/6rxu21261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/73owk1261270163.ps tmp/73owk1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/8dt0h1261270163.ps tmp/8dt0h1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/9ofby1261270163.ps tmp/9ofby1261270163.png",intern=TRUE)) character(0) > try(system("convert tmp/10cyba1261270163.ps tmp/10cyba1261270163.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.488 1.587 3.580