R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(2.0,1.62324929,3,1.8,2.79518459,4,.7,2.255272505,4,3.9,1.544068044,1,1.0,2.593286067,4,3.6,1.799340549,1,1.4,2.361727836,1,1.5,2.049218023,4,.7,2.44870632,5,2.1,1.62324929,1,.0,1.447158031,2,4.1,1.62324929,2,1.2,2.079181246,2,.3,2.602059991,5,.5,2.170261715,5,3.4,1.204119983,2,1.5,2.491361694,1,3.4,1.447158031,3,.8,1.832508913,4,.8,2.526339277,5,1.4,1.322219295,4,2.0,1.698970004,1,1.9,2.426511261,1,2.4,1.477121255,1,2.8,1.653212514,3,1.3,1.278753601,3,2.0,1.477121255,3,5.6,1.079181246,1,3.1,2.079181246,1,1.0,2.643452676,5,1.8,2.146128036,2,.9,2.230448921,4,1.8,1.230448921,2,1.9,2.06069784,4,.9,1.491361694,5,2.6,1.322219295,3,2.4,1.716003344,1,1.2,2.214843848,2,.9,2.352182518,2,.5,2.352182518,3,.6,2.178976947,5,2.3,1.77815125,2,.5,2.301029996,3,2.6,1.662757832,2,.6,2.322219295,4,6.6,1.146128036,1),dim=c(3,46),dimnames=list(c('PS','Tg','D'),1:46)) > y <- array(NA,dim=c(3,46),dimnames=list(c('PS','Tg','D'),1:46)) > 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 > 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 PS Tg D 1 2.0 1.623249 3 2 1.8 2.795185 4 3 0.7 2.255273 4 4 3.9 1.544068 1 5 1.0 2.593286 4 6 3.6 1.799341 1 7 1.4 2.361728 1 8 1.5 2.049218 4 9 0.7 2.448706 5 10 2.1 1.623249 1 11 0.0 1.447158 2 12 4.1 1.623249 2 13 1.2 2.079181 2 14 0.3 2.602060 5 15 0.5 2.170262 5 16 3.4 1.204120 2 17 1.5 2.491362 1 18 3.4 1.447158 3 19 0.8 1.832509 4 20 0.8 2.526339 5 21 1.4 1.322219 4 22 2.0 1.698970 1 23 1.9 2.426511 1 24 2.4 1.477121 1 25 2.8 1.653213 3 26 1.3 1.278754 3 27 2.0 1.477121 3 28 5.6 1.079181 1 29 3.1 2.079181 1 30 1.0 2.643453 5 31 1.8 2.146128 2 32 0.9 2.230449 4 33 1.8 1.230449 2 34 1.9 2.060698 4 35 0.9 1.491362 5 36 2.6 1.322219 3 37 2.4 1.716003 1 38 1.2 2.214844 2 39 0.9 2.352183 2 40 0.5 2.352183 3 41 0.6 2.178977 5 42 2.3 1.778151 2 43 0.5 2.301030 3 44 2.6 1.662758 2 45 0.6 2.322219 4 46 6.6 1.146128 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Tg D 5.3570 -1.2481 -0.3944 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2.76197 -0.67495 -0.09253 0.54057 3.06787 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.3570 0.6163 8.692 5.08e-11 *** Tg -1.2481 0.3392 -3.679 0.000646 *** D -0.3944 0.1116 -3.535 0.000990 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.9846 on 43 degrees of freedom Multiple R-squared: 0.5007, Adjusted R-squared: 0.4774 F-statistic: 21.56 on 2 and 43 DF, p-value: 3.277e-07 > 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.09477932 0.1895586 0.9052207 [2,] 0.48396257 0.9679251 0.5160374 [3,] 0.33491079 0.6698216 0.6650892 [4,] 0.21749065 0.4349813 0.7825093 [5,] 0.22359123 0.4471825 0.7764088 [6,] 0.76398263 0.4720347 0.2360174 [7,] 0.89562807 0.2087439 0.1043719 [8,] 0.87747770 0.2450446 0.1225223 [9,] 0.82760591 0.3447882 0.1723941 [10,] 0.75987290 0.4802542 0.2401271 [11,] 0.71484400 0.5703120 0.2851560 [12,] 0.64570421 0.7085916 0.3542958 [13,] 0.65015636 0.6996873 0.3498436 [14,] 0.60640589 0.7871882 0.3935941 [15,] 0.55130942 0.8973812 0.4486906 [16,] 0.50059731 0.9988054 0.4994027 [17,] 0.47171305 0.9434261 0.5282869 [18,] 0.38246809 0.7649362 0.6175319 [19,] 0.35134942 0.7026988 0.6486506 [20,] 0.31236315 0.6247263 0.6876369 [21,] 0.37992714 0.7598543 0.6200729 [22,] 0.31688894 0.6337779 0.6831111 [23,] 0.52771974 0.9445605 0.4722803 [24,] 0.48432868 0.9686574 0.5156713 [25,] 0.55530591 0.8893882 0.4446941 [26,] 0.45968627 0.9193725 0.5403137 [27,] 0.37520499 0.7504100 0.6247950 [28,] 0.62476195 0.7504761 0.3752381 [29,] 0.65831571 0.6833686 0.3416843 [30,] 0.68305606 0.6338879 0.3169439 [31,] 0.84440518 0.3111896 0.1555948 [32,] 0.87309899 0.2538020 0.1269010 [33,] 0.78383251 0.4323350 0.2161675 [34,] 0.69514802 0.6097040 0.3048520 [35,] 0.57179190 0.8564162 0.4282081 > postscript(file="/var/www/rcomp/tmp/1mhpf1292316812.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/rcomp/tmp/2x8oi1292316812.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/rcomp/tmp/3x8oi1292316812.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/rcomp/tmp/4x8oi1292316812.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/rcomp/tmp/5x8oi1292316812.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 = 46 Frequency = 1 1 2 3 4 5 6 -0.14774203 1.50938149 -0.26447422 0.86453377 0.45739514 0.88313534 7 8 9 10 11 12 -0.61495802 0.27835245 0.37139712 -0.83664137 -2.76196841 1.55780830 13 14 15 16 17 18 -0.77315026 0.16279541 -0.17612517 0.33469966 -0.35316406 1.03248126 19 20 21 22 23 24 -0.69211875 0.56828959 -0.72900312 -0.84213555 -0.03410285 -0.71902145 25 26 27 28 29 30 0.68965459 -1.27770163 -0.33012211 1.98431594 0.73240007 0.91445696 31 32 33 34 35 36 -0.08959504 -0.09545614 -1.23243961 0.69268023 -0.62344951 0.07654721 37 38 39 40 41 42 -0.42087651 -0.60383192 -0.73242171 -0.73797204 -0.06524782 -0.04886102 43 44 45 46 -0.80181469 0.10711828 -0.28091899 3.06787117 > postscript(file="/var/www/rcomp/tmp/6qh631292316812.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 = 46 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.14774203 NA 1 1.50938149 -0.14774203 2 -0.26447422 1.50938149 3 0.86453377 -0.26447422 4 0.45739514 0.86453377 5 0.88313534 0.45739514 6 -0.61495802 0.88313534 7 0.27835245 -0.61495802 8 0.37139712 0.27835245 9 -0.83664137 0.37139712 10 -2.76196841 -0.83664137 11 1.55780830 -2.76196841 12 -0.77315026 1.55780830 13 0.16279541 -0.77315026 14 -0.17612517 0.16279541 15 0.33469966 -0.17612517 16 -0.35316406 0.33469966 17 1.03248126 -0.35316406 18 -0.69211875 1.03248126 19 0.56828959 -0.69211875 20 -0.72900312 0.56828959 21 -0.84213555 -0.72900312 22 -0.03410285 -0.84213555 23 -0.71902145 -0.03410285 24 0.68965459 -0.71902145 25 -1.27770163 0.68965459 26 -0.33012211 -1.27770163 27 1.98431594 -0.33012211 28 0.73240007 1.98431594 29 0.91445696 0.73240007 30 -0.08959504 0.91445696 31 -0.09545614 -0.08959504 32 -1.23243961 -0.09545614 33 0.69268023 -1.23243961 34 -0.62344951 0.69268023 35 0.07654721 -0.62344951 36 -0.42087651 0.07654721 37 -0.60383192 -0.42087651 38 -0.73242171 -0.60383192 39 -0.73797204 -0.73242171 40 -0.06524782 -0.73797204 41 -0.04886102 -0.06524782 42 -0.80181469 -0.04886102 43 0.10711828 -0.80181469 44 -0.28091899 0.10711828 45 3.06787117 -0.28091899 46 NA 3.06787117 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.50938149 -0.14774203 [2,] -0.26447422 1.50938149 [3,] 0.86453377 -0.26447422 [4,] 0.45739514 0.86453377 [5,] 0.88313534 0.45739514 [6,] -0.61495802 0.88313534 [7,] 0.27835245 -0.61495802 [8,] 0.37139712 0.27835245 [9,] -0.83664137 0.37139712 [10,] -2.76196841 -0.83664137 [11,] 1.55780830 -2.76196841 [12,] -0.77315026 1.55780830 [13,] 0.16279541 -0.77315026 [14,] -0.17612517 0.16279541 [15,] 0.33469966 -0.17612517 [16,] -0.35316406 0.33469966 [17,] 1.03248126 -0.35316406 [18,] -0.69211875 1.03248126 [19,] 0.56828959 -0.69211875 [20,] -0.72900312 0.56828959 [21,] -0.84213555 -0.72900312 [22,] -0.03410285 -0.84213555 [23,] -0.71902145 -0.03410285 [24,] 0.68965459 -0.71902145 [25,] -1.27770163 0.68965459 [26,] -0.33012211 -1.27770163 [27,] 1.98431594 -0.33012211 [28,] 0.73240007 1.98431594 [29,] 0.91445696 0.73240007 [30,] -0.08959504 0.91445696 [31,] -0.09545614 -0.08959504 [32,] -1.23243961 -0.09545614 [33,] 0.69268023 -1.23243961 [34,] -0.62344951 0.69268023 [35,] 0.07654721 -0.62344951 [36,] -0.42087651 0.07654721 [37,] -0.60383192 -0.42087651 [38,] -0.73242171 -0.60383192 [39,] -0.73797204 -0.73242171 [40,] -0.06524782 -0.73797204 [41,] -0.04886102 -0.06524782 [42,] -0.80181469 -0.04886102 [43,] 0.10711828 -0.80181469 [44,] -0.28091899 0.10711828 [45,] 3.06787117 -0.28091899 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.50938149 -0.14774203 2 -0.26447422 1.50938149 3 0.86453377 -0.26447422 4 0.45739514 0.86453377 5 0.88313534 0.45739514 6 -0.61495802 0.88313534 7 0.27835245 -0.61495802 8 0.37139712 0.27835245 9 -0.83664137 0.37139712 10 -2.76196841 -0.83664137 11 1.55780830 -2.76196841 12 -0.77315026 1.55780830 13 0.16279541 -0.77315026 14 -0.17612517 0.16279541 15 0.33469966 -0.17612517 16 -0.35316406 0.33469966 17 1.03248126 -0.35316406 18 -0.69211875 1.03248126 19 0.56828959 -0.69211875 20 -0.72900312 0.56828959 21 -0.84213555 -0.72900312 22 -0.03410285 -0.84213555 23 -0.71902145 -0.03410285 24 0.68965459 -0.71902145 25 -1.27770163 0.68965459 26 -0.33012211 -1.27770163 27 1.98431594 -0.33012211 28 0.73240007 1.98431594 29 0.91445696 0.73240007 30 -0.08959504 0.91445696 31 -0.09545614 -0.08959504 32 -1.23243961 -0.09545614 33 0.69268023 -1.23243961 34 -0.62344951 0.69268023 35 0.07654721 -0.62344951 36 -0.42087651 0.07654721 37 -0.60383192 -0.42087651 38 -0.73242171 -0.60383192 39 -0.73797204 -0.73242171 40 -0.06524782 -0.73797204 41 -0.04886102 -0.06524782 42 -0.80181469 -0.04886102 43 0.10711828 -0.80181469 44 -0.28091899 0.10711828 45 3.06787117 -0.28091899 > 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/rcomp/tmp/71qn61292316812.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/rcomp/tmp/81qn61292316812.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/rcomp/tmp/9bim91292316812.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/rcomp/tmp/10m9mu1292316812.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11f03f1292316812.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/rcomp/tmp/12ij131292316812.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/rcomp/tmp/13pkgx1292316812.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/rcomp/tmp/14akf21292316812.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/rcomp/tmp/153ten1292316812.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/rcomp/tmp/16z3uw1292316812.tab") + } > > try(system("convert tmp/1mhpf1292316812.ps tmp/1mhpf1292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/2x8oi1292316812.ps tmp/2x8oi1292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/3x8oi1292316812.ps tmp/3x8oi1292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/4x8oi1292316812.ps tmp/4x8oi1292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/5x8oi1292316812.ps tmp/5x8oi1292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/6qh631292316812.ps tmp/6qh631292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/71qn61292316812.ps tmp/71qn61292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/81qn61292316812.ps tmp/81qn61292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/9bim91292316812.ps tmp/9bim91292316812.png",intern=TRUE)) character(0) > try(system("convert tmp/10m9mu1292316812.ps tmp/10m9mu1292316812.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.040 1.830 4.923