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(116.24 + ,112.42 + ,120.58 + ,116.03 + ,112 + ,120.17 + ,115.94 + ,111.72 + ,120.02 + ,114.19 + ,111.67 + ,120.49 + ,115.74 + ,111.55 + ,120.38 + ,115.4 + ,111.33 + ,120.09 + ,115.2 + ,111.06 + ,119.62 + ,114.82 + ,110.97 + ,118.93 + ,114.33 + ,110.81 + ,119.09 + ,111.84 + ,110.62 + ,118.59 + ,113.16 + ,110.71 + ,117.87 + ,112.52 + ,110.51 + ,117.74 + ,112.39 + ,110.5 + ,117.61 + ,112.24 + ,110.37 + ,117.55 + ,112.1 + ,110.38 + ,117.06 + ,109.85 + ,110.26 + ,117.08 + ,111.89 + ,110.28 + ,117.21 + ,111.88 + ,110.25 + ,117.58 + ,111.48 + ,110.09 + ,117.27 + ,110.98 + ,110.01 + ,117.14 + ,110.42 + ,109.75 + ,116.52 + ,107.9 + ,109.57 + ,116.16 + ,109.46 + ,109.59 + ,114.79 + ,109.23 + ,109.45 + ,114.97 + ,109.02 + ,109.21 + ,114.66 + ,109.04 + ,109 + ,114.3 + ,109.49 + ,108.83 + ,114.48 + ,107.23 + ,108.62 + ,114.96 + ,109 + ,108.56 + ,115.44 + ,109.12 + ,108.41 + ,116.38 + ,109.24 + ,108.27 + ,116.5 + ,108.92 + ,108.03 + ,116.2 + ,109.53 + ,107.67 + ,116.37 + ,107.06 + ,107.31 + ,116.46 + ,109.11 + ,107.14 + ,115.07 + ,109.26 + ,107.02 + ,115.03 + ,109.99 + ,106.79 + ,115.15 + ,110.17 + ,106.49 + ,114.71 + ,110.28 + ,106.14 + ,114.67 + ,109.13 + ,105.94 + ,115.49 + ,110.15 + ,105.87 + ,114.65 + ,109.39 + ,105.71 + ,114.92 + ,108.45 + ,105.48 + ,114.17 + ,108.23 + ,105.31 + ,112.8 + ,107.44 + ,105.09 + ,112.28 + ,104.86 + ,104.88 + ,112.05 + ,106.23 + ,104.76 + ,111.03 + ,105.85 + ,104.62 + ,110.4 + ,104.95 + ,104.49 + ,109.08 + ,104.46 + ,104.29 + ,107.89) + ,dim=c(3 + ,50) + ,dimnames=list(c('prijsindex' + ,'gezondheid' + ,'tabak') + ,1:50)) > y <- array(NA,dim=c(3,50),dimnames=list(c('prijsindex','gezondheid','tabak'),1:50)) > 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 prijsindex gezondheid tabak 1 116.24 112.42 120.58 2 116.03 112.00 120.17 3 115.94 111.72 120.02 4 114.19 111.67 120.49 5 115.74 111.55 120.38 6 115.40 111.33 120.09 7 115.20 111.06 119.62 8 114.82 110.97 118.93 9 114.33 110.81 119.09 10 111.84 110.62 118.59 11 113.16 110.71 117.87 12 112.52 110.51 117.74 13 112.39 110.50 117.61 14 112.24 110.37 117.55 15 112.10 110.38 117.06 16 109.85 110.26 117.08 17 111.89 110.28 117.21 18 111.88 110.25 117.58 19 111.48 110.09 117.27 20 110.98 110.01 117.14 21 110.42 109.75 116.52 22 107.90 109.57 116.16 23 109.46 109.59 114.79 24 109.23 109.45 114.97 25 109.02 109.21 114.66 26 109.04 109.00 114.30 27 109.49 108.83 114.48 28 107.23 108.62 114.96 29 109.00 108.56 115.44 30 109.12 108.41 116.38 31 109.24 108.27 116.50 32 108.92 108.03 116.20 33 109.53 107.67 116.37 34 107.06 107.31 116.46 35 109.11 107.14 115.07 36 109.26 107.02 115.03 37 109.99 106.79 115.15 38 110.17 106.49 114.71 39 110.28 106.14 114.67 40 109.13 105.94 115.49 41 110.15 105.87 114.65 42 109.39 105.71 114.92 43 108.45 105.48 114.17 44 108.23 105.31 112.80 45 107.44 105.09 112.28 46 104.86 104.88 112.05 47 106.23 104.76 111.03 48 105.85 104.62 110.40 49 104.95 104.49 109.08 50 104.46 104.29 107.89 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) gezondheid tabak -6.4913 0.1941 0.8261 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.4928 -0.6266 0.1685 1.0125 1.5901 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.4913 8.0729 -0.804 0.425 gezondheid 0.1941 0.1669 1.163 0.251 tabak 0.8261 0.1377 6.001 2.68e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.23 on 47 degrees of freedom Multiple R-squared: 0.8427, Adjusted R-squared: 0.836 F-statistic: 125.9 on 2 and 47 DF, p-value: < 2.2e-16 > 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.17141100 0.34282200 0.82858900 [2,] 0.09637325 0.19274649 0.90362675 [3,] 0.09727715 0.19455431 0.90272285 [4,] 0.06792442 0.13584884 0.93207558 [5,] 0.37784109 0.75568219 0.62215891 [6,] 0.30148885 0.60297770 0.69851115 [7,] 0.23027650 0.46055300 0.76972350 [8,] 0.17292213 0.34584426 0.82707787 [9,] 0.12711516 0.25423032 0.87288484 [10,] 0.09862499 0.19724998 0.90137501 [11,] 0.23607255 0.47214510 0.76392745 [12,] 0.19664724 0.39329447 0.80335276 [13,] 0.15800479 0.31600957 0.84199521 [14,] 0.12402011 0.24804022 0.87597989 [15,] 0.09378592 0.18757185 0.90621408 [16,] 0.06558900 0.13117801 0.93441100 [17,] 0.19558594 0.39117189 0.80441406 [18,] 0.17202974 0.34405948 0.82797026 [19,] 0.13063545 0.26127091 0.86936455 [20,] 0.10484829 0.20969658 0.89515171 [21,] 0.10959750 0.21919500 0.89040250 [22,] 0.18780854 0.37561707 0.81219146 [23,] 0.17127733 0.34255465 0.82872267 [24,] 0.14287415 0.28574830 0.85712585 [25,] 0.10169352 0.20338704 0.89830648 [26,] 0.07075815 0.14151631 0.92924185 [27,] 0.05053045 0.10106089 0.94946955 [28,] 0.04066953 0.08133906 0.95933047 [29,] 0.48290694 0.96581387 0.51709306 [30,] 0.62789112 0.74421777 0.37210888 [31,] 0.79924937 0.40150127 0.20075063 [32,] 0.90159749 0.19680502 0.09840251 [33,] 0.96027550 0.07944900 0.03972450 [34,] 0.96656634 0.06686732 0.03343366 [35,] 0.97870746 0.04258509 0.02129254 [36,] 0.96784249 0.06431503 0.03215751 [37,] 0.92941173 0.14117654 0.07058827 [38,] 0.85152885 0.29694230 0.14847115 [39,] 0.73984516 0.52030968 0.26015484 > postscript(file="/var/wessaorg/rcomp/tmp/1gb111321949083.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/2lozg1321949083.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/3gkrx1321949083.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/4ebpx1321949083.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/5ft781321949083.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 = 50 Frequency = 1 1 2 3 4 5 6 1.29155242 1.50180329 1.59007985 -0.53849992 1.12567075 1.06795941 7 8 9 10 11 12 1.30865972 1.51616817 0.92504593 -1.11499967 0.78235021 0.28857383 13 14 15 16 17 18 0.26791338 0.19271828 0.45558594 -1.78764167 0.14107751 -0.16877074 19 20 21 22 23 24 -0.28160686 -0.65867844 -0.65599830 -2.84364486 -0.15571469 -0.50724228 25 26 27 28 29 30 -0.41454827 -0.05637104 0.27792518 -2.33785574 -0.95275565 -1.58020888 31 32 33 34 35 36 -1.53216802 -1.55773542 -1.01829374 -3.49276079 -0.26142374 -0.05508292 37 38 39 40 41 42 0.62042934 1.22216923 1.43315919 -0.35545082 1.37209620 0.42009849 43 44 45 46 47 48 0.14435312 1.08916736 0.77146837 -1.57775268 0.65820599 0.82585234 49 50 1.04159448 1.57352720 > postscript(file="/var/wessaorg/rcomp/tmp/6u20s1321949083.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 = 50 Frequency = 1 lag(myerror, k = 1) myerror 0 1.29155242 NA 1 1.50180329 1.29155242 2 1.59007985 1.50180329 3 -0.53849992 1.59007985 4 1.12567075 -0.53849992 5 1.06795941 1.12567075 6 1.30865972 1.06795941 7 1.51616817 1.30865972 8 0.92504593 1.51616817 9 -1.11499967 0.92504593 10 0.78235021 -1.11499967 11 0.28857383 0.78235021 12 0.26791338 0.28857383 13 0.19271828 0.26791338 14 0.45558594 0.19271828 15 -1.78764167 0.45558594 16 0.14107751 -1.78764167 17 -0.16877074 0.14107751 18 -0.28160686 -0.16877074 19 -0.65867844 -0.28160686 20 -0.65599830 -0.65867844 21 -2.84364486 -0.65599830 22 -0.15571469 -2.84364486 23 -0.50724228 -0.15571469 24 -0.41454827 -0.50724228 25 -0.05637104 -0.41454827 26 0.27792518 -0.05637104 27 -2.33785574 0.27792518 28 -0.95275565 -2.33785574 29 -1.58020888 -0.95275565 30 -1.53216802 -1.58020888 31 -1.55773542 -1.53216802 32 -1.01829374 -1.55773542 33 -3.49276079 -1.01829374 34 -0.26142374 -3.49276079 35 -0.05508292 -0.26142374 36 0.62042934 -0.05508292 37 1.22216923 0.62042934 38 1.43315919 1.22216923 39 -0.35545082 1.43315919 40 1.37209620 -0.35545082 41 0.42009849 1.37209620 42 0.14435312 0.42009849 43 1.08916736 0.14435312 44 0.77146837 1.08916736 45 -1.57775268 0.77146837 46 0.65820599 -1.57775268 47 0.82585234 0.65820599 48 1.04159448 0.82585234 49 1.57352720 1.04159448 50 NA 1.57352720 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.50180329 1.29155242 [2,] 1.59007985 1.50180329 [3,] -0.53849992 1.59007985 [4,] 1.12567075 -0.53849992 [5,] 1.06795941 1.12567075 [6,] 1.30865972 1.06795941 [7,] 1.51616817 1.30865972 [8,] 0.92504593 1.51616817 [9,] -1.11499967 0.92504593 [10,] 0.78235021 -1.11499967 [11,] 0.28857383 0.78235021 [12,] 0.26791338 0.28857383 [13,] 0.19271828 0.26791338 [14,] 0.45558594 0.19271828 [15,] -1.78764167 0.45558594 [16,] 0.14107751 -1.78764167 [17,] -0.16877074 0.14107751 [18,] -0.28160686 -0.16877074 [19,] -0.65867844 -0.28160686 [20,] -0.65599830 -0.65867844 [21,] -2.84364486 -0.65599830 [22,] -0.15571469 -2.84364486 [23,] -0.50724228 -0.15571469 [24,] -0.41454827 -0.50724228 [25,] -0.05637104 -0.41454827 [26,] 0.27792518 -0.05637104 [27,] -2.33785574 0.27792518 [28,] -0.95275565 -2.33785574 [29,] -1.58020888 -0.95275565 [30,] -1.53216802 -1.58020888 [31,] -1.55773542 -1.53216802 [32,] -1.01829374 -1.55773542 [33,] -3.49276079 -1.01829374 [34,] -0.26142374 -3.49276079 [35,] -0.05508292 -0.26142374 [36,] 0.62042934 -0.05508292 [37,] 1.22216923 0.62042934 [38,] 1.43315919 1.22216923 [39,] -0.35545082 1.43315919 [40,] 1.37209620 -0.35545082 [41,] 0.42009849 1.37209620 [42,] 0.14435312 0.42009849 [43,] 1.08916736 0.14435312 [44,] 0.77146837 1.08916736 [45,] -1.57775268 0.77146837 [46,] 0.65820599 -1.57775268 [47,] 0.82585234 0.65820599 [48,] 1.04159448 0.82585234 [49,] 1.57352720 1.04159448 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.50180329 1.29155242 2 1.59007985 1.50180329 3 -0.53849992 1.59007985 4 1.12567075 -0.53849992 5 1.06795941 1.12567075 6 1.30865972 1.06795941 7 1.51616817 1.30865972 8 0.92504593 1.51616817 9 -1.11499967 0.92504593 10 0.78235021 -1.11499967 11 0.28857383 0.78235021 12 0.26791338 0.28857383 13 0.19271828 0.26791338 14 0.45558594 0.19271828 15 -1.78764167 0.45558594 16 0.14107751 -1.78764167 17 -0.16877074 0.14107751 18 -0.28160686 -0.16877074 19 -0.65867844 -0.28160686 20 -0.65599830 -0.65867844 21 -2.84364486 -0.65599830 22 -0.15571469 -2.84364486 23 -0.50724228 -0.15571469 24 -0.41454827 -0.50724228 25 -0.05637104 -0.41454827 26 0.27792518 -0.05637104 27 -2.33785574 0.27792518 28 -0.95275565 -2.33785574 29 -1.58020888 -0.95275565 30 -1.53216802 -1.58020888 31 -1.55773542 -1.53216802 32 -1.01829374 -1.55773542 33 -3.49276079 -1.01829374 34 -0.26142374 -3.49276079 35 -0.05508292 -0.26142374 36 0.62042934 -0.05508292 37 1.22216923 0.62042934 38 1.43315919 1.22216923 39 -0.35545082 1.43315919 40 1.37209620 -0.35545082 41 0.42009849 1.37209620 42 0.14435312 0.42009849 43 1.08916736 0.14435312 44 0.77146837 1.08916736 45 -1.57775268 0.77146837 46 0.65820599 -1.57775268 47 0.82585234 0.65820599 48 1.04159448 0.82585234 49 1.57352720 1.04159448 > 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/73j2k1321949083.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/8jgbz1321949083.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/9rd1d1321949083.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/1020ti1321949083.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/11klgz1321949083.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/12x6wc1321949083.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/13z3ku1321949083.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/146lna1321949083.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/154puo1321949083.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/1656ow1321949083.tab") + } > > try(system("convert tmp/1gb111321949083.ps tmp/1gb111321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/2lozg1321949083.ps tmp/2lozg1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/3gkrx1321949083.ps tmp/3gkrx1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/4ebpx1321949083.ps tmp/4ebpx1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/5ft781321949083.ps tmp/5ft781321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/6u20s1321949083.ps tmp/6u20s1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/73j2k1321949083.ps tmp/73j2k1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/8jgbz1321949083.ps tmp/8jgbz1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/9rd1d1321949083.ps tmp/9rd1d1321949083.png",intern=TRUE)) character(0) > try(system("convert tmp/1020ti1321949083.ps tmp/1020ti1321949083.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.138 0.502 3.716