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(6.3,4.5,1,6.6,42,2.1,69,2547,4603,624,9.1,27,10.55,179.5,180,15.8,19,0.023,0.3,35,5.2,30.4,160,169,392,10.9,28,3.3,25.6,63,8.3,50,52.16,440,230,11,7,0.425,6.4,112,3.2,30,465,423,281,6.3,3.5,0.075,1.2,42,8.6,50,3,25,28,6.6,6,0.785,3.5,42,9.5,10.4,0.2,5,120,3.3,20,27.66,115,148,11,3.9,0.12,1,16,4.7,41,85,325,310,10.4,9,0.101,4,28,7.4,7.6,1.04,5.5,68,2.1,46,521,655,336,7.7,2.6,0.005,0.14,21.5,17.9,24,0.01,0.25,50,6.1,100,62,1320,267,11.9,3.2,0.023,0.4,19,10.8,2,0.048,0.33,30,13.8,5,1.7,6.3,12,14.3,6.5,3.5,10.8,120,15.2,12,0.48,15.5,140,10,20.2,10,115,170,11.9,13,1.62,11.4,17,6.5,27,192,180,115,7.5,18,2.5,12.1,31,10.6,4.7,0.28,1.9,21,7.4,9.8,4.235,50.4,52,8.4,29,6.8,179,164,5.7,7,0.75,12.3,225,4.9,6,3.6,21,225,3.2,20,55.5,175,151,11,4.5,0.9,2.6,60,4.9,7.5,2,12.3,200,13.2,2.3,0.104,2.5,46,9.7,24,4.19,58,210,12.8,3,3.5,3.9,14),dim=c(5,42),dimnames=list(c('SWS','LS','BW','BRW','GT'),1:42)) > y <- array(NA,dim=c(5,42),dimnames=list(c('SWS','LS','BW','BRW','GT'),1:42)) > 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 SWS LS BW BRW GT 1 6.3 4.5 1.000 6.60 42.0 2 2.1 69.0 2547.000 4603.00 624.0 3 9.1 27.0 10.550 179.50 180.0 4 15.8 19.0 0.023 0.30 35.0 5 5.2 30.4 160.000 169.00 392.0 6 10.9 28.0 3.300 25.60 63.0 7 8.3 50.0 52.160 440.00 230.0 8 11.0 7.0 0.425 6.40 112.0 9 3.2 30.0 465.000 423.00 281.0 10 6.3 3.5 0.075 1.20 42.0 11 8.6 50.0 3.000 25.00 28.0 12 6.6 6.0 0.785 3.50 42.0 13 9.5 10.4 0.200 5.00 120.0 14 3.3 20.0 27.660 115.00 148.0 15 11.0 3.9 0.120 1.00 16.0 16 4.7 41.0 85.000 325.00 310.0 17 10.4 9.0 0.101 4.00 28.0 18 7.4 7.6 1.040 5.50 68.0 19 2.1 46.0 521.000 655.00 336.0 20 7.7 2.6 0.005 0.14 21.5 21 17.9 24.0 0.010 0.25 50.0 22 6.1 100.0 62.000 1320.00 267.0 23 11.9 3.2 0.023 0.40 19.0 24 10.8 2.0 0.048 0.33 30.0 25 13.8 5.0 1.700 6.30 12.0 26 14.3 6.5 3.500 10.80 120.0 27 15.2 12.0 0.480 15.50 140.0 28 10.0 20.2 10.000 115.00 170.0 29 11.9 13.0 1.620 11.40 17.0 30 6.5 27.0 192.000 180.00 115.0 31 7.5 18.0 2.500 12.10 31.0 32 10.6 4.7 0.280 1.90 21.0 33 7.4 9.8 4.235 50.40 52.0 34 8.4 29.0 6.800 179.00 164.0 35 5.7 7.0 0.750 12.30 225.0 36 4.9 6.0 3.600 21.00 225.0 37 3.2 20.0 55.500 175.00 151.0 38 11.0 4.5 0.900 2.60 60.0 39 4.9 7.5 2.000 12.30 200.0 40 13.2 2.3 0.104 2.50 46.0 41 9.7 24.0 4.190 58.00 210.0 42 12.8 3.0 3.500 3.90 14.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) LS BW BRW GT 11.387035 -0.014186 -0.002772 0.002209 -0.019801 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.146061 -2.065151 0.009003 1.637666 7.842967 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 11.387035 0.845591 13.466 7.77e-16 *** LS -0.014186 0.043976 -0.323 0.74882 BW -0.002772 0.005501 -0.504 0.61728 BRW 0.002209 0.003256 0.678 0.50179 GT -0.019801 0.006521 -3.037 0.00437 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.184 on 37 degrees of freedom Multiple R-squared: 0.3789, Adjusted R-squared: 0.3117 F-statistic: 5.642 on 4 and 37 DF, p-value: 0.001196 > 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.6668148 0.66637032 0.333185159 [2,] 0.6595712 0.68085759 0.340428797 [3,] 0.6656277 0.66874468 0.334372340 [4,] 0.6492760 0.70144798 0.350723990 [5,] 0.6246669 0.75066616 0.375333080 [6,] 0.5174996 0.96500073 0.482500367 [7,] 0.6800713 0.63985746 0.319928731 [8,] 0.5969320 0.80613594 0.403067969 [9,] 0.5140759 0.97184829 0.485924143 [10,] 0.4171503 0.83430061 0.582849693 [11,] 0.3612070 0.72241391 0.638793045 [12,] 0.3678004 0.73560084 0.632199580 [13,] 0.3423223 0.68464465 0.657677676 [14,] 0.6980899 0.60382025 0.301910124 [15,] 0.6901962 0.61960768 0.309803842 [16,] 0.6059503 0.78809936 0.394049680 [17,] 0.5079573 0.98408543 0.492042714 [18,] 0.4627356 0.92547130 0.537264351 [19,] 0.6131255 0.77374902 0.386874509 [20,] 0.8608784 0.27824314 0.139121572 [21,] 0.8500828 0.29983438 0.149917188 [22,] 0.7702090 0.45958195 0.229790977 [23,] 0.7992416 0.40151689 0.200758443 [24,] 0.9062595 0.18748104 0.093740519 [25,] 0.8570396 0.28592088 0.142960439 [26,] 0.9733364 0.05332730 0.026663648 [27,] 0.9931631 0.01367387 0.006836935 > postscript(file="/var/www/html/rcomp/tmp/1z75f1292367021.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/2z75f1292367021.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/3z75f1292367021.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/4ry4h1292367021.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/5ry4h1292367021.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 = 42 Frequency = 1 1 2 3 4 5 6 -4.20335886 0.94054012 1.29292607 5.37494500 2.07647178 1.11024989 7 8 9 10 11 12 1.34918363 1.91702790 -1.84268708 -4.20818119 -1.57019149 -3.87582749 13 14 15 16 17 18 0.62613887 -5.05010359 -0.01676716 -0.44934448 -0.31348342 -2.54201314 19 20 21 22 23 24 -1.98388307 -3.22472288 7.84296715 -1.32545396 0.93376194 0.03477361 25 26 27 28 29 30 2.71230630 5.36714799 6.72244021 2.03940051 1.01331549 -2.09224028 31 32 33 34 35 36 -3.03764458 -0.30795732 -2.91794448 0.29519119 -1.15758629 -1.98308996 37 38 39 40 41 42 -5.14606088 0.86161847 -2.44205393 2.75120802 2.69515452 1.73382688 > postscript(file="/var/www/html/rcomp/tmp/6ry4h1292367021.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 = 42 Frequency = 1 lag(myerror, k = 1) myerror 0 -4.20335886 NA 1 0.94054012 -4.20335886 2 1.29292607 0.94054012 3 5.37494500 1.29292607 4 2.07647178 5.37494500 5 1.11024989 2.07647178 6 1.34918363 1.11024989 7 1.91702790 1.34918363 8 -1.84268708 1.91702790 9 -4.20818119 -1.84268708 10 -1.57019149 -4.20818119 11 -3.87582749 -1.57019149 12 0.62613887 -3.87582749 13 -5.05010359 0.62613887 14 -0.01676716 -5.05010359 15 -0.44934448 -0.01676716 16 -0.31348342 -0.44934448 17 -2.54201314 -0.31348342 18 -1.98388307 -2.54201314 19 -3.22472288 -1.98388307 20 7.84296715 -3.22472288 21 -1.32545396 7.84296715 22 0.93376194 -1.32545396 23 0.03477361 0.93376194 24 2.71230630 0.03477361 25 5.36714799 2.71230630 26 6.72244021 5.36714799 27 2.03940051 6.72244021 28 1.01331549 2.03940051 29 -2.09224028 1.01331549 30 -3.03764458 -2.09224028 31 -0.30795732 -3.03764458 32 -2.91794448 -0.30795732 33 0.29519119 -2.91794448 34 -1.15758629 0.29519119 35 -1.98308996 -1.15758629 36 -5.14606088 -1.98308996 37 0.86161847 -5.14606088 38 -2.44205393 0.86161847 39 2.75120802 -2.44205393 40 2.69515452 2.75120802 41 1.73382688 2.69515452 42 NA 1.73382688 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.94054012 -4.20335886 [2,] 1.29292607 0.94054012 [3,] 5.37494500 1.29292607 [4,] 2.07647178 5.37494500 [5,] 1.11024989 2.07647178 [6,] 1.34918363 1.11024989 [7,] 1.91702790 1.34918363 [8,] -1.84268708 1.91702790 [9,] -4.20818119 -1.84268708 [10,] -1.57019149 -4.20818119 [11,] -3.87582749 -1.57019149 [12,] 0.62613887 -3.87582749 [13,] -5.05010359 0.62613887 [14,] -0.01676716 -5.05010359 [15,] -0.44934448 -0.01676716 [16,] -0.31348342 -0.44934448 [17,] -2.54201314 -0.31348342 [18,] -1.98388307 -2.54201314 [19,] -3.22472288 -1.98388307 [20,] 7.84296715 -3.22472288 [21,] -1.32545396 7.84296715 [22,] 0.93376194 -1.32545396 [23,] 0.03477361 0.93376194 [24,] 2.71230630 0.03477361 [25,] 5.36714799 2.71230630 [26,] 6.72244021 5.36714799 [27,] 2.03940051 6.72244021 [28,] 1.01331549 2.03940051 [29,] -2.09224028 1.01331549 [30,] -3.03764458 -2.09224028 [31,] -0.30795732 -3.03764458 [32,] -2.91794448 -0.30795732 [33,] 0.29519119 -2.91794448 [34,] -1.15758629 0.29519119 [35,] -1.98308996 -1.15758629 [36,] -5.14606088 -1.98308996 [37,] 0.86161847 -5.14606088 [38,] -2.44205393 0.86161847 [39,] 2.75120802 -2.44205393 [40,] 2.69515452 2.75120802 [41,] 1.73382688 2.69515452 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.94054012 -4.20335886 2 1.29292607 0.94054012 3 5.37494500 1.29292607 4 2.07647178 5.37494500 5 1.11024989 2.07647178 6 1.34918363 1.11024989 7 1.91702790 1.34918363 8 -1.84268708 1.91702790 9 -4.20818119 -1.84268708 10 -1.57019149 -4.20818119 11 -3.87582749 -1.57019149 12 0.62613887 -3.87582749 13 -5.05010359 0.62613887 14 -0.01676716 -5.05010359 15 -0.44934448 -0.01676716 16 -0.31348342 -0.44934448 17 -2.54201314 -0.31348342 18 -1.98388307 -2.54201314 19 -3.22472288 -1.98388307 20 7.84296715 -3.22472288 21 -1.32545396 7.84296715 22 0.93376194 -1.32545396 23 0.03477361 0.93376194 24 2.71230630 0.03477361 25 5.36714799 2.71230630 26 6.72244021 5.36714799 27 2.03940051 6.72244021 28 1.01331549 2.03940051 29 -2.09224028 1.01331549 30 -3.03764458 -2.09224028 31 -0.30795732 -3.03764458 32 -2.91794448 -0.30795732 33 0.29519119 -2.91794448 34 -1.15758629 0.29519119 35 -1.98308996 -1.15758629 36 -5.14606088 -1.98308996 37 0.86161847 -5.14606088 38 -2.44205393 0.86161847 39 2.75120802 -2.44205393 40 2.69515452 2.75120802 41 1.73382688 2.69515452 > 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/7kq3k1292367021.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/8dhlo1292367021.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/9dhlo1292367021.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') Warning messages: 1: In sqrt(crit * p * (1 - hh)/hh) : NaNs produced 2: In sqrt(crit * p * (1 - hh)/hh) : NaNs produced > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/105q2q1292367021.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/11r9iw1292367021.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/12urhk1292367021.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/1381fb1292367021.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/14u2vh1292367021.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/15f2u51292367021.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/161lab1292367021.tab") + } > > try(system("convert tmp/1z75f1292367021.ps tmp/1z75f1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/2z75f1292367021.ps tmp/2z75f1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/3z75f1292367021.ps tmp/3z75f1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/4ry4h1292367021.ps tmp/4ry4h1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/5ry4h1292367021.ps tmp/5ry4h1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/6ry4h1292367021.ps tmp/6ry4h1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/7kq3k1292367021.ps tmp/7kq3k1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/8dhlo1292367021.ps tmp/8dhlo1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/9dhlo1292367021.ps tmp/9dhlo1292367021.png",intern=TRUE)) character(0) > try(system("convert tmp/105q2q1292367021.ps tmp/105q2q1292367021.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.387 1.678 7.350