R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(150580 + ,77 + ,45588 + ,9653 + ,62991 + ,41 + ,39 + ,99611 + ,35 + ,45097 + ,8914 + ,49363 + ,54 + ,54 + ,19349 + ,11 + ,3895 + ,786 + ,9604 + ,14 + ,14 + ,99373 + ,63 + ,28394 + ,6700 + ,24552 + ,25 + ,24 + ,86230 + ,44 + ,18632 + ,5788 + ,31493 + ,25 + ,24 + ,30837 + ,19 + ,2325 + ,593 + ,3439 + ,8 + ,8 + ,31706 + ,13 + ,25139 + ,4506 + ,19555 + ,26 + ,26 + ,89806 + ,42 + ,27975 + ,6382 + ,21228 + ,20 + ,19 + ,62088 + ,38 + ,14483 + ,5621 + ,23177 + ,11 + ,11 + ,40151 + ,29 + ,13127 + ,3997 + ,22094 + ,14 + ,14 + ,27634 + ,20 + ,5839 + ,520 + ,2342 + ,3 + ,1 + ,76990 + ,27 + ,24069 + ,8891 + ,38798 + ,40 + ,39 + ,37460 + ,20 + ,3738 + ,999 + ,3255 + ,5 + ,5 + ,54157 + ,19 + ,18625 + ,7067 + ,24261 + ,38 + ,37 + ,49862 + ,37 + ,36341 + ,4639 + ,18511 + ,32 + ,32 + ,84337 + ,26 + ,24548 + ,5654 + ,40798 + ,41 + ,38 + ,64175 + ,42 + ,21792 + ,6928 + ,28893 + ,46 + ,47 + ,59382 + ,49 + ,26263 + ,1514 + ,21425 + ,47 + ,47 + ,119308 + ,30 + ,23686 + ,9238 + ,50276 + ,37 + ,37 + ,76702 + ,49 + ,49303 + ,8204 + ,37643 + ,51 + ,51 + ,103425 + ,67 + ,25659 + ,5926 + ,30377 + ,49 + ,45 + ,70344 + ,28 + ,28904 + ,5785 + ,27126 + ,21 + ,21 + ,43410 + ,19 + ,2781 + ,4 + ,13 + ,1 + ,1 + ,104838 + ,49 + ,29236 + ,5930 + ,42097 + ,44 + ,42 + ,62215 + ,27 + ,19546 + ,3710 + ,24451 + ,26 + ,26 + ,69304 + ,30 + ,22818 + ,705 + ,14335 + ,21 + ,21 + ,53117 + ,22 + ,32689 + ,443 + ,5084 + ,4 + ,4 + ,19764 + ,12 + ,5752 + ,2416 + ,9927 + ,10 + ,10 + ,86680 + ,31 + ,22197 + ,7747 + ,43527 + ,43 + ,43 + ,84105 + ,20 + ,20055 + ,5432 + ,27184 + ,34 + ,34 + ,77945 + ,20 + ,25272 + ,4913 + ,21610 + ,32 + ,31 + ,89113 + ,39 + ,82206 + ,2650 + ,20484 + ,20 + ,19 + ,91005 + ,29 + ,32073 + ,2370 + ,20156 + ,34 + ,34 + ,40248 + ,16 + ,5444 + ,775 + ,6012 + ,6 + ,6 + ,64187 + ,27 + ,20154 + ,5576 + ,18475 + ,12 + ,11 + ,50857 + ,21 + ,36944 + ,1352 + ,12645 + ,24 + ,24 + ,56613 + ,19 + ,8019 + ,3080 + ,11017 + ,16 + ,16 + ,62792 + ,35 + ,30884 + ,10205 + ,37623 + ,72 + ,72 + ,72535 + ,14 + ,19540 + ,6095 + ,35873 + ,27 + ,21) + ,dim=c(7 + ,39) + ,dimnames=list(c('TimeRFC' + ,'#Logins' + ,'#characters' + ,'#revisions' + ,'#seconds' + ,'#Hyperlinks' + ,'#Blogs') + ,1:39)) > y <- array(NA,dim=c(7,39),dimnames=list(c('TimeRFC','#Logins','#characters','#revisions','#seconds','#Hyperlinks','#Blogs'),1:39)) > 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 = 'Do not include Seasonal 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, 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 TimeRFC #Logins #characters #revisions #seconds #Hyperlinks #Blogs t 1 150580 77 45588 9653 62991 41 39 1 2 99611 35 45097 8914 49363 54 54 2 3 19349 11 3895 786 9604 14 14 3 4 99373 63 28394 6700 24552 25 24 4 5 86230 44 18632 5788 31493 25 24 5 6 30837 19 2325 593 3439 8 8 6 7 31706 13 25139 4506 19555 26 26 7 8 89806 42 27975 6382 21228 20 19 8 9 62088 38 14483 5621 23177 11 11 9 10 40151 29 13127 3997 22094 14 14 10 11 27634 20 5839 520 2342 3 1 11 12 76990 27 24069 8891 38798 40 39 12 13 37460 20 3738 999 3255 5 5 13 14 54157 19 18625 7067 24261 38 37 14 15 49862 37 36341 4639 18511 32 32 15 16 84337 26 24548 5654 40798 41 38 16 17 64175 42 21792 6928 28893 46 47 17 18 59382 49 26263 1514 21425 47 47 18 19 119308 30 23686 9238 50276 37 37 19 20 76702 49 49303 8204 37643 51 51 20 21 103425 67 25659 5926 30377 49 45 21 22 70344 28 28904 5785 27126 21 21 22 23 43410 19 2781 4 13 1 1 23 24 104838 49 29236 5930 42097 44 42 24 25 62215 27 19546 3710 24451 26 26 25 26 69304 30 22818 705 14335 21 21 26 27 53117 22 32689 443 5084 4 4 27 28 19764 12 5752 2416 9927 10 10 28 29 86680 31 22197 7747 43527 43 43 29 30 84105 20 20055 5432 27184 34 34 30 31 77945 20 25272 4913 21610 32 31 31 32 89113 39 82206 2650 20484 20 19 32 33 91005 29 32073 2370 20156 34 34 33 34 40248 16 5444 775 6012 6 6 34 35 64187 27 20154 5576 18475 12 11 35 36 50857 21 36944 1352 12645 24 24 36 37 56613 19 8019 3080 11017 16 16 37 38 62792 35 30884 10205 37623 72 72 38 39 72535 14 19540 6095 35873 27 21 39 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `#Logins` `#characters` `#revisions` `#seconds` 6502.7113 829.7570 0.1961 -0.7732 1.6321 `#Hyperlinks` `#Blogs` t -22.8245 -514.1122 493.8134 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -23378 -6305 -2828 7288 25047 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6502.7113 7286.8572 0.892 0.379060 `#Logins` 829.7570 188.9409 4.392 0.000122 *** `#characters` 0.1961 0.1737 1.129 0.267606 `#revisions` -0.7732 1.5591 -0.496 0.623467 `#seconds` 1.6321 0.3627 4.500 8.96e-05 *** `#Hyperlinks` -22.8245 1806.8320 -0.013 0.990002 `#Blogs` -514.1122 1752.6683 -0.293 0.771224 t 493.8134 213.6892 2.311 0.027657 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 12750 on 31 degrees of freedom Multiple R-squared: 0.8346, Adjusted R-squared: 0.7972 F-statistic: 22.34 on 7 and 31 DF, p-value: 1.883e-10 > 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.41738357 0.83476714 0.5826164 [2,] 0.25144692 0.50289384 0.7485531 [3,] 0.29220973 0.58441946 0.7077903 [4,] 0.21416486 0.42832972 0.7858351 [5,] 0.20478166 0.40956331 0.7952183 [6,] 0.14620133 0.29240266 0.8537987 [7,] 0.08522403 0.17044805 0.9147760 [8,] 0.06407272 0.12814543 0.9359273 [9,] 0.34663351 0.69326702 0.6533665 [10,] 0.33781927 0.67563854 0.6621807 [11,] 0.23628807 0.47257614 0.7637119 [12,] 0.15755490 0.31510980 0.8424451 [13,] 0.15050930 0.30101860 0.8494907 [14,] 0.08853815 0.17707630 0.9114618 [15,] 0.05610344 0.11220689 0.9438966 [16,] 0.04967674 0.09935348 0.9503233 [17,] 0.02485454 0.04970908 0.9751455 [18,] 0.27918587 0.55837173 0.7208141 > postscript(file="/var/wessaorg/rcomp/tmp/10idj1353334052.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/2cq541353334052.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/3tpkh1353334052.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/415h81353334052.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/5e03i1353334052.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 = 39 Frequency = 1 1 2 3 4 5 6 7 -3602.022 9559.983 -6075.674 11072.174 3081.562 4291.477 -8440.062 8 9 10 11 12 13 14 19531.391 -10803.544 -23377.955 -4878.330 1955.659 5354.367 7081.652 15 16 17 18 19 20 21 -11316.837 1805.103 -6430.621 -10377.238 18841.591 -17710.953 5185.543 22 23 24 25 26 27 28 -4445.974 9757.727 -1429.741 -5945.666 9020.577 2810.071 -20614.522 29 30 31 32 33 34 35 -6178.737 20350.225 19781.340 -2828.347 25047.246 -3379.032 -5866.323 36 37 38 39 -4797.257 7493.413 -12426.097 -11096.171 > postscript(file="/var/wessaorg/rcomp/tmp/6dfd41353334052.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 = 39 Frequency = 1 lag(myerror, k = 1) myerror 0 -3602.022 NA 1 9559.983 -3602.022 2 -6075.674 9559.983 3 11072.174 -6075.674 4 3081.562 11072.174 5 4291.477 3081.562 6 -8440.062 4291.477 7 19531.391 -8440.062 8 -10803.544 19531.391 9 -23377.955 -10803.544 10 -4878.330 -23377.955 11 1955.659 -4878.330 12 5354.367 1955.659 13 7081.652 5354.367 14 -11316.837 7081.652 15 1805.103 -11316.837 16 -6430.621 1805.103 17 -10377.238 -6430.621 18 18841.591 -10377.238 19 -17710.953 18841.591 20 5185.543 -17710.953 21 -4445.974 5185.543 22 9757.727 -4445.974 23 -1429.741 9757.727 24 -5945.666 -1429.741 25 9020.577 -5945.666 26 2810.071 9020.577 27 -20614.522 2810.071 28 -6178.737 -20614.522 29 20350.225 -6178.737 30 19781.340 20350.225 31 -2828.347 19781.340 32 25047.246 -2828.347 33 -3379.032 25047.246 34 -5866.323 -3379.032 35 -4797.257 -5866.323 36 7493.413 -4797.257 37 -12426.097 7493.413 38 -11096.171 -12426.097 39 NA -11096.171 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 9559.983 -3602.022 [2,] -6075.674 9559.983 [3,] 11072.174 -6075.674 [4,] 3081.562 11072.174 [5,] 4291.477 3081.562 [6,] -8440.062 4291.477 [7,] 19531.391 -8440.062 [8,] -10803.544 19531.391 [9,] -23377.955 -10803.544 [10,] -4878.330 -23377.955 [11,] 1955.659 -4878.330 [12,] 5354.367 1955.659 [13,] 7081.652 5354.367 [14,] -11316.837 7081.652 [15,] 1805.103 -11316.837 [16,] -6430.621 1805.103 [17,] -10377.238 -6430.621 [18,] 18841.591 -10377.238 [19,] -17710.953 18841.591 [20,] 5185.543 -17710.953 [21,] -4445.974 5185.543 [22,] 9757.727 -4445.974 [23,] -1429.741 9757.727 [24,] -5945.666 -1429.741 [25,] 9020.577 -5945.666 [26,] 2810.071 9020.577 [27,] -20614.522 2810.071 [28,] -6178.737 -20614.522 [29,] 20350.225 -6178.737 [30,] 19781.340 20350.225 [31,] -2828.347 19781.340 [32,] 25047.246 -2828.347 [33,] -3379.032 25047.246 [34,] -5866.323 -3379.032 [35,] -4797.257 -5866.323 [36,] 7493.413 -4797.257 [37,] -12426.097 7493.413 [38,] -11096.171 -12426.097 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 9559.983 -3602.022 2 -6075.674 9559.983 3 11072.174 -6075.674 4 3081.562 11072.174 5 4291.477 3081.562 6 -8440.062 4291.477 7 19531.391 -8440.062 8 -10803.544 19531.391 9 -23377.955 -10803.544 10 -4878.330 -23377.955 11 1955.659 -4878.330 12 5354.367 1955.659 13 7081.652 5354.367 14 -11316.837 7081.652 15 1805.103 -11316.837 16 -6430.621 1805.103 17 -10377.238 -6430.621 18 18841.591 -10377.238 19 -17710.953 18841.591 20 5185.543 -17710.953 21 -4445.974 5185.543 22 9757.727 -4445.974 23 -1429.741 9757.727 24 -5945.666 -1429.741 25 9020.577 -5945.666 26 2810.071 9020.577 27 -20614.522 2810.071 28 -6178.737 -20614.522 29 20350.225 -6178.737 30 19781.340 20350.225 31 -2828.347 19781.340 32 25047.246 -2828.347 33 -3379.032 25047.246 34 -5866.323 -3379.032 35 -4797.257 -5866.323 36 7493.413 -4797.257 37 -12426.097 7493.413 38 -11096.171 -12426.097 > 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/7d0y81353334052.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/8vtdh1353334052.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/9ztxt1353334052.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/10uatp1353334052.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/11duue1353334052.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/12qbvh1353334052.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/13qjv21353334053.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/14u8fu1353334053.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/15rs4u1353334053.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/16qykp1353334053.tab") + } > > try(system("convert tmp/10idj1353334052.ps tmp/10idj1353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/2cq541353334052.ps tmp/2cq541353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/3tpkh1353334052.ps tmp/3tpkh1353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/415h81353334052.ps tmp/415h81353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/5e03i1353334052.ps tmp/5e03i1353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/6dfd41353334052.ps tmp/6dfd41353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/7d0y81353334052.ps tmp/7d0y81353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/8vtdh1353334052.ps tmp/8vtdh1353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/9ztxt1353334052.ps tmp/9ztxt1353334052.png",intern=TRUE)) character(0) > try(system("convert tmp/10uatp1353334052.ps tmp/10uatp1353334052.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.708 0.870 6.650