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(96.96,89.1,93.11,83.3,95.62,97.7,98.30,100.9,96.38,108.3,100.82,113.2,99.06,105,94.03,104,102.07,109.8,99.31,98.6,98.64,93.5,101.82,98.2,99.14,88,97.63,85.3,100.06,96.8,101.32,98.8,101.49,110.3,105.43,111.6,105.09,111.2,99.48,106.9,108.53,117.6,104.34,97,106.10,97.3,107.35,98.4,103.00,87.6,104.50,87.4,105.17,94.7,104.84,101.5,106.18,110.4,108.86,108.4,107.77,109.7,102.74,105.2,112.63,111.1,106.26,96.2,108.86,97.3,111.38,98.9,106.85,91.7,107.86,90.9,107.94,98.8,111.38,111.5,111.29,119,113.72,115.3,111.88,116.3,109.87,113.6,113.72,115.1,111.71,109.7,114.81,97.6,112.05,100.8,111.54,94,110.87,87.2,110.87,102.9,115.48,111.3,111.63,106.6,116.24,108.9,113.56,108.3,106.01,100.5,110.45,104,107.77,89.9,108.61,86.8,108.19,91.2),dim=c(2,60),dimnames=list(c('Bestc','Industr'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Bestc','Industr'),1:60)) > 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 Bestc Industr 1 96.96 89.1 2 93.11 83.3 3 95.62 97.7 4 98.30 100.9 5 96.38 108.3 6 100.82 113.2 7 99.06 105.0 8 94.03 104.0 9 102.07 109.8 10 99.31 98.6 11 98.64 93.5 12 101.82 98.2 13 99.14 88.0 14 97.63 85.3 15 100.06 96.8 16 101.32 98.8 17 101.49 110.3 18 105.43 111.6 19 105.09 111.2 20 99.48 106.9 21 108.53 117.6 22 104.34 97.0 23 106.10 97.3 24 107.35 98.4 25 103.00 87.6 26 104.50 87.4 27 105.17 94.7 28 104.84 101.5 29 106.18 110.4 30 108.86 108.4 31 107.77 109.7 32 102.74 105.2 33 112.63 111.1 34 106.26 96.2 35 108.86 97.3 36 111.38 98.9 37 106.85 91.7 38 107.86 90.9 39 107.94 98.8 40 111.38 111.5 41 111.29 119.0 42 113.72 115.3 43 111.88 116.3 44 109.87 113.6 45 113.72 115.1 46 111.71 109.7 47 114.81 97.6 48 112.05 100.8 49 111.54 94.0 50 110.87 87.2 51 110.87 102.9 52 115.48 111.3 53 111.63 106.6 54 116.24 108.9 55 113.56 108.3 56 106.01 100.5 57 110.45 104.0 58 107.77 89.9 59 108.61 86.8 60 108.19 91.2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Industr 82.895 0.227 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -12.472 -4.182 1.154 4.481 9.761 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 82.89471 7.80596 10.619 3.19e-15 *** Industr 0.22699 0.07645 2.969 0.00434 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.471 on 58 degrees of freedom Multiple R-squared: 0.1319, Adjusted R-squared: 0.117 F-statistic: 8.815 on 1 and 58 DF, p-value: 0.004337 > 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.05700432 0.114008650 0.9429956752 [2,] 0.03266338 0.065326759 0.9673366206 [3,] 0.01352109 0.027042180 0.9864789098 [4,] 0.03665135 0.073302695 0.9633486524 [5,] 0.04475523 0.089510453 0.9552447736 [6,] 0.03822084 0.076441682 0.9617791592 [7,] 0.03408130 0.068162591 0.9659187047 [8,] 0.05861370 0.117227409 0.9413862956 [9,] 0.05789127 0.115782550 0.9421087251 [10,] 0.04932736 0.098654728 0.9506726360 [11,] 0.04998290 0.099965801 0.9500170994 [12,] 0.06066227 0.121324542 0.9393377291 [13,] 0.06929593 0.138591853 0.9307040737 [14,] 0.12525783 0.250515662 0.8747421688 [15,] 0.16531413 0.330628251 0.8346858744 [16,] 0.29504650 0.590093000 0.7049535001 [17,] 0.42553041 0.851060826 0.5744695872 [18,] 0.56897333 0.862053330 0.4310266650 [19,] 0.72374976 0.552500472 0.2762502361 [20,] 0.83502459 0.329950814 0.1649754070 [21,] 0.87301303 0.253973935 0.1269869674 [22,] 0.90294448 0.194111034 0.0970555170 [23,] 0.92121662 0.157566760 0.0787833799 [24,] 0.94153338 0.116933238 0.0584666190 [25,] 0.95931619 0.081367614 0.0406838068 [26,] 0.96730308 0.065393837 0.0326969185 [27,] 0.97338926 0.053221475 0.0266107373 [28,] 0.99716093 0.005678141 0.0028390704 [29,] 0.99824634 0.003507316 0.0017536580 [30,] 0.99889567 0.002208666 0.0011043332 [31,] 0.99899449 0.002011012 0.0010055059 [32,] 0.99926092 0.001478158 0.0007390789 [33,] 0.99927689 0.001446214 0.0007231068 [34,] 0.99915169 0.001696611 0.0008483054 [35,] 0.99914298 0.001714038 0.0008570191 [36,] 0.99876975 0.002460492 0.0012302460 [37,] 0.99841050 0.003178996 0.0015894979 [38,] 0.99761097 0.004778061 0.0023890304 [39,] 0.99625769 0.007484615 0.0037423074 [40,] 0.99685295 0.006294097 0.0031470483 [41,] 0.99457073 0.010858536 0.0054292680 [42,] 0.99166722 0.016665565 0.0083327825 [43,] 0.99647590 0.007048201 0.0035241007 [44,] 0.99357026 0.012859472 0.0064297361 [45,] 0.99085941 0.018281174 0.0091405868 [46,] 0.99306776 0.013864471 0.0069322354 [47,] 0.98406880 0.031862408 0.0159312038 [48,] 0.97140025 0.057199490 0.0285997450 [49,] 0.93717612 0.125647759 0.0628238797 [50,] 0.94959729 0.100805428 0.0504027140 [51,] 0.95488927 0.090221455 0.0451107273 > postscript(file="/var/www/html/rcomp/tmp/1459p1258648324.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/2c77l1258648324.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/3jxqd1258648324.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/4wuwe1258648324.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/5u4yt1258648324.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 = 60 Frequency = 1 1 2 3 4 5 6 -6.15950072 -8.69296020 -9.45161253 -7.49797972 -11.09770383 -7.76995359 7 8 9 10 11 12 -7.66863767 -12.47164793 -5.74818845 -5.96590330 -5.47825560 -3.36510740 13 14 15 16 17 18 -3.72981200 -4.62693969 -4.80732176 -4.00130125 -6.44168332 -2.79676999 19 20 21 22 23 24 -3.04597409 -7.67991819 -1.05870847 -0.57271971 1.11918337 2.11949465 25 26 27 28 29 30 0.22098390 1.76638185 0.77935671 -1.09417356 -1.77438230 1.35959719 31 32 33 34 35 36 -0.02548948 -4.03403562 4.51672488 1.52887209 3.87918337 6.03599977 37 38 39 40 41 42 3.14032594 4.33191774 2.61869875 3.17592898 1.38350589 4.65336795 43 44 45 46 47 48 2.58637820 1.18925052 4.69876590 3.91451052 9.76108644 6.27471926 49 50 51 52 53 54 7.30824953 8.18177980 4.61804079 7.32132693 4.53817873 8.62610232 55 56 57 58 59 60 6.08229617 0.30281618 3.94835207 4.46890748 6.01257569 4.59382081 > postscript(file="/var/www/html/rcomp/tmp/6ib7b1258648324.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -6.15950072 NA 1 -8.69296020 -6.15950072 2 -9.45161253 -8.69296020 3 -7.49797972 -9.45161253 4 -11.09770383 -7.49797972 5 -7.76995359 -11.09770383 6 -7.66863767 -7.76995359 7 -12.47164793 -7.66863767 8 -5.74818845 -12.47164793 9 -5.96590330 -5.74818845 10 -5.47825560 -5.96590330 11 -3.36510740 -5.47825560 12 -3.72981200 -3.36510740 13 -4.62693969 -3.72981200 14 -4.80732176 -4.62693969 15 -4.00130125 -4.80732176 16 -6.44168332 -4.00130125 17 -2.79676999 -6.44168332 18 -3.04597409 -2.79676999 19 -7.67991819 -3.04597409 20 -1.05870847 -7.67991819 21 -0.57271971 -1.05870847 22 1.11918337 -0.57271971 23 2.11949465 1.11918337 24 0.22098390 2.11949465 25 1.76638185 0.22098390 26 0.77935671 1.76638185 27 -1.09417356 0.77935671 28 -1.77438230 -1.09417356 29 1.35959719 -1.77438230 30 -0.02548948 1.35959719 31 -4.03403562 -0.02548948 32 4.51672488 -4.03403562 33 1.52887209 4.51672488 34 3.87918337 1.52887209 35 6.03599977 3.87918337 36 3.14032594 6.03599977 37 4.33191774 3.14032594 38 2.61869875 4.33191774 39 3.17592898 2.61869875 40 1.38350589 3.17592898 41 4.65336795 1.38350589 42 2.58637820 4.65336795 43 1.18925052 2.58637820 44 4.69876590 1.18925052 45 3.91451052 4.69876590 46 9.76108644 3.91451052 47 6.27471926 9.76108644 48 7.30824953 6.27471926 49 8.18177980 7.30824953 50 4.61804079 8.18177980 51 7.32132693 4.61804079 52 4.53817873 7.32132693 53 8.62610232 4.53817873 54 6.08229617 8.62610232 55 0.30281618 6.08229617 56 3.94835207 0.30281618 57 4.46890748 3.94835207 58 6.01257569 4.46890748 59 4.59382081 6.01257569 60 NA 4.59382081 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -8.69296020 -6.15950072 [2,] -9.45161253 -8.69296020 [3,] -7.49797972 -9.45161253 [4,] -11.09770383 -7.49797972 [5,] -7.76995359 -11.09770383 [6,] -7.66863767 -7.76995359 [7,] -12.47164793 -7.66863767 [8,] -5.74818845 -12.47164793 [9,] -5.96590330 -5.74818845 [10,] -5.47825560 -5.96590330 [11,] -3.36510740 -5.47825560 [12,] -3.72981200 -3.36510740 [13,] -4.62693969 -3.72981200 [14,] -4.80732176 -4.62693969 [15,] -4.00130125 -4.80732176 [16,] -6.44168332 -4.00130125 [17,] -2.79676999 -6.44168332 [18,] -3.04597409 -2.79676999 [19,] -7.67991819 -3.04597409 [20,] -1.05870847 -7.67991819 [21,] -0.57271971 -1.05870847 [22,] 1.11918337 -0.57271971 [23,] 2.11949465 1.11918337 [24,] 0.22098390 2.11949465 [25,] 1.76638185 0.22098390 [26,] 0.77935671 1.76638185 [27,] -1.09417356 0.77935671 [28,] -1.77438230 -1.09417356 [29,] 1.35959719 -1.77438230 [30,] -0.02548948 1.35959719 [31,] -4.03403562 -0.02548948 [32,] 4.51672488 -4.03403562 [33,] 1.52887209 4.51672488 [34,] 3.87918337 1.52887209 [35,] 6.03599977 3.87918337 [36,] 3.14032594 6.03599977 [37,] 4.33191774 3.14032594 [38,] 2.61869875 4.33191774 [39,] 3.17592898 2.61869875 [40,] 1.38350589 3.17592898 [41,] 4.65336795 1.38350589 [42,] 2.58637820 4.65336795 [43,] 1.18925052 2.58637820 [44,] 4.69876590 1.18925052 [45,] 3.91451052 4.69876590 [46,] 9.76108644 3.91451052 [47,] 6.27471926 9.76108644 [48,] 7.30824953 6.27471926 [49,] 8.18177980 7.30824953 [50,] 4.61804079 8.18177980 [51,] 7.32132693 4.61804079 [52,] 4.53817873 7.32132693 [53,] 8.62610232 4.53817873 [54,] 6.08229617 8.62610232 [55,] 0.30281618 6.08229617 [56,] 3.94835207 0.30281618 [57,] 4.46890748 3.94835207 [58,] 6.01257569 4.46890748 [59,] 4.59382081 6.01257569 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -8.69296020 -6.15950072 2 -9.45161253 -8.69296020 3 -7.49797972 -9.45161253 4 -11.09770383 -7.49797972 5 -7.76995359 -11.09770383 6 -7.66863767 -7.76995359 7 -12.47164793 -7.66863767 8 -5.74818845 -12.47164793 9 -5.96590330 -5.74818845 10 -5.47825560 -5.96590330 11 -3.36510740 -5.47825560 12 -3.72981200 -3.36510740 13 -4.62693969 -3.72981200 14 -4.80732176 -4.62693969 15 -4.00130125 -4.80732176 16 -6.44168332 -4.00130125 17 -2.79676999 -6.44168332 18 -3.04597409 -2.79676999 19 -7.67991819 -3.04597409 20 -1.05870847 -7.67991819 21 -0.57271971 -1.05870847 22 1.11918337 -0.57271971 23 2.11949465 1.11918337 24 0.22098390 2.11949465 25 1.76638185 0.22098390 26 0.77935671 1.76638185 27 -1.09417356 0.77935671 28 -1.77438230 -1.09417356 29 1.35959719 -1.77438230 30 -0.02548948 1.35959719 31 -4.03403562 -0.02548948 32 4.51672488 -4.03403562 33 1.52887209 4.51672488 34 3.87918337 1.52887209 35 6.03599977 3.87918337 36 3.14032594 6.03599977 37 4.33191774 3.14032594 38 2.61869875 4.33191774 39 3.17592898 2.61869875 40 1.38350589 3.17592898 41 4.65336795 1.38350589 42 2.58637820 4.65336795 43 1.18925052 2.58637820 44 4.69876590 1.18925052 45 3.91451052 4.69876590 46 9.76108644 3.91451052 47 6.27471926 9.76108644 48 7.30824953 6.27471926 49 8.18177980 7.30824953 50 4.61804079 8.18177980 51 7.32132693 4.61804079 52 4.53817873 7.32132693 53 8.62610232 4.53817873 54 6.08229617 8.62610232 55 0.30281618 6.08229617 56 3.94835207 0.30281618 57 4.46890748 3.94835207 58 6.01257569 4.46890748 59 4.59382081 6.01257569 > 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/7s2xp1258648324.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/8xg5a1258648324.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/9dl9r1258648324.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/10quhy1258648324.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/11tu0g1258648324.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/120skr1258648324.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/13h5fl1258648324.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/14xqq21258648324.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/153st41258648324.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/16vxkb1258648324.tab") + } > system("convert tmp/1459p1258648324.ps tmp/1459p1258648324.png") > system("convert tmp/2c77l1258648324.ps tmp/2c77l1258648324.png") > system("convert tmp/3jxqd1258648324.ps tmp/3jxqd1258648324.png") > system("convert tmp/4wuwe1258648324.ps tmp/4wuwe1258648324.png") > system("convert tmp/5u4yt1258648324.ps tmp/5u4yt1258648324.png") > system("convert tmp/6ib7b1258648324.ps tmp/6ib7b1258648324.png") > system("convert tmp/7s2xp1258648324.ps tmp/7s2xp1258648324.png") > system("convert tmp/8xg5a1258648324.ps tmp/8xg5a1258648324.png") > system("convert tmp/9dl9r1258648324.ps tmp/9dl9r1258648324.png") > system("convert tmp/10quhy1258648324.ps tmp/10quhy1258648324.png") > > > proc.time() user system elapsed 2.470 1.562 2.841