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(15,40,35,16,42,36,15,38,35,14,34,32,13,32,30,16,40,35,18,50,40,14,25,23,11,16,15,10,12,12,9,4,4,11,7,7,13,16,14,18,50,46,21,60,50,15,35,33,14,32,31,15,33,32,16,39,34,15,33,30,16,35,31,17,40,35,14,25,23,13,19,17,12,12,12,15,19,17,16,25,22,18,29,24,19,41,34,17,50,45,18,70,60,18,65,61,18,50,45,19,45,41,20,62,51,22,82,62,21,62,53,20,42,33,18,39,35,17,35,31,16,30,28,19,40,33,21,45,39,20,42,35,20,41,35,21,45,35,20,43,35,19,30,28,16,20,18,18,25,23,19,27,24,21,38,29,22,40,29,25,60,41,24,61,41,23,55,41,22,43,38,21,34,29,20,20,17,22,38,32),dim=c(3,60),dimnames=list(c('Gem_Graden','Gem_Fietsers','Aantal_Mannen '),1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('Gem_Graden','Gem_Fietsers','Aantal_Mannen '),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 > 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 Gem_Graden Gem_Fietsers Aantal_Mannen\r 1 15 40 35 2 16 42 36 3 15 38 35 4 14 34 32 5 13 32 30 6 16 40 35 7 18 50 40 8 14 25 23 9 11 16 15 10 10 12 12 11 9 4 4 12 11 7 7 13 13 16 14 14 18 50 46 15 21 60 50 16 15 35 33 17 14 32 31 18 15 33 32 19 16 39 34 20 15 33 30 21 16 35 31 22 17 40 35 23 14 25 23 24 13 19 17 25 12 12 12 26 15 19 17 27 16 25 22 28 18 29 24 29 19 41 34 30 17 50 45 31 18 70 60 32 18 65 61 33 18 50 45 34 19 45 41 35 20 62 51 36 22 82 62 37 21 62 53 38 20 42 33 39 18 39 35 40 17 35 31 41 16 30 28 42 19 40 33 43 21 45 39 44 20 42 35 45 20 41 35 46 21 45 35 47 20 43 35 48 19 30 28 49 16 20 18 50 18 25 23 51 19 27 24 52 21 38 29 53 22 40 29 54 25 60 41 55 24 61 41 56 23 55 41 57 22 43 38 58 21 34 29 59 20 20 17 60 22 38 32 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Gem_Fietsers `Aantal_Mannen\r` 12.8238 0.5080 -0.4506 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4.5371 -1.3580 0.1158 1.1309 4.6778 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 12.82379 0.80627 15.905 < 2e-16 *** Gem_Fietsers 0.50796 0.07939 6.399 3.17e-08 *** `Aantal_Mannen\r` -0.45064 0.10071 -4.475 3.71e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.165 on 57 degrees of freedom Multiple R-squared: 0.6394, Adjusted R-squared: 0.6267 F-statistic: 50.53 on 2 and 57 DF, p-value: 2.373e-13 > 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,] 1.036220e-02 0.0207243996 0.989637800 [2,] 1.775622e-03 0.0035512448 0.998224378 [3,] 3.390284e-03 0.0067805688 0.996609716 [4,] 3.460077e-03 0.0069201548 0.996539923 [5,] 1.685086e-03 0.0033701715 0.998314914 [6,] 8.033240e-04 0.0016066480 0.999196676 [7,] 1.659605e-03 0.0033192096 0.998340395 [8,] 2.669416e-03 0.0053388326 0.997330584 [9,] 3.058677e-03 0.0061173531 0.996941323 [10,] 2.695276e-03 0.0053905516 0.997304724 [11,] 1.413476e-03 0.0028269522 0.998586524 [12,] 6.922087e-04 0.0013844174 0.999307791 [13,] 4.758020e-04 0.0009516040 0.999524198 [14,] 2.352779e-04 0.0004705559 0.999764722 [15,] 1.340148e-04 0.0002680295 0.999865985 [16,] 1.058303e-04 0.0002116606 0.999894170 [17,] 7.534422e-05 0.0001506884 0.999924656 [18,] 7.602471e-05 0.0001520494 0.999923975 [19,] 1.486093e-04 0.0002972186 0.999851391 [20,] 1.080386e-03 0.0021607720 0.998919614 [21,] 1.599547e-02 0.0319909389 0.984004531 [22,] 6.338027e-02 0.1267605377 0.936619731 [23,] 1.893815e-01 0.3787629312 0.810618534 [24,] 1.942091e-01 0.3884181258 0.805790937 [25,] 1.806592e-01 0.3613184996 0.819340750 [26,] 4.165036e-01 0.8330072310 0.583496384 [27,] 3.424833e-01 0.6849665607 0.657516720 [28,] 3.067856e-01 0.6135711649 0.693214418 [29,] 3.630367e-01 0.7260734394 0.636963280 [30,] 3.229975e-01 0.6459950987 0.677002451 [31,] 5.400636e-01 0.9198727319 0.459936366 [32,] 5.069332e-01 0.9861335157 0.493066758 [33,] 5.504500e-01 0.8990999106 0.449549955 [34,] 5.772143e-01 0.8455713974 0.422785699 [35,] 6.792115e-01 0.6415770794 0.320788540 [36,] 8.489045e-01 0.3021909131 0.151095457 [37,] 8.927562e-01 0.2144875611 0.107243781 [38,] 9.069298e-01 0.1861404851 0.093070243 [39,] 9.092910e-01 0.1814179139 0.090708957 [40,] 9.096791e-01 0.1806418095 0.090320905 [41,] 8.937188e-01 0.2125623641 0.106281182 [42,] 9.123978e-01 0.1752043098 0.087602155 [43,] 9.104929e-01 0.1790142193 0.089507110 [44,] 9.817258e-01 0.0365484039 0.018274202 [45,] 9.942383e-01 0.0115233394 0.005761670 [46,] 9.976187e-01 0.0047626310 0.002381315 [47,] 9.968018e-01 0.0063963968 0.003198198 [48,] 9.878929e-01 0.0242142110 0.012107106 [49,] 9.941776e-01 0.0116447666 0.005822383 > postscript(file="/var/wessaorg/rcomp/tmp/1p44f1321891884.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/2hkxs1321891884.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/3qevi1321891884.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/45jgw1321891884.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/5fw9q1321891884.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 = 60 Frequency = 1 1 2 3 4 5 6 -2.36989752 -1.93518345 -1.35397076 -1.67403972 -2.55939462 -1.36989752 7 8 9 10 11 12 -2.19632717 -1.15813674 -3.19159294 -3.51166190 -4.05308147 -2.22504913 13 14 15 16 17 18 -1.64223376 0.50751777 0.23044729 -0.73136228 -1.10875379 -0.16607635 19 20 21 22 23 24 -1.31257496 -1.06735799 -0.63264393 -0.36989752 -1.15813674 -1.81420142 25 26 27 28 29 30 -1.51166190 0.18579858 0.39122243 1.26065057 0.67149828 -0.94312305 31 32 33 34 35 36 -3.34277824 -0.35232053 0.05687695 1.79413054 -1.33483864 -4.53705712 37 38 39 40 41 42 0.56644301 0.71289408 1.13806586 0.36735607 0.55525049 0.72882084 43 44 45 46 47 48 2.89284889 1.61417573 2.12213911 1.09028560 1.10621235 3.55525049 49 50 51 52 53 54 1.12847603 2.84186326 3.27657733 1.94218430 1.92625754 0.17467988 55 56 57 58 59 60 -1.33328349 0.71449677 4.45813482 3.97403781 4.67783520 4.29410677 > postscript(file="/var/wessaorg/rcomp/tmp/6p3iu1321891884.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.36989752 NA 1 -1.93518345 -2.36989752 2 -1.35397076 -1.93518345 3 -1.67403972 -1.35397076 4 -2.55939462 -1.67403972 5 -1.36989752 -2.55939462 6 -2.19632717 -1.36989752 7 -1.15813674 -2.19632717 8 -3.19159294 -1.15813674 9 -3.51166190 -3.19159294 10 -4.05308147 -3.51166190 11 -2.22504913 -4.05308147 12 -1.64223376 -2.22504913 13 0.50751777 -1.64223376 14 0.23044729 0.50751777 15 -0.73136228 0.23044729 16 -1.10875379 -0.73136228 17 -0.16607635 -1.10875379 18 -1.31257496 -0.16607635 19 -1.06735799 -1.31257496 20 -0.63264393 -1.06735799 21 -0.36989752 -0.63264393 22 -1.15813674 -0.36989752 23 -1.81420142 -1.15813674 24 -1.51166190 -1.81420142 25 0.18579858 -1.51166190 26 0.39122243 0.18579858 27 1.26065057 0.39122243 28 0.67149828 1.26065057 29 -0.94312305 0.67149828 30 -3.34277824 -0.94312305 31 -0.35232053 -3.34277824 32 0.05687695 -0.35232053 33 1.79413054 0.05687695 34 -1.33483864 1.79413054 35 -4.53705712 -1.33483864 36 0.56644301 -4.53705712 37 0.71289408 0.56644301 38 1.13806586 0.71289408 39 0.36735607 1.13806586 40 0.55525049 0.36735607 41 0.72882084 0.55525049 42 2.89284889 0.72882084 43 1.61417573 2.89284889 44 2.12213911 1.61417573 45 1.09028560 2.12213911 46 1.10621235 1.09028560 47 3.55525049 1.10621235 48 1.12847603 3.55525049 49 2.84186326 1.12847603 50 3.27657733 2.84186326 51 1.94218430 3.27657733 52 1.92625754 1.94218430 53 0.17467988 1.92625754 54 -1.33328349 0.17467988 55 0.71449677 -1.33328349 56 4.45813482 0.71449677 57 3.97403781 4.45813482 58 4.67783520 3.97403781 59 4.29410677 4.67783520 60 NA 4.29410677 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.93518345 -2.36989752 [2,] -1.35397076 -1.93518345 [3,] -1.67403972 -1.35397076 [4,] -2.55939462 -1.67403972 [5,] -1.36989752 -2.55939462 [6,] -2.19632717 -1.36989752 [7,] -1.15813674 -2.19632717 [8,] -3.19159294 -1.15813674 [9,] -3.51166190 -3.19159294 [10,] -4.05308147 -3.51166190 [11,] -2.22504913 -4.05308147 [12,] -1.64223376 -2.22504913 [13,] 0.50751777 -1.64223376 [14,] 0.23044729 0.50751777 [15,] -0.73136228 0.23044729 [16,] -1.10875379 -0.73136228 [17,] -0.16607635 -1.10875379 [18,] -1.31257496 -0.16607635 [19,] -1.06735799 -1.31257496 [20,] -0.63264393 -1.06735799 [21,] -0.36989752 -0.63264393 [22,] -1.15813674 -0.36989752 [23,] -1.81420142 -1.15813674 [24,] -1.51166190 -1.81420142 [25,] 0.18579858 -1.51166190 [26,] 0.39122243 0.18579858 [27,] 1.26065057 0.39122243 [28,] 0.67149828 1.26065057 [29,] -0.94312305 0.67149828 [30,] -3.34277824 -0.94312305 [31,] -0.35232053 -3.34277824 [32,] 0.05687695 -0.35232053 [33,] 1.79413054 0.05687695 [34,] -1.33483864 1.79413054 [35,] -4.53705712 -1.33483864 [36,] 0.56644301 -4.53705712 [37,] 0.71289408 0.56644301 [38,] 1.13806586 0.71289408 [39,] 0.36735607 1.13806586 [40,] 0.55525049 0.36735607 [41,] 0.72882084 0.55525049 [42,] 2.89284889 0.72882084 [43,] 1.61417573 2.89284889 [44,] 2.12213911 1.61417573 [45,] 1.09028560 2.12213911 [46,] 1.10621235 1.09028560 [47,] 3.55525049 1.10621235 [48,] 1.12847603 3.55525049 [49,] 2.84186326 1.12847603 [50,] 3.27657733 2.84186326 [51,] 1.94218430 3.27657733 [52,] 1.92625754 1.94218430 [53,] 0.17467988 1.92625754 [54,] -1.33328349 0.17467988 [55,] 0.71449677 -1.33328349 [56,] 4.45813482 0.71449677 [57,] 3.97403781 4.45813482 [58,] 4.67783520 3.97403781 [59,] 4.29410677 4.67783520 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.93518345 -2.36989752 2 -1.35397076 -1.93518345 3 -1.67403972 -1.35397076 4 -2.55939462 -1.67403972 5 -1.36989752 -2.55939462 6 -2.19632717 -1.36989752 7 -1.15813674 -2.19632717 8 -3.19159294 -1.15813674 9 -3.51166190 -3.19159294 10 -4.05308147 -3.51166190 11 -2.22504913 -4.05308147 12 -1.64223376 -2.22504913 13 0.50751777 -1.64223376 14 0.23044729 0.50751777 15 -0.73136228 0.23044729 16 -1.10875379 -0.73136228 17 -0.16607635 -1.10875379 18 -1.31257496 -0.16607635 19 -1.06735799 -1.31257496 20 -0.63264393 -1.06735799 21 -0.36989752 -0.63264393 22 -1.15813674 -0.36989752 23 -1.81420142 -1.15813674 24 -1.51166190 -1.81420142 25 0.18579858 -1.51166190 26 0.39122243 0.18579858 27 1.26065057 0.39122243 28 0.67149828 1.26065057 29 -0.94312305 0.67149828 30 -3.34277824 -0.94312305 31 -0.35232053 -3.34277824 32 0.05687695 -0.35232053 33 1.79413054 0.05687695 34 -1.33483864 1.79413054 35 -4.53705712 -1.33483864 36 0.56644301 -4.53705712 37 0.71289408 0.56644301 38 1.13806586 0.71289408 39 0.36735607 1.13806586 40 0.55525049 0.36735607 41 0.72882084 0.55525049 42 2.89284889 0.72882084 43 1.61417573 2.89284889 44 2.12213911 1.61417573 45 1.09028560 2.12213911 46 1.10621235 1.09028560 47 3.55525049 1.10621235 48 1.12847603 3.55525049 49 2.84186326 1.12847603 50 3.27657733 2.84186326 51 1.94218430 3.27657733 52 1.92625754 1.94218430 53 0.17467988 1.92625754 54 -1.33328349 0.17467988 55 0.71449677 -1.33328349 56 4.45813482 0.71449677 57 3.97403781 4.45813482 58 4.67783520 3.97403781 59 4.29410677 4.67783520 > 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/7a5qa1321891884.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/85tmv1321891884.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/9xrbf1321891884.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/10b8711321891884.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/11m2kr1321891884.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/12m0o11321891884.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/13xxsm1321891884.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/141agb1321891884.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/15g6lm1321891884.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/1608hy1321891884.tab") + } > > try(system("convert tmp/1p44f1321891884.ps tmp/1p44f1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/2hkxs1321891884.ps tmp/2hkxs1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/3qevi1321891884.ps tmp/3qevi1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/45jgw1321891884.ps tmp/45jgw1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/5fw9q1321891884.ps tmp/5fw9q1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/6p3iu1321891884.ps tmp/6p3iu1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/7a5qa1321891884.ps tmp/7a5qa1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/85tmv1321891884.ps tmp/85tmv1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/9xrbf1321891884.ps tmp/9xrbf1321891884.png",intern=TRUE)) character(0) > try(system("convert tmp/10b8711321891884.ps tmp/10b8711321891884.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.166 0.554 3.746