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,1,3759,1,4138,1,4634,1,3996,1,4308,1,4143,1,4429,1,5219,1,4929,0,5755,1,5592,1,4163,1,4962,1,5208,1,4755,1,4491,1,5732,1,5731,1,5040,1,6102,1,4904,0,5369,0,5578,0,4619,0,4731,0,5011,0,5299,0,4146,0,4625,0,4736,0,4219,0,5116,0,4205,0,4121,0,5103,0,4300,0,4578,0,3809,0,5526,0,4247,0,3830,0,4394,0,4826,0,4409,0,4569,0,4106,0,4794,0,3914,0,3793,0,4405,0,4022,0,4100,0,4788,1,3163,1,3585,1,3903,1,4178,1,3863,1,4187,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 1 2 3759 1 3 4138 1 4 4634 1 5 3996 1 6 4308 1 7 4143 1 8 4429 1 9 5219 1 10 4929 0 11 5755 1 12 5592 1 13 4163 1 14 4962 1 15 5208 1 16 4755 1 17 4491 1 18 5732 1 19 5731 1 20 5040 1 21 6102 1 22 4904 0 23 5369 0 24 5578 0 25 4619 0 26 4731 0 27 5011 0 28 5299 0 29 4146 0 30 4625 0 31 4736 0 32 4219 0 33 5116 0 34 4205 0 35 4121 0 36 5103 0 37 4300 0 38 4578 0 39 3809 0 40 5526 0 41 4247 0 42 3830 0 43 4394 0 44 4826 0 45 4409 0 46 4569 0 47 4106 0 48 4794 0 49 3914 0 50 3793 0 51 4405 0 52 4022 0 53 4100 0 54 4788 1 55 3163 1 56 3585 1 57 3903 1 58 4178 1 59 3863 1 60 4187 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Wman 4555.55 27.64 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1420.2 -441.4 -119.4 398.0 1518.8 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4555.55 109.84 41.476 <2e-16 *** Wman 27.64 163.73 0.169 0.867 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 631 on 58 degrees of freedom Multiple R-squared: 0.0004911, Adjusted R-squared: -0.01674 F-statistic: 0.0285 on 1 and 58 DF, p-value: 0.8665 > 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.22616723 0.45233446 0.77383277 [2,] 0.12338994 0.24677988 0.87661006 [3,] 0.05682596 0.11365193 0.94317404 [4,] 0.03454102 0.06908205 0.96545898 [5,] 0.19513655 0.39027310 0.80486345 [6,] 0.12246495 0.24492990 0.87753505 [7,] 0.51394576 0.97210848 0.48605424 [8,] 0.68135225 0.63729549 0.31864775 [9,] 0.62072629 0.75854743 0.37927371 [10,] 0.56562757 0.86874486 0.43437243 [11,] 0.56053615 0.87892771 0.43946385 [12,] 0.47653333 0.95306666 0.52346667 [13,] 0.39133737 0.78267473 0.60866263 [14,] 0.57219227 0.85561546 0.42780773 [15,] 0.73562355 0.52875291 0.26437645 [16,] 0.71335539 0.57328921 0.28664461 [17,] 0.96312204 0.07375591 0.03687796 [18,] 0.94827726 0.10344548 0.05172274 [19,] 0.95342980 0.09314041 0.04657020 [20,] 0.97282257 0.05435486 0.02717743 [21,] 0.96465534 0.07068931 0.03534466 [22,] 0.95222854 0.09554293 0.04777146 [23,] 0.94430958 0.11138084 0.05569042 [24,] 0.95760360 0.08479280 0.04239640 [25,] 0.95846078 0.08307843 0.04153922 [26,] 0.94330440 0.11339120 0.05669560 [27,] 0.92610595 0.14778810 0.07389405 [28,] 0.91309504 0.17380993 0.08690496 [29,] 0.92286737 0.15426526 0.07713263 [30,] 0.90715264 0.18569473 0.09284736 [31,] 0.89329029 0.21341941 0.10670971 [32,] 0.90919165 0.18161671 0.09080835 [33,] 0.88040959 0.23918081 0.11959041 [34,] 0.84405488 0.31189024 0.15594512 [35,] 0.86328458 0.27343084 0.13671542 [36,] 0.97086382 0.05827236 0.02913618 [37,] 0.95620022 0.08759955 0.04379978 [38,] 0.95895214 0.08209572 0.04104786 [39,] 0.93651129 0.12697741 0.06348871 [40,] 0.93786038 0.12427923 0.06213962 [41,] 0.90849644 0.18300712 0.09150356 [42,] 0.88561822 0.22876356 0.11438178 [43,] 0.83803051 0.32393897 0.16196949 [44,] 0.87210533 0.25578933 0.12789467 [45,] 0.82458372 0.35083256 0.17541628 [46,] 0.79139242 0.41721516 0.20860758 [47,] 0.72059733 0.55880534 0.27940267 [48,] 0.61456689 0.77086623 0.38543311 [49,] 0.48622100 0.97244201 0.51377900 [50,] 0.69622777 0.60754446 0.30377223 [51,] 0.88341870 0.23316260 0.11658130 > postscript(file="/var/www/html/rcomp/tmp/1z4c61258656493.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/2o10p1258656493.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/3drgp1258656493.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/4ooho1258656493.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/5wagc1258656493.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 -661.18519 -824.18519 -445.18519 50.81481 -587.18519 -275.18519 7 8 9 10 11 12 -440.18519 -154.18519 635.81481 373.45455 1171.81481 1008.81481 13 14 15 16 17 18 -420.18519 378.81481 624.81481 171.81481 -92.18519 1148.81481 19 20 21 22 23 24 1147.81481 456.81481 1518.81481 348.45455 813.45455 1022.45455 25 26 27 28 29 30 63.45455 175.45455 455.45455 743.45455 -409.54545 69.45455 31 32 33 34 35 36 180.45455 -336.54545 560.45455 -350.54545 -434.54545 547.45455 37 38 39 40 41 42 -255.54545 22.45455 -746.54545 970.45455 -308.54545 -725.54545 43 44 45 46 47 48 -161.54545 270.45455 -146.54545 13.45455 -449.54545 238.45455 49 50 51 52 53 54 -641.54545 -762.54545 -150.54545 -533.54545 -455.54545 204.81481 55 56 57 58 59 60 -1420.18519 -998.18519 -680.18519 -405.18519 -720.18519 -396.18519 > postscript(file="/var/www/html/rcomp/tmp/6y7h71258656493.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 -661.18519 NA 1 -824.18519 -661.18519 2 -445.18519 -824.18519 3 50.81481 -445.18519 4 -587.18519 50.81481 5 -275.18519 -587.18519 6 -440.18519 -275.18519 7 -154.18519 -440.18519 8 635.81481 -154.18519 9 373.45455 635.81481 10 1171.81481 373.45455 11 1008.81481 1171.81481 12 -420.18519 1008.81481 13 378.81481 -420.18519 14 624.81481 378.81481 15 171.81481 624.81481 16 -92.18519 171.81481 17 1148.81481 -92.18519 18 1147.81481 1148.81481 19 456.81481 1147.81481 20 1518.81481 456.81481 21 348.45455 1518.81481 22 813.45455 348.45455 23 1022.45455 813.45455 24 63.45455 1022.45455 25 175.45455 63.45455 26 455.45455 175.45455 27 743.45455 455.45455 28 -409.54545 743.45455 29 69.45455 -409.54545 30 180.45455 69.45455 31 -336.54545 180.45455 32 560.45455 -336.54545 33 -350.54545 560.45455 34 -434.54545 -350.54545 35 547.45455 -434.54545 36 -255.54545 547.45455 37 22.45455 -255.54545 38 -746.54545 22.45455 39 970.45455 -746.54545 40 -308.54545 970.45455 41 -725.54545 -308.54545 42 -161.54545 -725.54545 43 270.45455 -161.54545 44 -146.54545 270.45455 45 13.45455 -146.54545 46 -449.54545 13.45455 47 238.45455 -449.54545 48 -641.54545 238.45455 49 -762.54545 -641.54545 50 -150.54545 -762.54545 51 -533.54545 -150.54545 52 -455.54545 -533.54545 53 204.81481 -455.54545 54 -1420.18519 204.81481 55 -998.18519 -1420.18519 56 -680.18519 -998.18519 57 -405.18519 -680.18519 58 -720.18519 -405.18519 59 -396.18519 -720.18519 60 NA -396.18519 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -824.18519 -661.18519 [2,] -445.18519 -824.18519 [3,] 50.81481 -445.18519 [4,] -587.18519 50.81481 [5,] -275.18519 -587.18519 [6,] -440.18519 -275.18519 [7,] -154.18519 -440.18519 [8,] 635.81481 -154.18519 [9,] 373.45455 635.81481 [10,] 1171.81481 373.45455 [11,] 1008.81481 1171.81481 [12,] -420.18519 1008.81481 [13,] 378.81481 -420.18519 [14,] 624.81481 378.81481 [15,] 171.81481 624.81481 [16,] -92.18519 171.81481 [17,] 1148.81481 -92.18519 [18,] 1147.81481 1148.81481 [19,] 456.81481 1147.81481 [20,] 1518.81481 456.81481 [21,] 348.45455 1518.81481 [22,] 813.45455 348.45455 [23,] 1022.45455 813.45455 [24,] 63.45455 1022.45455 [25,] 175.45455 63.45455 [26,] 455.45455 175.45455 [27,] 743.45455 455.45455 [28,] -409.54545 743.45455 [29,] 69.45455 -409.54545 [30,] 180.45455 69.45455 [31,] -336.54545 180.45455 [32,] 560.45455 -336.54545 [33,] -350.54545 560.45455 [34,] -434.54545 -350.54545 [35,] 547.45455 -434.54545 [36,] -255.54545 547.45455 [37,] 22.45455 -255.54545 [38,] -746.54545 22.45455 [39,] 970.45455 -746.54545 [40,] -308.54545 970.45455 [41,] -725.54545 -308.54545 [42,] -161.54545 -725.54545 [43,] 270.45455 -161.54545 [44,] -146.54545 270.45455 [45,] 13.45455 -146.54545 [46,] -449.54545 13.45455 [47,] 238.45455 -449.54545 [48,] -641.54545 238.45455 [49,] -762.54545 -641.54545 [50,] -150.54545 -762.54545 [51,] -533.54545 -150.54545 [52,] -455.54545 -533.54545 [53,] 204.81481 -455.54545 [54,] -1420.18519 204.81481 [55,] -998.18519 -1420.18519 [56,] -680.18519 -998.18519 [57,] -405.18519 -680.18519 [58,] -720.18519 -405.18519 [59,] -396.18519 -720.18519 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -824.18519 -661.18519 2 -445.18519 -824.18519 3 50.81481 -445.18519 4 -587.18519 50.81481 5 -275.18519 -587.18519 6 -440.18519 -275.18519 7 -154.18519 -440.18519 8 635.81481 -154.18519 9 373.45455 635.81481 10 1171.81481 373.45455 11 1008.81481 1171.81481 12 -420.18519 1008.81481 13 378.81481 -420.18519 14 624.81481 378.81481 15 171.81481 624.81481 16 -92.18519 171.81481 17 1148.81481 -92.18519 18 1147.81481 1148.81481 19 456.81481 1147.81481 20 1518.81481 456.81481 21 348.45455 1518.81481 22 813.45455 348.45455 23 1022.45455 813.45455 24 63.45455 1022.45455 25 175.45455 63.45455 26 455.45455 175.45455 27 743.45455 455.45455 28 -409.54545 743.45455 29 69.45455 -409.54545 30 180.45455 69.45455 31 -336.54545 180.45455 32 560.45455 -336.54545 33 -350.54545 560.45455 34 -434.54545 -350.54545 35 547.45455 -434.54545 36 -255.54545 547.45455 37 22.45455 -255.54545 38 -746.54545 22.45455 39 970.45455 -746.54545 40 -308.54545 970.45455 41 -725.54545 -308.54545 42 -161.54545 -725.54545 43 270.45455 -161.54545 44 -146.54545 270.45455 45 13.45455 -146.54545 46 -449.54545 13.45455 47 238.45455 -449.54545 48 -641.54545 238.45455 49 -762.54545 -641.54545 50 -150.54545 -762.54545 51 -533.54545 -150.54545 52 -455.54545 -533.54545 53 204.81481 -455.54545 54 -1420.18519 204.81481 55 -998.18519 -1420.18519 56 -680.18519 -998.18519 57 -405.18519 -680.18519 58 -720.18519 -405.18519 59 -396.18519 -720.18519 > 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/76eez1258656493.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/8prtk1258656493.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/9a5691258656493.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/10wmt51258656493.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/11qkt61258656493.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/12tu3s1258656493.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/130yqe1258656493.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/14haou1258656493.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/15wskt1258656493.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/16dhbv1258656493.tab") + } > > system("convert tmp/1z4c61258656493.ps tmp/1z4c61258656493.png") > system("convert tmp/2o10p1258656493.ps tmp/2o10p1258656493.png") > system("convert tmp/3drgp1258656493.ps tmp/3drgp1258656493.png") > system("convert tmp/4ooho1258656493.ps tmp/4ooho1258656493.png") > system("convert tmp/5wagc1258656493.ps tmp/5wagc1258656493.png") > system("convert tmp/6y7h71258656493.ps tmp/6y7h71258656493.png") > system("convert tmp/76eez1258656493.ps tmp/76eez1258656493.png") > system("convert tmp/8prtk1258656493.ps tmp/8prtk1258656493.png") > system("convert tmp/9a5691258656493.ps tmp/9a5691258656493.png") > system("convert tmp/10wmt51258656493.ps tmp/10wmt51258656493.png") > > > proc.time() user system elapsed 2.483 1.584 2.911