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(101.09,0,102.71,0,102.11,0,101.68,0,101.7,0,101.53,0,101.76,0,101.15,0,100.92,0,100.73,0,100.55,0,102.15,0,100.79,0,99.93,0,100.03,0,100.25,0,99.6,0,100.16,0,100.49,0,99.72,0,100.14,0,98.48,0,100.38,0,101.45,0,98.42,0,98.6,0,100.06,0,98.62,0,100.84,0,100.02,0,97.95,0,98.32,0,98.27,0,97.22,0,99.28,0,100.38,0,99.02,0,100.32,0,99.81,0,100.6,0,101.19,0,100.47,0,101.77,0,102.32,0,102.39,0,101.16,0,100.63,0,101.48,0,101.44,1,100.09,1,100.7,1,100.78,1,99.81,1,98.45,1,98.49,1,97.48,1,97.91,1,96.94,1,98.53,1,96.82,1,95.76,1),dim=c(2,61),dimnames=list(c('Y','X'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Y','X'),1:61)) > 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 Y X 1 101.09 0 2 102.71 0 3 102.11 0 4 101.68 0 5 101.70 0 6 101.53 0 7 101.76 0 8 101.15 0 9 100.92 0 10 100.73 0 11 100.55 0 12 102.15 0 13 100.79 0 14 99.93 0 15 100.03 0 16 100.25 0 17 99.60 0 18 100.16 0 19 100.49 0 20 99.72 0 21 100.14 0 22 98.48 0 23 100.38 0 24 101.45 0 25 98.42 0 26 98.60 0 27 100.06 0 28 98.62 0 29 100.84 0 30 100.02 0 31 97.95 0 32 98.32 0 33 98.27 0 34 97.22 0 35 99.28 0 36 100.38 0 37 99.02 0 38 100.32 0 39 99.81 0 40 100.60 0 41 101.19 0 42 100.47 0 43 101.77 0 44 102.32 0 45 102.39 0 46 101.16 0 47 100.63 0 48 101.48 0 49 101.44 1 50 100.09 1 51 100.70 1 52 100.78 1 53 99.81 1 54 98.45 1 55 98.49 1 56 97.48 1 57 97.91 1 58 96.94 1 59 98.53 1 60 96.82 1 61 95.76 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X 100.388 -1.681 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.168333 -0.788333 -0.008333 1.091667 2.732308 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 100.3883 0.2002 501.337 < 2e-16 *** X -1.6806 0.4338 -3.875 0.000270 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.387 on 59 degrees of freedom Multiple R-squared: 0.2028, Adjusted R-squared: 0.1893 F-statistic: 15.01 on 1 and 59 DF, p-value: 0.0002705 > 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.144908018 0.28981604 0.8550920 [2,] 0.065817172 0.13163434 0.9341828 [3,] 0.026004185 0.05200837 0.9739958 [4,] 0.016289305 0.03257861 0.9837107 [5,] 0.013018769 0.02603754 0.9869812 [6,] 0.011923516 0.02384703 0.9880765 [7,] 0.011949168 0.02389834 0.9880508 [8,] 0.009448533 0.01889707 0.9905515 [9,] 0.006565247 0.01313049 0.9934348 [10,] 0.014408881 0.02881776 0.9855911 [11,] 0.018008631 0.03601726 0.9819914 [12,] 0.015385735 0.03077147 0.9846143 [13,] 0.023764342 0.04752868 0.9762357 [14,] 0.018623605 0.03724721 0.9813764 [15,] 0.011892770 0.02378554 0.9881072 [16,] 0.012302434 0.02460487 0.9876976 [17,] 0.008690870 0.01738174 0.9913091 [18,] 0.032402801 0.06480560 0.9675972 [19,] 0.021015711 0.04203142 0.9789843 [20,] 0.016351212 0.03270242 0.9836488 [21,] 0.041733596 0.08346719 0.9582664 [22,] 0.066443551 0.13288710 0.9335564 [23,] 0.047058328 0.09411666 0.9529417 [24,] 0.065810245 0.13162049 0.9341898 [25,] 0.046541078 0.09308216 0.9534589 [26,] 0.032009126 0.06401825 0.9679909 [27,] 0.075313470 0.15062694 0.9246865 [28,] 0.112132837 0.22426567 0.8878672 [29,] 0.164875802 0.32975160 0.8351242 [30,] 0.434420923 0.86884185 0.5655791 [31,] 0.424575308 0.84915062 0.5754247 [32,] 0.357103478 0.71420696 0.6428965 [33,] 0.391972221 0.78394444 0.6080278 [34,] 0.334263184 0.66852637 0.6657368 [35,] 0.311876051 0.62375210 0.6881239 [36,] 0.259953658 0.51990732 0.7400463 [37,] 0.211763628 0.42352726 0.7882364 [38,] 0.176954339 0.35390868 0.8230457 [39,] 0.149218059 0.29843612 0.8507819 [40,] 0.145809260 0.29161852 0.8541907 [41,] 0.148915052 0.29783010 0.8510849 [42,] 0.108113974 0.21622795 0.8918860 [43,] 0.076101429 0.15220286 0.9238986 [44,] 0.052649107 0.10529821 0.9473509 [45,] 0.100649136 0.20129827 0.8993509 [46,] 0.102894367 0.20578873 0.8971056 [47,] 0.172007660 0.34401532 0.8279923 [48,] 0.409841616 0.81968323 0.5901584 [49,] 0.615791615 0.76841677 0.3842084 [50,] 0.587543937 0.82491213 0.4124561 [51,] 0.580779861 0.83844028 0.4192201 [52,] 0.443159490 0.88631898 0.5568405 > postscript(file="/var/www/html/rcomp/tmp/190di1261237463.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/277we1261237463.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/38a811261237463.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/4199b1261237463.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/5rdr01261237463.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 = 61 Frequency = 1 1 2 3 4 5 6 0.701666667 2.321666667 1.721666667 1.291666667 1.311666667 1.141666667 7 8 9 10 11 12 1.371666667 0.761666667 0.531666667 0.341666667 0.161666667 1.761666667 13 14 15 16 17 18 0.401666667 -0.458333333 -0.358333333 -0.138333333 -0.788333333 -0.228333333 19 20 21 22 23 24 0.101666667 -0.668333333 -0.248333333 -1.908333333 -0.008333333 1.061666667 25 26 27 28 29 30 -1.968333333 -1.788333333 -0.328333333 -1.768333333 0.451666667 -0.368333333 31 32 33 34 35 36 -2.438333333 -2.068333333 -2.118333333 -3.168333333 -1.108333333 -0.008333333 37 38 39 40 41 42 -1.368333333 -0.068333333 -0.578333333 0.211666667 0.801666667 0.081666667 43 44 45 46 47 48 1.381666667 1.931666667 2.001666667 0.771666667 0.241666667 1.091666667 49 50 51 52 53 54 2.732307692 1.382307692 1.992307692 2.072307692 1.102307692 -0.257692308 55 56 57 58 59 60 -0.217692308 -1.227692308 -0.797692308 -1.767692308 -0.177692308 -1.887692308 61 -2.947692308 > postscript(file="/var/www/html/rcomp/tmp/6hljn1261237463.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 0.701666667 NA 1 2.321666667 0.701666667 2 1.721666667 2.321666667 3 1.291666667 1.721666667 4 1.311666667 1.291666667 5 1.141666667 1.311666667 6 1.371666667 1.141666667 7 0.761666667 1.371666667 8 0.531666667 0.761666667 9 0.341666667 0.531666667 10 0.161666667 0.341666667 11 1.761666667 0.161666667 12 0.401666667 1.761666667 13 -0.458333333 0.401666667 14 -0.358333333 -0.458333333 15 -0.138333333 -0.358333333 16 -0.788333333 -0.138333333 17 -0.228333333 -0.788333333 18 0.101666667 -0.228333333 19 -0.668333333 0.101666667 20 -0.248333333 -0.668333333 21 -1.908333333 -0.248333333 22 -0.008333333 -1.908333333 23 1.061666667 -0.008333333 24 -1.968333333 1.061666667 25 -1.788333333 -1.968333333 26 -0.328333333 -1.788333333 27 -1.768333333 -0.328333333 28 0.451666667 -1.768333333 29 -0.368333333 0.451666667 30 -2.438333333 -0.368333333 31 -2.068333333 -2.438333333 32 -2.118333333 -2.068333333 33 -3.168333333 -2.118333333 34 -1.108333333 -3.168333333 35 -0.008333333 -1.108333333 36 -1.368333333 -0.008333333 37 -0.068333333 -1.368333333 38 -0.578333333 -0.068333333 39 0.211666667 -0.578333333 40 0.801666667 0.211666667 41 0.081666667 0.801666667 42 1.381666667 0.081666667 43 1.931666667 1.381666667 44 2.001666667 1.931666667 45 0.771666667 2.001666667 46 0.241666667 0.771666667 47 1.091666667 0.241666667 48 2.732307692 1.091666667 49 1.382307692 2.732307692 50 1.992307692 1.382307692 51 2.072307692 1.992307692 52 1.102307692 2.072307692 53 -0.257692308 1.102307692 54 -0.217692308 -0.257692308 55 -1.227692308 -0.217692308 56 -0.797692308 -1.227692308 57 -1.767692308 -0.797692308 58 -0.177692308 -1.767692308 59 -1.887692308 -0.177692308 60 -2.947692308 -1.887692308 61 NA -2.947692308 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.321666667 0.701666667 [2,] 1.721666667 2.321666667 [3,] 1.291666667 1.721666667 [4,] 1.311666667 1.291666667 [5,] 1.141666667 1.311666667 [6,] 1.371666667 1.141666667 [7,] 0.761666667 1.371666667 [8,] 0.531666667 0.761666667 [9,] 0.341666667 0.531666667 [10,] 0.161666667 0.341666667 [11,] 1.761666667 0.161666667 [12,] 0.401666667 1.761666667 [13,] -0.458333333 0.401666667 [14,] -0.358333333 -0.458333333 [15,] -0.138333333 -0.358333333 [16,] -0.788333333 -0.138333333 [17,] -0.228333333 -0.788333333 [18,] 0.101666667 -0.228333333 [19,] -0.668333333 0.101666667 [20,] -0.248333333 -0.668333333 [21,] -1.908333333 -0.248333333 [22,] -0.008333333 -1.908333333 [23,] 1.061666667 -0.008333333 [24,] -1.968333333 1.061666667 [25,] -1.788333333 -1.968333333 [26,] -0.328333333 -1.788333333 [27,] -1.768333333 -0.328333333 [28,] 0.451666667 -1.768333333 [29,] -0.368333333 0.451666667 [30,] -2.438333333 -0.368333333 [31,] -2.068333333 -2.438333333 [32,] -2.118333333 -2.068333333 [33,] -3.168333333 -2.118333333 [34,] -1.108333333 -3.168333333 [35,] -0.008333333 -1.108333333 [36,] -1.368333333 -0.008333333 [37,] -0.068333333 -1.368333333 [38,] -0.578333333 -0.068333333 [39,] 0.211666667 -0.578333333 [40,] 0.801666667 0.211666667 [41,] 0.081666667 0.801666667 [42,] 1.381666667 0.081666667 [43,] 1.931666667 1.381666667 [44,] 2.001666667 1.931666667 [45,] 0.771666667 2.001666667 [46,] 0.241666667 0.771666667 [47,] 1.091666667 0.241666667 [48,] 2.732307692 1.091666667 [49,] 1.382307692 2.732307692 [50,] 1.992307692 1.382307692 [51,] 2.072307692 1.992307692 [52,] 1.102307692 2.072307692 [53,] -0.257692308 1.102307692 [54,] -0.217692308 -0.257692308 [55,] -1.227692308 -0.217692308 [56,] -0.797692308 -1.227692308 [57,] -1.767692308 -0.797692308 [58,] -0.177692308 -1.767692308 [59,] -1.887692308 -0.177692308 [60,] -2.947692308 -1.887692308 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.321666667 0.701666667 2 1.721666667 2.321666667 3 1.291666667 1.721666667 4 1.311666667 1.291666667 5 1.141666667 1.311666667 6 1.371666667 1.141666667 7 0.761666667 1.371666667 8 0.531666667 0.761666667 9 0.341666667 0.531666667 10 0.161666667 0.341666667 11 1.761666667 0.161666667 12 0.401666667 1.761666667 13 -0.458333333 0.401666667 14 -0.358333333 -0.458333333 15 -0.138333333 -0.358333333 16 -0.788333333 -0.138333333 17 -0.228333333 -0.788333333 18 0.101666667 -0.228333333 19 -0.668333333 0.101666667 20 -0.248333333 -0.668333333 21 -1.908333333 -0.248333333 22 -0.008333333 -1.908333333 23 1.061666667 -0.008333333 24 -1.968333333 1.061666667 25 -1.788333333 -1.968333333 26 -0.328333333 -1.788333333 27 -1.768333333 -0.328333333 28 0.451666667 -1.768333333 29 -0.368333333 0.451666667 30 -2.438333333 -0.368333333 31 -2.068333333 -2.438333333 32 -2.118333333 -2.068333333 33 -3.168333333 -2.118333333 34 -1.108333333 -3.168333333 35 -0.008333333 -1.108333333 36 -1.368333333 -0.008333333 37 -0.068333333 -1.368333333 38 -0.578333333 -0.068333333 39 0.211666667 -0.578333333 40 0.801666667 0.211666667 41 0.081666667 0.801666667 42 1.381666667 0.081666667 43 1.931666667 1.381666667 44 2.001666667 1.931666667 45 0.771666667 2.001666667 46 0.241666667 0.771666667 47 1.091666667 0.241666667 48 2.732307692 1.091666667 49 1.382307692 2.732307692 50 1.992307692 1.382307692 51 2.072307692 1.992307692 52 1.102307692 2.072307692 53 -0.257692308 1.102307692 54 -0.217692308 -0.257692308 55 -1.227692308 -0.217692308 56 -0.797692308 -1.227692308 57 -1.767692308 -0.797692308 58 -0.177692308 -1.767692308 59 -1.887692308 -0.177692308 60 -2.947692308 -1.887692308 > 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/7okmn1261237463.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/8pfsd1261237463.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/9256z1261237463.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/105v0m1261237463.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/11m3u61261237463.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/12kcso1261237463.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/13suoi1261237463.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/14cyuk1261237463.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/15qyea1261237463.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/16b04p1261237463.tab") + } > > try(system("convert tmp/190di1261237463.ps tmp/190di1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/277we1261237463.ps tmp/277we1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/38a811261237463.ps tmp/38a811261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/4199b1261237463.ps tmp/4199b1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/5rdr01261237463.ps tmp/5rdr01261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/6hljn1261237463.ps tmp/6hljn1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/7okmn1261237463.ps tmp/7okmn1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/8pfsd1261237463.ps tmp/8pfsd1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/9256z1261237463.ps tmp/9256z1261237463.png",intern=TRUE)) character(0) > try(system("convert tmp/105v0m1261237463.ps tmp/105v0m1261237463.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.551 1.621 10.310