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(3922,8.1,3759,7.7,4138,7.5,4634,7.6,3996,7.8,4308,7.8,4143,7.8,4429,7.5,5219,7.5,4929,7.1,5755,7.5,5592,7.5,4163,7.6,4962,7.7,5208,7.7,4755,7.9,4491,8.1,5732,8.2,5731,8.2,5040,8.2,6102,7.9,4904,7.3,5369,6.9,5578,6.6,4619,6.7,4731,6.9,5011,7,5299,7.1,4146,7.2,4625,7.1,4736,6.9,4219,7,5116,6.8,4205,6.4,4121,6.7,5103,6.6,4300,6.4,4578,6.3,3809,6.2,5526,6.5,4247,6.8,3830,6.8,4394,6.4,4826,6.1,4409,5.8,4569,6.1,4106,7.2,4794,7.3,3914,6.9,3793,6.1,4405,5.8,4022,6.2,4100,7.1,4788,7.7,3163,7.9,3585,7.7,3903,7.4,4178,7.5,3863,8,4187,8.1),dim=c(2,60),dimnames=list(c('Bouw','Wman'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Bouw','Wman'),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 Bouw Wman 1 3922 8.1 2 3759 7.7 3 4138 7.5 4 4634 7.6 5 3996 7.8 6 4308 7.8 7 4143 7.8 8 4429 7.5 9 5219 7.5 10 4929 7.1 11 5755 7.5 12 5592 7.5 13 4163 7.6 14 4962 7.7 15 5208 7.7 16 4755 7.9 17 4491 8.1 18 5732 8.2 19 5731 8.2 20 5040 8.2 21 6102 7.9 22 4904 7.3 23 5369 6.9 24 5578 6.6 25 4619 6.7 26 4731 6.9 27 5011 7.0 28 5299 7.1 29 4146 7.2 30 4625 7.1 31 4736 6.9 32 4219 7.0 33 5116 6.8 34 4205 6.4 35 4121 6.7 36 5103 6.6 37 4300 6.4 38 4578 6.3 39 3809 6.2 40 5526 6.5 41 4247 6.8 42 3830 6.8 43 4394 6.4 44 4826 6.1 45 4409 5.8 46 4569 6.1 47 4106 7.2 48 4794 7.3 49 3914 6.9 50 3793 6.1 51 4405 5.8 52 4022 6.2 53 4100 7.1 54 4788 7.7 55 3163 7.9 56 3585 7.7 57 3903 7.4 58 4178 7.5 59 3863 8.0 60 4187 8.1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Wman 3917.4 90.7 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1470.89 -460.04 -36.42 370.48 1468.11 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3917.3 892.7 4.388 4.89e-05 *** Wman 90.7 123.9 0.732 0.467 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 628.2 on 58 degrees of freedom Multiple R-squared: 0.009151, Adjusted R-squared: -0.007933 F-statistic: 0.5357 on 1 and 58 DF, p-value: 0.4672 > 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.17431225 0.34862451 0.82568775 [2,] 0.09578099 0.19156197 0.90421901 [3,] 0.04156540 0.08313079 0.95843460 [4,] 0.01768654 0.03537308 0.98231346 [5,] 0.08099198 0.16198397 0.91900802 [6,] 0.04339421 0.08678841 0.95660579 [7,] 0.27272538 0.54545076 0.72727462 [8,] 0.39638656 0.79277312 0.60361344 [9,] 0.34914767 0.69829535 0.65085233 [10,] 0.32241814 0.64483627 0.67758186 [11,] 0.35236793 0.70473586 0.64763207 [12,] 0.31271583 0.62543166 0.68728417 [13,] 0.26170321 0.52340642 0.73829679 [14,] 0.56226829 0.87546343 0.43773171 [15,] 0.71825529 0.56348941 0.28174471 [16,] 0.67642671 0.64714659 0.32357329 [17,] 0.91814813 0.16370374 0.08185187 [18,] 0.89998849 0.20002303 0.10001151 [19,] 0.92221505 0.15556991 0.07778495 [20,] 0.95397342 0.09205315 0.04602658 [21,] 0.93950100 0.12099800 0.06049900 [22,] 0.92157701 0.15684597 0.07842299 [23,] 0.91724279 0.16551442 0.08275721 [24,] 0.94745661 0.10508679 0.05254339 [25,] 0.94138516 0.11722968 0.05861484 [26,] 0.92633504 0.14732992 0.07366496 [27,] 0.91141146 0.17717707 0.08858854 [28,] 0.89327608 0.21344784 0.10672392 [29,] 0.91510589 0.16978823 0.08489411 [30,] 0.89714401 0.20571197 0.10285599 [31,] 0.87691575 0.24616849 0.12308425 [32,] 0.90243231 0.19513538 0.09756769 [33,] 0.86986667 0.26026666 0.13013333 [34,] 0.82941347 0.34117306 0.17058653 [35,] 0.84678650 0.30642701 0.15321350 [36,] 0.97013031 0.05973939 0.02986969 [37,] 0.95508043 0.08983914 0.04491957 [38,] 0.95230311 0.09539377 0.04769689 [39,] 0.92687572 0.14624856 0.07312428 [40,] 0.92526887 0.14946226 0.07473113 [41,] 0.88739898 0.22520204 0.11260102 [42,] 0.85947338 0.28105323 0.14052662 [43,] 0.80860553 0.38278894 0.19139447 [44,] 0.87362108 0.25275784 0.12637892 [45,] 0.82529043 0.34941914 0.17470957 [46,] 0.79647560 0.40704880 0.20352440 [47,] 0.70969441 0.58061118 0.29030559 [48,] 0.60883622 0.78232756 0.39116378 [49,] 0.48432512 0.96865024 0.51567488 [50,] 0.69119269 0.61761462 0.30880731 [51,] 0.88313433 0.23373133 0.11686567 > postscript(file="/var/www/html/rcomp/tmp/1ws5q1258655598.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/2qs5g1258655598.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/36mf31258655598.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/4o8qp1258655598.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/5iip21258655598.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 -730.03291 -856.75252 -459.61232 27.31758 -628.82261 -316.82261 7 8 9 10 11 12 -481.82261 -168.61232 621.38768 367.66807 1157.38768 994.38768 13 14 15 16 17 18 -443.68242 346.24748 592.24748 121.10729 -161.03291 1070.89699 19 20 21 22 23 24 1069.89699 378.89699 1468.10729 324.52788 825.80827 1062.01856 25 26 27 28 29 30 93.94846 187.80827 458.73817 737.66807 -424.40203 63.66807 31 32 33 34 35 36 192.80827 -333.26183 581.87837 -292.84124 -404.05154 587.01856 37 38 39 40 41 42 -197.84124 89.22886 -670.70105 1019.08866 -287.12163 -704.12163 43 44 45 46 47 48 -103.84124 355.36905 -34.42065 98.36905 -464.40203 214.52788 49 50 51 52 53 54 -629.19173 -677.63095 -38.42065 -457.70105 -461.33193 172.24748 55 56 57 58 59 60 -1470.89271 -1030.75252 -685.54222 -419.61232 -779.96281 -465.03291 > postscript(file="/var/www/html/rcomp/tmp/6qy981258655598.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 -730.03291 NA 1 -856.75252 -730.03291 2 -459.61232 -856.75252 3 27.31758 -459.61232 4 -628.82261 27.31758 5 -316.82261 -628.82261 6 -481.82261 -316.82261 7 -168.61232 -481.82261 8 621.38768 -168.61232 9 367.66807 621.38768 10 1157.38768 367.66807 11 994.38768 1157.38768 12 -443.68242 994.38768 13 346.24748 -443.68242 14 592.24748 346.24748 15 121.10729 592.24748 16 -161.03291 121.10729 17 1070.89699 -161.03291 18 1069.89699 1070.89699 19 378.89699 1069.89699 20 1468.10729 378.89699 21 324.52788 1468.10729 22 825.80827 324.52788 23 1062.01856 825.80827 24 93.94846 1062.01856 25 187.80827 93.94846 26 458.73817 187.80827 27 737.66807 458.73817 28 -424.40203 737.66807 29 63.66807 -424.40203 30 192.80827 63.66807 31 -333.26183 192.80827 32 581.87837 -333.26183 33 -292.84124 581.87837 34 -404.05154 -292.84124 35 587.01856 -404.05154 36 -197.84124 587.01856 37 89.22886 -197.84124 38 -670.70105 89.22886 39 1019.08866 -670.70105 40 -287.12163 1019.08866 41 -704.12163 -287.12163 42 -103.84124 -704.12163 43 355.36905 -103.84124 44 -34.42065 355.36905 45 98.36905 -34.42065 46 -464.40203 98.36905 47 214.52788 -464.40203 48 -629.19173 214.52788 49 -677.63095 -629.19173 50 -38.42065 -677.63095 51 -457.70105 -38.42065 52 -461.33193 -457.70105 53 172.24748 -461.33193 54 -1470.89271 172.24748 55 -1030.75252 -1470.89271 56 -685.54222 -1030.75252 57 -419.61232 -685.54222 58 -779.96281 -419.61232 59 -465.03291 -779.96281 60 NA -465.03291 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -856.75252 -730.03291 [2,] -459.61232 -856.75252 [3,] 27.31758 -459.61232 [4,] -628.82261 27.31758 [5,] -316.82261 -628.82261 [6,] -481.82261 -316.82261 [7,] -168.61232 -481.82261 [8,] 621.38768 -168.61232 [9,] 367.66807 621.38768 [10,] 1157.38768 367.66807 [11,] 994.38768 1157.38768 [12,] -443.68242 994.38768 [13,] 346.24748 -443.68242 [14,] 592.24748 346.24748 [15,] 121.10729 592.24748 [16,] -161.03291 121.10729 [17,] 1070.89699 -161.03291 [18,] 1069.89699 1070.89699 [19,] 378.89699 1069.89699 [20,] 1468.10729 378.89699 [21,] 324.52788 1468.10729 [22,] 825.80827 324.52788 [23,] 1062.01856 825.80827 [24,] 93.94846 1062.01856 [25,] 187.80827 93.94846 [26,] 458.73817 187.80827 [27,] 737.66807 458.73817 [28,] -424.40203 737.66807 [29,] 63.66807 -424.40203 [30,] 192.80827 63.66807 [31,] -333.26183 192.80827 [32,] 581.87837 -333.26183 [33,] -292.84124 581.87837 [34,] -404.05154 -292.84124 [35,] 587.01856 -404.05154 [36,] -197.84124 587.01856 [37,] 89.22886 -197.84124 [38,] -670.70105 89.22886 [39,] 1019.08866 -670.70105 [40,] -287.12163 1019.08866 [41,] -704.12163 -287.12163 [42,] -103.84124 -704.12163 [43,] 355.36905 -103.84124 [44,] -34.42065 355.36905 [45,] 98.36905 -34.42065 [46,] -464.40203 98.36905 [47,] 214.52788 -464.40203 [48,] -629.19173 214.52788 [49,] -677.63095 -629.19173 [50,] -38.42065 -677.63095 [51,] -457.70105 -38.42065 [52,] -461.33193 -457.70105 [53,] 172.24748 -461.33193 [54,] -1470.89271 172.24748 [55,] -1030.75252 -1470.89271 [56,] -685.54222 -1030.75252 [57,] -419.61232 -685.54222 [58,] -779.96281 -419.61232 [59,] -465.03291 -779.96281 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -856.75252 -730.03291 2 -459.61232 -856.75252 3 27.31758 -459.61232 4 -628.82261 27.31758 5 -316.82261 -628.82261 6 -481.82261 -316.82261 7 -168.61232 -481.82261 8 621.38768 -168.61232 9 367.66807 621.38768 10 1157.38768 367.66807 11 994.38768 1157.38768 12 -443.68242 994.38768 13 346.24748 -443.68242 14 592.24748 346.24748 15 121.10729 592.24748 16 -161.03291 121.10729 17 1070.89699 -161.03291 18 1069.89699 1070.89699 19 378.89699 1069.89699 20 1468.10729 378.89699 21 324.52788 1468.10729 22 825.80827 324.52788 23 1062.01856 825.80827 24 93.94846 1062.01856 25 187.80827 93.94846 26 458.73817 187.80827 27 737.66807 458.73817 28 -424.40203 737.66807 29 63.66807 -424.40203 30 192.80827 63.66807 31 -333.26183 192.80827 32 581.87837 -333.26183 33 -292.84124 581.87837 34 -404.05154 -292.84124 35 587.01856 -404.05154 36 -197.84124 587.01856 37 89.22886 -197.84124 38 -670.70105 89.22886 39 1019.08866 -670.70105 40 -287.12163 1019.08866 41 -704.12163 -287.12163 42 -103.84124 -704.12163 43 355.36905 -103.84124 44 -34.42065 355.36905 45 98.36905 -34.42065 46 -464.40203 98.36905 47 214.52788 -464.40203 48 -629.19173 214.52788 49 -677.63095 -629.19173 50 -38.42065 -677.63095 51 -457.70105 -38.42065 52 -461.33193 -457.70105 53 172.24748 -461.33193 54 -1470.89271 172.24748 55 -1030.75252 -1470.89271 56 -685.54222 -1030.75252 57 -419.61232 -685.54222 58 -779.96281 -419.61232 59 -465.03291 -779.96281 > 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/71t5e1258655598.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/8tr2m1258655598.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/9i2rs1258655598.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/10z2601258655598.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/114hpe1258655598.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/126llm1258655598.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/13a9ji1258655598.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/14rycm1258655598.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/151i4e1258655598.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/16ow191258655598.tab") + } > > system("convert tmp/1ws5q1258655598.ps tmp/1ws5q1258655598.png") > system("convert tmp/2qs5g1258655598.ps tmp/2qs5g1258655598.png") > system("convert tmp/36mf31258655598.ps tmp/36mf31258655598.png") > system("convert tmp/4o8qp1258655598.ps tmp/4o8qp1258655598.png") > system("convert tmp/5iip21258655598.ps tmp/5iip21258655598.png") > system("convert tmp/6qy981258655598.ps tmp/6qy981258655598.png") > system("convert tmp/71t5e1258655598.ps tmp/71t5e1258655598.png") > system("convert tmp/8tr2m1258655598.ps tmp/8tr2m1258655598.png") > system("convert tmp/9i2rs1258655598.ps tmp/9i2rs1258655598.png") > system("convert tmp/10z2601258655598.ps tmp/10z2601258655598.png") > > > proc.time() user system elapsed 2.559 1.621 3.373