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(19,74,18,76,19,69.6,19,77.3,22,75.2,23,75.8,20,77.6,14,76.7,14,77,14,77.9,15,76.7,11,71.9,17,73.4,16,72.5,20,73.7,24,69.5,23,74.7,20,72.5,21,72.1,19,70.7,23,71.4,23,69.5,23,73.5,23,72.4,27,74.5,26,72.2,17,73,24,73.3,26,71.3,24,73.6,27,71.3,27,71.2,26,81.4,24,76.1,23,71.1,23,75.7,24,70,17,68.5,21,56.7,19,57.9,22,58.8,22,59.3,18,61.3,16,62.9,14,61.4,12,64.5,14,63.8,16,61.6,8,64.7),dim=c(2,49),dimnames=list(c('indcvtr','dzcg '),1:49)) > y <- array(NA,dim=c(2,49),dimnames=list(c('indcvtr','dzcg '),1:49)) > 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 = 'Include Monthly Dummies' > par1 = '2' > #'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 dzcg\r indcvtr M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 74.0 19 1 0 0 0 0 0 0 0 0 0 0 1 2 76.0 18 0 1 0 0 0 0 0 0 0 0 0 2 3 69.6 19 0 0 1 0 0 0 0 0 0 0 0 3 4 77.3 19 0 0 0 1 0 0 0 0 0 0 0 4 5 75.2 22 0 0 0 0 1 0 0 0 0 0 0 5 6 75.8 23 0 0 0 0 0 1 0 0 0 0 0 6 7 77.6 20 0 0 0 0 0 0 1 0 0 0 0 7 8 76.7 14 0 0 0 0 0 0 0 1 0 0 0 8 9 77.0 14 0 0 0 0 0 0 0 0 1 0 0 9 10 77.9 14 0 0 0 0 0 0 0 0 0 1 0 10 11 76.7 15 0 0 0 0 0 0 0 0 0 0 1 11 12 71.9 11 0 0 0 0 0 0 0 0 0 0 0 12 13 73.4 17 1 0 0 0 0 0 0 0 0 0 0 13 14 72.5 16 0 1 0 0 0 0 0 0 0 0 0 14 15 73.7 20 0 0 1 0 0 0 0 0 0 0 0 15 16 69.5 24 0 0 0 1 0 0 0 0 0 0 0 16 17 74.7 23 0 0 0 0 1 0 0 0 0 0 0 17 18 72.5 20 0 0 0 0 0 1 0 0 0 0 0 18 19 72.1 21 0 0 0 0 0 0 1 0 0 0 0 19 20 70.7 19 0 0 0 0 0 0 0 1 0 0 0 20 21 71.4 23 0 0 0 0 0 0 0 0 1 0 0 21 22 69.5 23 0 0 0 0 0 0 0 0 0 1 0 22 23 73.5 23 0 0 0 0 0 0 0 0 0 0 1 23 24 72.4 23 0 0 0 0 0 0 0 0 0 0 0 24 25 74.5 27 1 0 0 0 0 0 0 0 0 0 0 25 26 72.2 26 0 1 0 0 0 0 0 0 0 0 0 26 27 73.0 17 0 0 1 0 0 0 0 0 0 0 0 27 28 73.3 24 0 0 0 1 0 0 0 0 0 0 0 28 29 71.3 26 0 0 0 0 1 0 0 0 0 0 0 29 30 73.6 24 0 0 0 0 0 1 0 0 0 0 0 30 31 71.3 27 0 0 0 0 0 0 1 0 0 0 0 31 32 71.2 27 0 0 0 0 0 0 0 1 0 0 0 32 33 81.4 26 0 0 0 0 0 0 0 0 1 0 0 33 34 76.1 24 0 0 0 0 0 0 0 0 0 1 0 34 35 71.1 23 0 0 0 0 0 0 0 0 0 0 1 35 36 75.7 23 0 0 0 0 0 0 0 0 0 0 0 36 37 70.0 24 1 0 0 0 0 0 0 0 0 0 0 37 38 68.5 17 0 1 0 0 0 0 0 0 0 0 0 38 39 56.7 21 0 0 1 0 0 0 0 0 0 0 0 39 40 57.9 19 0 0 0 1 0 0 0 0 0 0 0 40 41 58.8 22 0 0 0 0 1 0 0 0 0 0 0 41 42 59.3 22 0 0 0 0 0 1 0 0 0 0 0 42 43 61.3 18 0 0 0 0 0 0 1 0 0 0 0 43 44 62.9 16 0 0 0 0 0 0 0 1 0 0 0 44 45 61.4 14 0 0 0 0 0 0 0 0 1 0 0 45 46 64.5 12 0 0 0 0 0 0 0 0 0 1 0 46 47 63.8 14 0 0 0 0 0 0 0 0 0 0 1 47 48 61.6 16 0 0 0 0 0 0 0 0 0 0 0 48 49 64.7 8 1 0 0 0 0 0 0 0 0 0 0 49 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) indcvtr M1 M2 M3 M4 73.0541 0.3754 -0.9459 -1.6441 -5.3772 -4.6551 M5 M6 M7 M8 M9 M10 -4.4952 -3.5029 -2.6295 -1.5740 1.0740 0.9663 M11 t 0.3704 -0.3169 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.50352 -1.68450 -0.03420 2.16871 7.96696 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 73.0541 3.3905 21.547 < 2e-16 *** indcvtr 0.3754 0.1350 2.781 0.00867 ** M1 -0.9459 2.6902 -0.352 0.72725 M2 -1.6441 2.8588 -0.575 0.56891 M3 -5.3772 2.8531 -1.885 0.06780 . M4 -4.6551 2.8790 -1.617 0.11487 M5 -4.4952 2.9202 -1.539 0.13271 M6 -3.5029 2.8878 -1.213 0.23325 M7 -2.6295 2.8671 -0.917 0.36535 M8 -1.5740 2.8320 -0.556 0.58188 M9 1.0740 2.8313 0.379 0.70674 M10 0.9663 2.8264 0.342 0.73449 M11 0.3704 2.8264 0.131 0.89648 t -0.3169 0.0413 -7.671 5.31e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.995 on 35 degrees of freedom Multiple R-squared: 0.6677, Adjusted R-squared: 0.5443 F-statistic: 5.41 on 13 and 35 DF, p-value: 3.210e-05 > 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.26552677 0.53105354 0.7344732 [2,] 0.16313489 0.32626978 0.8368651 [3,] 0.09358249 0.18716499 0.9064175 [4,] 0.04301171 0.08602343 0.9569883 [5,] 0.02541526 0.05083053 0.9745847 [6,] 0.02560956 0.05121912 0.9743904 [7,] 0.02135496 0.04270993 0.9786450 [8,] 0.12935279 0.25870559 0.8706472 [9,] 0.37050885 0.74101770 0.6294912 [10,] 0.47273327 0.94546653 0.5272667 [11,] 0.39226767 0.78453535 0.6077323 [12,] 0.30406249 0.60812499 0.6959375 [13,] 0.20448310 0.40896620 0.7955169 [14,] 0.12326518 0.24653037 0.8767348 [15,] 0.06869511 0.13739022 0.9313049 [16,] 0.03893552 0.07787103 0.9610645 > postscript(file="/var/www/html/rcomp/tmp/1fpte1260701321.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/2g3eb1260701321.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/39j041260701321.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/4od7h1260701321.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/53qwm1260701321.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 = 49 Frequency = 1 1 2 3 4 5 6 -4.92466938 -1.53420361 -4.25964235 3.03509482 -0.03420361 -0.48508109 7 8 9 10 11 12 1.88465608 2.49869168 0.46755136 1.79211262 1.12939325 -1.48157115 13 14 15 16 17 18 -0.97145721 -0.48099143 3.26725360 -2.83976420 2.89269234 1.14356983 19 20 21 22 23 24 -0.18844797 -1.57616735 -4.70906263 -6.18450137 -1.27178200 -1.68450137 25 26 27 28 29 30 0.17649006 -0.73304417 7.49590452 4.76257049 2.16871080 4.54414955 31 32 33 34 35 36 0.56125426 -0.27734260 7.96695583 3.84239457 0.13055269 5.41783332 37 38 39 40 41 42 0.60514098 2.74823921 -6.50351576 -4.95790110 -5.02719953 -5.20263828 43 44 45 46 47 48 -2.25746236 -0.64518173 -3.72544456 0.54999418 0.01183607 -2.25176079 49 5.11449556 > postscript(file="/var/www/html/rcomp/tmp/6t3p51260701321.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 = 49 Frequency = 1 lag(myerror, k = 1) myerror 0 -4.92466938 NA 1 -1.53420361 -4.92466938 2 -4.25964235 -1.53420361 3 3.03509482 -4.25964235 4 -0.03420361 3.03509482 5 -0.48508109 -0.03420361 6 1.88465608 -0.48508109 7 2.49869168 1.88465608 8 0.46755136 2.49869168 9 1.79211262 0.46755136 10 1.12939325 1.79211262 11 -1.48157115 1.12939325 12 -0.97145721 -1.48157115 13 -0.48099143 -0.97145721 14 3.26725360 -0.48099143 15 -2.83976420 3.26725360 16 2.89269234 -2.83976420 17 1.14356983 2.89269234 18 -0.18844797 1.14356983 19 -1.57616735 -0.18844797 20 -4.70906263 -1.57616735 21 -6.18450137 -4.70906263 22 -1.27178200 -6.18450137 23 -1.68450137 -1.27178200 24 0.17649006 -1.68450137 25 -0.73304417 0.17649006 26 7.49590452 -0.73304417 27 4.76257049 7.49590452 28 2.16871080 4.76257049 29 4.54414955 2.16871080 30 0.56125426 4.54414955 31 -0.27734260 0.56125426 32 7.96695583 -0.27734260 33 3.84239457 7.96695583 34 0.13055269 3.84239457 35 5.41783332 0.13055269 36 0.60514098 5.41783332 37 2.74823921 0.60514098 38 -6.50351576 2.74823921 39 -4.95790110 -6.50351576 40 -5.02719953 -4.95790110 41 -5.20263828 -5.02719953 42 -2.25746236 -5.20263828 43 -0.64518173 -2.25746236 44 -3.72544456 -0.64518173 45 0.54999418 -3.72544456 46 0.01183607 0.54999418 47 -2.25176079 0.01183607 48 5.11449556 -2.25176079 49 NA 5.11449556 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.53420361 -4.92466938 [2,] -4.25964235 -1.53420361 [3,] 3.03509482 -4.25964235 [4,] -0.03420361 3.03509482 [5,] -0.48508109 -0.03420361 [6,] 1.88465608 -0.48508109 [7,] 2.49869168 1.88465608 [8,] 0.46755136 2.49869168 [9,] 1.79211262 0.46755136 [10,] 1.12939325 1.79211262 [11,] -1.48157115 1.12939325 [12,] -0.97145721 -1.48157115 [13,] -0.48099143 -0.97145721 [14,] 3.26725360 -0.48099143 [15,] -2.83976420 3.26725360 [16,] 2.89269234 -2.83976420 [17,] 1.14356983 2.89269234 [18,] -0.18844797 1.14356983 [19,] -1.57616735 -0.18844797 [20,] -4.70906263 -1.57616735 [21,] -6.18450137 -4.70906263 [22,] -1.27178200 -6.18450137 [23,] -1.68450137 -1.27178200 [24,] 0.17649006 -1.68450137 [25,] -0.73304417 0.17649006 [26,] 7.49590452 -0.73304417 [27,] 4.76257049 7.49590452 [28,] 2.16871080 4.76257049 [29,] 4.54414955 2.16871080 [30,] 0.56125426 4.54414955 [31,] -0.27734260 0.56125426 [32,] 7.96695583 -0.27734260 [33,] 3.84239457 7.96695583 [34,] 0.13055269 3.84239457 [35,] 5.41783332 0.13055269 [36,] 0.60514098 5.41783332 [37,] 2.74823921 0.60514098 [38,] -6.50351576 2.74823921 [39,] -4.95790110 -6.50351576 [40,] -5.02719953 -4.95790110 [41,] -5.20263828 -5.02719953 [42,] -2.25746236 -5.20263828 [43,] -0.64518173 -2.25746236 [44,] -3.72544456 -0.64518173 [45,] 0.54999418 -3.72544456 [46,] 0.01183607 0.54999418 [47,] -2.25176079 0.01183607 [48,] 5.11449556 -2.25176079 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.53420361 -4.92466938 2 -4.25964235 -1.53420361 3 3.03509482 -4.25964235 4 -0.03420361 3.03509482 5 -0.48508109 -0.03420361 6 1.88465608 -0.48508109 7 2.49869168 1.88465608 8 0.46755136 2.49869168 9 1.79211262 0.46755136 10 1.12939325 1.79211262 11 -1.48157115 1.12939325 12 -0.97145721 -1.48157115 13 -0.48099143 -0.97145721 14 3.26725360 -0.48099143 15 -2.83976420 3.26725360 16 2.89269234 -2.83976420 17 1.14356983 2.89269234 18 -0.18844797 1.14356983 19 -1.57616735 -0.18844797 20 -4.70906263 -1.57616735 21 -6.18450137 -4.70906263 22 -1.27178200 -6.18450137 23 -1.68450137 -1.27178200 24 0.17649006 -1.68450137 25 -0.73304417 0.17649006 26 7.49590452 -0.73304417 27 4.76257049 7.49590452 28 2.16871080 4.76257049 29 4.54414955 2.16871080 30 0.56125426 4.54414955 31 -0.27734260 0.56125426 32 7.96695583 -0.27734260 33 3.84239457 7.96695583 34 0.13055269 3.84239457 35 5.41783332 0.13055269 36 0.60514098 5.41783332 37 2.74823921 0.60514098 38 -6.50351576 2.74823921 39 -4.95790110 -6.50351576 40 -5.02719953 -4.95790110 41 -5.20263828 -5.02719953 42 -2.25746236 -5.20263828 43 -0.64518173 -2.25746236 44 -3.72544456 -0.64518173 45 0.54999418 -3.72544456 46 0.01183607 0.54999418 47 -2.25176079 0.01183607 48 5.11449556 -2.25176079 > 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/7sqrn1260701321.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/8nrep1260701321.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/9z4391260701321.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/10ixgc1260701321.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/119wcb1260701321.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/126qdf1260701321.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/13pyef1260701321.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/149kgk1260701321.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/1599iv1260701321.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/16rnkw1260701321.tab") + } > > try(system("convert tmp/1fpte1260701321.ps tmp/1fpte1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/2g3eb1260701321.ps tmp/2g3eb1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/39j041260701321.ps tmp/39j041260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/4od7h1260701321.ps tmp/4od7h1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/53qwm1260701321.ps tmp/53qwm1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/6t3p51260701321.ps tmp/6t3p51260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/7sqrn1260701321.ps tmp/7sqrn1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/8nrep1260701321.ps tmp/8nrep1260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/9z4391260701321.ps tmp/9z4391260701321.png",intern=TRUE)) character(0) > try(system("convert tmp/10ixgc1260701321.ps tmp/10ixgc1260701321.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.202 1.527 3.822