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(0.301029996 + ,3 + ,1.62324929 + ,0.255272505 + ,4 + ,2.79518459 + ,-0.15490196 + ,4 + ,2.255272505 + ,0.591064607 + ,1 + ,1.544068044 + ,0 + ,4 + ,2.593286067 + ,0.556302501 + ,1 + ,1.799340549 + ,0.146128036 + ,1 + ,2.361727836 + ,0.176091259 + ,4 + ,2.049218023 + ,-0.15490196 + ,5 + ,2.432969291 + ,0.322219295 + ,1 + ,1.62324929 + ,0.612783857 + ,2 + ,1.62324929 + ,0.079181246 + ,2 + ,2.079181246 + ,-0.301029996 + ,5 + ,2.170261715 + ,0.531478917 + ,2 + ,1.204119983 + ,0.176091259 + ,1 + ,2.491361694 + ,0.531478917 + ,3 + ,1.447158031 + ,-0.096910013 + ,4 + ,1.832508913 + ,-0.096910013 + ,5 + ,2.526339277 + ,0.146128036 + ,4 + ,1.33243846 + ,0.301029996 + ,1 + ,1.698970004 + ,0.278753601 + ,1 + ,2.426511261 + ,0.113943352 + ,3 + ,1.278753601 + ,0.301029996 + ,3 + ,1.477121255 + ,0.748188027 + ,1 + ,1.079181246 + ,0.491361694 + ,1 + ,2.079181246 + ,0.255272505 + ,2 + ,2.146128036 + ,-0.045757491 + ,4 + ,2.230448921 + ,0.255272505 + ,2 + ,1.230448921 + ,0.278753601 + ,4 + ,2.06069784 + ,-0.045757491 + ,5 + ,1.491361694 + ,0.414973348 + ,3 + ,1.322219295 + ,0.380211242 + ,1 + ,1.716003344 + ,0.079181246 + ,2 + ,2.214843848 + ,-0.045757491 + ,2 + ,2.352182518 + ,-0.301029996 + ,3 + ,2.352182518 + ,-0.22184875 + ,5 + ,2.178976947 + ,0.361727836 + ,2 + ,1.77815125 + ,-0.301029996 + ,3 + ,2.301029996 + ,0.414973348 + ,2 + ,1.662757832 + ,-0.22184875 + ,4 + ,2.322219295 + ,0.819543936 + ,1 + ,1.146128036) + ,dim=c(3 + ,41) + ,dimnames=list(c('log(PS)' + ,'Danger' + ,'log(tg)') + ,1:41)) > y <- array(NA,dim=c(3,41),dimnames=list(c('log(PS)','Danger','log(tg)'),1:41)) > 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 log(PS) Danger log(tg) 1 0.30103000 3 1.623249 2 0.25527250 4 2.795185 3 -0.15490196 4 2.255273 4 0.59106461 1 1.544068 5 0.00000000 4 2.593286 6 0.55630250 1 1.799341 7 0.14612804 1 2.361728 8 0.17609126 4 2.049218 9 -0.15490196 5 2.432969 10 0.32221930 1 1.623249 11 0.61278386 2 1.623249 12 0.07918125 2 2.079181 13 -0.30103000 5 2.170262 14 0.53147892 2 1.204120 15 0.17609126 1 2.491362 16 0.53147892 3 1.447158 17 -0.09691001 4 1.832509 18 -0.09691001 5 2.526339 19 0.14612804 4 1.332438 20 0.30103000 1 1.698970 21 0.27875360 1 2.426511 22 0.11394335 3 1.278754 23 0.30103000 3 1.477121 24 0.74818803 1 1.079181 25 0.49136169 1 2.079181 26 0.25527250 2 2.146128 27 -0.04575749 4 2.230449 28 0.25527250 2 1.230449 29 0.27875360 4 2.060698 30 -0.04575749 5 1.491362 31 0.41497335 3 1.322219 32 0.38021124 1 1.716003 33 0.07918125 2 2.214844 34 -0.04575749 2 2.352183 35 -0.30103000 3 2.352183 36 -0.22184875 5 2.178977 37 0.36172784 2 1.778151 38 -0.30103000 3 2.301030 39 0.41497335 2 1.662758 40 -0.22184875 4 2.322219 41 0.81954394 1 1.146128 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Danger `log(tg)` 1.0654 -0.1126 -0.2967 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.34562 -0.14389 0.01194 0.11572 0.46996 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.06536 0.12123 8.788 1.09e-10 *** Danger -0.11265 0.02099 -5.367 4.20e-06 *** `log(tg)` -0.29675 0.06384 -4.648 3.96e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1773 on 38 degrees of freedom Multiple R-squared: 0.6544, Adjusted R-squared: 0.6363 F-statistic: 35.98 on 2 and 38 DF, p-value: 1.706e-09 > 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.6238388 0.75232237 0.37616119 [2,] 0.8307706 0.33845879 0.16922940 [3,] 0.7548944 0.49021126 0.24510563 [4,] 0.6912332 0.61753368 0.30876684 [5,] 0.6593177 0.68136463 0.34068232 [6,] 0.7384049 0.52319021 0.26159510 [7,] 0.7432754 0.51344925 0.25672462 [8,] 0.7882020 0.42359606 0.21179803 [9,] 0.7123010 0.57539802 0.28769901 [10,] 0.6346358 0.73072838 0.36536419 [11,] 0.6681174 0.66376522 0.33188261 [12,] 0.6871239 0.62575221 0.31287611 [13,] 0.6951577 0.60968465 0.30484232 [14,] 0.6244952 0.75100967 0.37550483 [15,] 0.6043921 0.79121580 0.39560790 [16,] 0.5221633 0.95567333 0.47783667 [17,] 0.6077542 0.78449154 0.39224577 [18,] 0.5117550 0.97648996 0.48824498 [19,] 0.4518392 0.90367849 0.54816075 [20,] 0.4637085 0.92741700 0.53629150 [21,] 0.4163730 0.83274609 0.58362695 [22,] 0.3524510 0.70490200 0.64754900 [23,] 0.5459655 0.90806893 0.45403446 [24,] 0.9512317 0.09753656 0.04876828 [25,] 0.9639155 0.07216891 0.03608445 [26,] 0.9544368 0.09112637 0.04556318 [27,] 0.9223174 0.15536512 0.07768256 [28,] 0.9026105 0.19477907 0.09738953 [29,] 0.9295632 0.14087351 0.07043676 [30,] 0.8709399 0.25812024 0.12906012 > postscript(file="/var/www/rcomp/tmp/1r00m1292960822.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/22shp1292960822.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/32shp1292960822.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/42shp1292960822.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/5cjys1292960822.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 = 41 Frequency = 1 1 2 3 4 5 6 0.055307202 0.469964974 -0.100426485 0.096549809 0.154779799 0.137538912 7 8 9 10 11 12 -0.105749123 0.169420799 0.064952031 -0.148798750 0.254413438 -0.143892985 13 14 15 16 17 18 -0.159133545 0.048733365 -0.037317513 0.233501667 -0.167888132 0.150651190 19 20 21 22 23 24 -0.073244213 -0.147518196 0.046100693 -0.234007314 0.011944227 0.115719723 25 26 27 28 29 30 0.155639838 0.052064496 0.001351674 -0.219660029 0.275489736 -0.105322210 31 32 33 34 35 36 0.079920972 -0.063282367 -0.103635590 -0.187819564 -0.330444444 -0.077366085 37 38 39 40 41 0.049324023 -0.345623773 0.068326948 -0.147507052 0.206941854 > postscript(file="/var/www/rcomp/tmp/6cjys1292960822.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 = 41 Frequency = 1 lag(myerror, k = 1) myerror 0 0.055307202 NA 1 0.469964974 0.055307202 2 -0.100426485 0.469964974 3 0.096549809 -0.100426485 4 0.154779799 0.096549809 5 0.137538912 0.154779799 6 -0.105749123 0.137538912 7 0.169420799 -0.105749123 8 0.064952031 0.169420799 9 -0.148798750 0.064952031 10 0.254413438 -0.148798750 11 -0.143892985 0.254413438 12 -0.159133545 -0.143892985 13 0.048733365 -0.159133545 14 -0.037317513 0.048733365 15 0.233501667 -0.037317513 16 -0.167888132 0.233501667 17 0.150651190 -0.167888132 18 -0.073244213 0.150651190 19 -0.147518196 -0.073244213 20 0.046100693 -0.147518196 21 -0.234007314 0.046100693 22 0.011944227 -0.234007314 23 0.115719723 0.011944227 24 0.155639838 0.115719723 25 0.052064496 0.155639838 26 0.001351674 0.052064496 27 -0.219660029 0.001351674 28 0.275489736 -0.219660029 29 -0.105322210 0.275489736 30 0.079920972 -0.105322210 31 -0.063282367 0.079920972 32 -0.103635590 -0.063282367 33 -0.187819564 -0.103635590 34 -0.330444444 -0.187819564 35 -0.077366085 -0.330444444 36 0.049324023 -0.077366085 37 -0.345623773 0.049324023 38 0.068326948 -0.345623773 39 -0.147507052 0.068326948 40 0.206941854 -0.147507052 41 NA 0.206941854 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.469964974 0.055307202 [2,] -0.100426485 0.469964974 [3,] 0.096549809 -0.100426485 [4,] 0.154779799 0.096549809 [5,] 0.137538912 0.154779799 [6,] -0.105749123 0.137538912 [7,] 0.169420799 -0.105749123 [8,] 0.064952031 0.169420799 [9,] -0.148798750 0.064952031 [10,] 0.254413438 -0.148798750 [11,] -0.143892985 0.254413438 [12,] -0.159133545 -0.143892985 [13,] 0.048733365 -0.159133545 [14,] -0.037317513 0.048733365 [15,] 0.233501667 -0.037317513 [16,] -0.167888132 0.233501667 [17,] 0.150651190 -0.167888132 [18,] -0.073244213 0.150651190 [19,] -0.147518196 -0.073244213 [20,] 0.046100693 -0.147518196 [21,] -0.234007314 0.046100693 [22,] 0.011944227 -0.234007314 [23,] 0.115719723 0.011944227 [24,] 0.155639838 0.115719723 [25,] 0.052064496 0.155639838 [26,] 0.001351674 0.052064496 [27,] -0.219660029 0.001351674 [28,] 0.275489736 -0.219660029 [29,] -0.105322210 0.275489736 [30,] 0.079920972 -0.105322210 [31,] -0.063282367 0.079920972 [32,] -0.103635590 -0.063282367 [33,] -0.187819564 -0.103635590 [34,] -0.330444444 -0.187819564 [35,] -0.077366085 -0.330444444 [36,] 0.049324023 -0.077366085 [37,] -0.345623773 0.049324023 [38,] 0.068326948 -0.345623773 [39,] -0.147507052 0.068326948 [40,] 0.206941854 -0.147507052 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.469964974 0.055307202 2 -0.100426485 0.469964974 3 0.096549809 -0.100426485 4 0.154779799 0.096549809 5 0.137538912 0.154779799 6 -0.105749123 0.137538912 7 0.169420799 -0.105749123 8 0.064952031 0.169420799 9 -0.148798750 0.064952031 10 0.254413438 -0.148798750 11 -0.143892985 0.254413438 12 -0.159133545 -0.143892985 13 0.048733365 -0.159133545 14 -0.037317513 0.048733365 15 0.233501667 -0.037317513 16 -0.167888132 0.233501667 17 0.150651190 -0.167888132 18 -0.073244213 0.150651190 19 -0.147518196 -0.073244213 20 0.046100693 -0.147518196 21 -0.234007314 0.046100693 22 0.011944227 -0.234007314 23 0.115719723 0.011944227 24 0.155639838 0.115719723 25 0.052064496 0.155639838 26 0.001351674 0.052064496 27 -0.219660029 0.001351674 28 0.275489736 -0.219660029 29 -0.105322210 0.275489736 30 0.079920972 -0.105322210 31 -0.063282367 0.079920972 32 -0.103635590 -0.063282367 33 -0.187819564 -0.103635590 34 -0.330444444 -0.187819564 35 -0.077366085 -0.330444444 36 0.049324023 -0.077366085 37 -0.345623773 0.049324023 38 0.068326948 -0.345623773 39 -0.147507052 0.068326948 40 0.206941854 -0.147507052 > 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/7nsyv1292960822.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/8nsyv1292960822.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/9nsyv1292960822.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/10yjff1292960822.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/111kd31292960822.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/12m2c91292960822.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/13jca01292960822.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/14mv861292960822.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/15qvpc1292960822.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/16twn01292960822.tab") + } > > try(system("convert tmp/1r00m1292960822.ps tmp/1r00m1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/22shp1292960822.ps tmp/22shp1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/32shp1292960822.ps tmp/32shp1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/42shp1292960822.ps tmp/42shp1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/5cjys1292960822.ps tmp/5cjys1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/6cjys1292960822.ps tmp/6cjys1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/7nsyv1292960822.ps tmp/7nsyv1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/8nsyv1292960822.ps tmp/8nsyv1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/9nsyv1292960822.ps tmp/9nsyv1292960822.png",intern=TRUE)) character(0) > try(system("convert tmp/10yjff1292960822.ps tmp/10yjff1292960822.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.900 1.770 4.612