R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(1,8,1,14,4,2,8,3,82,1,3,8,2,14,3,4,8,1,16,5,5,8,5,140,7,6,8,8,173,2,7,8,3,9,8,8,8,8,13,6,1,12,12,17,4,2,12,3,16,9,3,12,8,21,7,4,12,3,14,2,5,12,3,15,12,6,12,3,10,8,7,12,3,14,1,8,12,1,16,6,9,12,2,14,10,10,12,20,17,3,11,12,2,10,5,12,12,1,23,11,1,9,1,21,2,2,9,6,14,4,3,9,8,14,7,4,9,5,14,11,5,9,1,16,5,6,9,7,14,1,7,9,7,14,9,8,9,5,7,3,9,9,8,17,10,1,14,2,14,3,2,14,5,21,4,3,14,2,24,7,4,14,5,7,6,5,14,1,30,13,6,14,2,93,16,7,14,6,14,9,8,14,3,14,1,9,14,6,107,10,10,14,6,231,5,11,14,1,385,2,12,14,2,14,11,13,14,10,29,14,14,14,1,16,15,1,13,2,7,10,2,13,1,21,3,3,13,1,14,2,4,13,1,17,13,5,13,6,14,4,6,13,4,21,1),dim=c(5,49),dimnames=list(c('position','starters','last','since','number'),1:49)) > y <- array(NA,dim=c(5,49),dimnames=list(c('position','starters','last','since','number'),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 = '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 position starters last since number 1 1 8 1 14 4 2 2 8 3 82 1 3 3 8 2 14 3 4 4 8 1 16 5 5 5 8 5 140 7 6 6 8 8 173 2 7 7 8 3 9 8 8 8 8 8 13 6 9 1 12 12 17 4 10 2 12 3 16 9 11 3 12 8 21 7 12 4 12 3 14 2 13 5 12 3 15 12 14 6 12 3 10 8 15 7 12 3 14 1 16 8 12 1 16 6 17 9 12 2 14 10 18 10 12 20 17 3 19 11 12 2 10 5 20 12 12 1 23 11 21 1 9 1 21 2 22 2 9 6 14 4 23 3 9 8 14 7 24 4 9 5 14 11 25 5 9 1 16 5 26 6 9 7 14 1 27 7 9 7 14 9 28 8 9 5 7 3 29 9 9 8 17 10 30 1 14 2 14 3 31 2 14 5 21 4 32 3 14 2 24 7 33 4 14 5 7 6 34 5 14 1 30 13 35 6 14 2 93 16 36 7 14 6 14 9 37 8 14 3 14 1 38 9 14 6 107 10 39 10 14 6 231 5 40 11 14 1 385 2 41 12 14 2 14 11 42 13 14 10 29 14 43 14 14 1 16 15 44 1 13 2 7 10 45 2 13 1 21 3 46 3 13 1 14 2 47 4 13 1 17 13 48 5 13 6 14 4 49 6 13 4 21 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) starters last since number 0.06947 0.21935 0.18457 0.01461 0.29378 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.3401 -2.4026 -0.0964 2.2936 6.3141 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.069465 2.443209 0.028 0.9774 starters 0.219355 0.207818 1.056 0.2970 last 0.184571 0.127766 1.445 0.1557 since 0.014612 0.006915 2.113 0.0403 * number 0.293779 0.116620 2.519 0.0155 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.166 on 44 degrees of freedom Multiple R-squared: 0.249, Adjusted R-squared: 0.1807 F-statistic: 3.647 on 4 and 44 DF, p-value: 0.0119 > 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.08650524 0.17301048 0.9134948 [2,] 0.03244194 0.06488388 0.9675581 [3,] 0.03866910 0.07733820 0.9613309 [4,] 0.01864623 0.03729245 0.9813538 [5,] 0.14819422 0.29638844 0.8518058 [6,] 0.09391963 0.18783925 0.9060804 [7,] 0.08993113 0.17986227 0.9100689 [8,] 0.18443673 0.36887347 0.8155633 [9,] 0.20993444 0.41986888 0.7900656 [10,] 0.21517820 0.43035640 0.7848218 [11,] 0.26660382 0.53320765 0.7333962 [12,] 0.48971541 0.97943083 0.5102846 [13,] 0.66216393 0.67567215 0.3378361 [14,] 0.61212687 0.77574626 0.3878731 [15,] 0.57816601 0.84366799 0.4218340 [16,] 0.57439732 0.85120537 0.4256027 [17,] 0.55261469 0.89477062 0.4473853 [18,] 0.46661585 0.93323169 0.5333842 [19,] 0.40248279 0.80496558 0.5975172 [20,] 0.33680496 0.67360991 0.6631950 [21,] 0.34456825 0.68913650 0.6554317 [22,] 0.33018422 0.66036844 0.6698158 [23,] 0.37616313 0.75232625 0.6238369 [24,] 0.45521415 0.91042830 0.5447858 [25,] 0.49595389 0.99190778 0.5040461 [26,] 0.57689254 0.84621491 0.4231075 [27,] 0.61972003 0.76055993 0.3802800 [28,] 0.73618786 0.52762428 0.2638121 [29,] 0.79910949 0.40178102 0.2008905 [30,] 0.84160127 0.31679747 0.1583987 [31,] 0.87634304 0.24731393 0.1236570 [32,] 0.85825440 0.28349121 0.1417456 [33,] 0.76963444 0.46073112 0.2303656 [34,] 0.65729709 0.68540582 0.3427029 > postscript(file="/var/wessaorg/rcomp/tmp/1l3dt1322053572.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/wessaorg/rcomp/tmp/2nmyj1322053572.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/wessaorg/rcomp/tmp/30ylq1322053572.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/wessaorg/rcomp/tmp/4iag11322053572.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/wessaorg/rcomp/tmp/5bdnr1322053572.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 = 49 Frequency = 1 1 2 3 4 5 6 -2.38855138 -1.86994680 -0.27934389 0.28844647 -1.84923658 -0.41623930 7 8 9 10 11 12 2.14024802 2.74650223 -5.34009044 -4.13323050 -3.54158790 -0.04755472 13 14 15 16 17 18 -1.99995570 0.24821809 3.24622422 3.11724921 2.78678523 2.47711692 19 20 21 22 23 24 6.31412635 5.54607327 -2.12262934 -2.53076319 -2.78124290 -2.40264431 25 26 27 28 29 30 1.06909189 2.16600217 0.81577067 4.04986845 2.29358546 -3.59547137 31 32 33 34 35 36 -3.54524590 -2.91670320 -1.92824127 -2.58247502 -3.56891459 -0.09643078 37 38 39 40 41 42 3.80751506 0.25091074 0.90796603 1.46197245 5.05429713 3.47721462 43 44 45 46 47 48 6.03452961 -5.33028809 -2.29382660 -0.89776640 -3.17316954 -0.40818152 49 1.74001694 > postscript(file="/var/wessaorg/rcomp/tmp/633yl1322053572.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 = 49 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.38855138 NA 1 -1.86994680 -2.38855138 2 -0.27934389 -1.86994680 3 0.28844647 -0.27934389 4 -1.84923658 0.28844647 5 -0.41623930 -1.84923658 6 2.14024802 -0.41623930 7 2.74650223 2.14024802 8 -5.34009044 2.74650223 9 -4.13323050 -5.34009044 10 -3.54158790 -4.13323050 11 -0.04755472 -3.54158790 12 -1.99995570 -0.04755472 13 0.24821809 -1.99995570 14 3.24622422 0.24821809 15 3.11724921 3.24622422 16 2.78678523 3.11724921 17 2.47711692 2.78678523 18 6.31412635 2.47711692 19 5.54607327 6.31412635 20 -2.12262934 5.54607327 21 -2.53076319 -2.12262934 22 -2.78124290 -2.53076319 23 -2.40264431 -2.78124290 24 1.06909189 -2.40264431 25 2.16600217 1.06909189 26 0.81577067 2.16600217 27 4.04986845 0.81577067 28 2.29358546 4.04986845 29 -3.59547137 2.29358546 30 -3.54524590 -3.59547137 31 -2.91670320 -3.54524590 32 -1.92824127 -2.91670320 33 -2.58247502 -1.92824127 34 -3.56891459 -2.58247502 35 -0.09643078 -3.56891459 36 3.80751506 -0.09643078 37 0.25091074 3.80751506 38 0.90796603 0.25091074 39 1.46197245 0.90796603 40 5.05429713 1.46197245 41 3.47721462 5.05429713 42 6.03452961 3.47721462 43 -5.33028809 6.03452961 44 -2.29382660 -5.33028809 45 -0.89776640 -2.29382660 46 -3.17316954 -0.89776640 47 -0.40818152 -3.17316954 48 1.74001694 -0.40818152 49 NA 1.74001694 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.86994680 -2.38855138 [2,] -0.27934389 -1.86994680 [3,] 0.28844647 -0.27934389 [4,] -1.84923658 0.28844647 [5,] -0.41623930 -1.84923658 [6,] 2.14024802 -0.41623930 [7,] 2.74650223 2.14024802 [8,] -5.34009044 2.74650223 [9,] -4.13323050 -5.34009044 [10,] -3.54158790 -4.13323050 [11,] -0.04755472 -3.54158790 [12,] -1.99995570 -0.04755472 [13,] 0.24821809 -1.99995570 [14,] 3.24622422 0.24821809 [15,] 3.11724921 3.24622422 [16,] 2.78678523 3.11724921 [17,] 2.47711692 2.78678523 [18,] 6.31412635 2.47711692 [19,] 5.54607327 6.31412635 [20,] -2.12262934 5.54607327 [21,] -2.53076319 -2.12262934 [22,] -2.78124290 -2.53076319 [23,] -2.40264431 -2.78124290 [24,] 1.06909189 -2.40264431 [25,] 2.16600217 1.06909189 [26,] 0.81577067 2.16600217 [27,] 4.04986845 0.81577067 [28,] 2.29358546 4.04986845 [29,] -3.59547137 2.29358546 [30,] -3.54524590 -3.59547137 [31,] -2.91670320 -3.54524590 [32,] -1.92824127 -2.91670320 [33,] -2.58247502 -1.92824127 [34,] -3.56891459 -2.58247502 [35,] -0.09643078 -3.56891459 [36,] 3.80751506 -0.09643078 [37,] 0.25091074 3.80751506 [38,] 0.90796603 0.25091074 [39,] 1.46197245 0.90796603 [40,] 5.05429713 1.46197245 [41,] 3.47721462 5.05429713 [42,] 6.03452961 3.47721462 [43,] -5.33028809 6.03452961 [44,] -2.29382660 -5.33028809 [45,] -0.89776640 -2.29382660 [46,] -3.17316954 -0.89776640 [47,] -0.40818152 -3.17316954 [48,] 1.74001694 -0.40818152 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.86994680 -2.38855138 2 -0.27934389 -1.86994680 3 0.28844647 -0.27934389 4 -1.84923658 0.28844647 5 -0.41623930 -1.84923658 6 2.14024802 -0.41623930 7 2.74650223 2.14024802 8 -5.34009044 2.74650223 9 -4.13323050 -5.34009044 10 -3.54158790 -4.13323050 11 -0.04755472 -3.54158790 12 -1.99995570 -0.04755472 13 0.24821809 -1.99995570 14 3.24622422 0.24821809 15 3.11724921 3.24622422 16 2.78678523 3.11724921 17 2.47711692 2.78678523 18 6.31412635 2.47711692 19 5.54607327 6.31412635 20 -2.12262934 5.54607327 21 -2.53076319 -2.12262934 22 -2.78124290 -2.53076319 23 -2.40264431 -2.78124290 24 1.06909189 -2.40264431 25 2.16600217 1.06909189 26 0.81577067 2.16600217 27 4.04986845 0.81577067 28 2.29358546 4.04986845 29 -3.59547137 2.29358546 30 -3.54524590 -3.59547137 31 -2.91670320 -3.54524590 32 -1.92824127 -2.91670320 33 -2.58247502 -1.92824127 34 -3.56891459 -2.58247502 35 -0.09643078 -3.56891459 36 3.80751506 -0.09643078 37 0.25091074 3.80751506 38 0.90796603 0.25091074 39 1.46197245 0.90796603 40 5.05429713 1.46197245 41 3.47721462 5.05429713 42 6.03452961 3.47721462 43 -5.33028809 6.03452961 44 -2.29382660 -5.33028809 45 -0.89776640 -2.29382660 46 -3.17316954 -0.89776640 47 -0.40818152 -3.17316954 48 1.74001694 -0.40818152 > 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/wessaorg/rcomp/tmp/7xu9y1322053572.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/wessaorg/rcomp/tmp/8a8vv1322053572.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/wessaorg/rcomp/tmp/9b9pz1322053572.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/wessaorg/rcomp/tmp/10vojv1322053572.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11m4m51322053572.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/wessaorg/rcomp/tmp/12e37q1322053572.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/wessaorg/rcomp/tmp/13hvik1322053572.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/wessaorg/rcomp/tmp/14yg6v1322053572.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/wessaorg/rcomp/tmp/15bgul1322053572.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/wessaorg/rcomp/tmp/16oqh01322053572.tab") + } > > try(system("convert tmp/1l3dt1322053572.ps tmp/1l3dt1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/2nmyj1322053572.ps tmp/2nmyj1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/30ylq1322053572.ps tmp/30ylq1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/4iag11322053572.ps tmp/4iag11322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/5bdnr1322053572.ps tmp/5bdnr1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/633yl1322053572.ps tmp/633yl1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/7xu9y1322053572.ps tmp/7xu9y1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/8a8vv1322053572.ps tmp/8a8vv1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/9b9pz1322053572.ps tmp/9b9pz1322053572.png",intern=TRUE)) character(0) > try(system("convert tmp/10vojv1322053572.ps tmp/10vojv1322053572.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.134 0.612 3.847