R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(91.2,0,99.2,0,108.2,0,101.5,0,106.9,0,104.4,0,77.9,0,60,0,99.5,0,95,0,105.6,0,102.5,0,93.3,0,97.3,0,127,0,111.7,0,96.4,0,133,0,72.2,0,95.8,0,124.1,0,127.6,0,110.7,0,104.6,0,112.7,0,115.3,0,139.4,0,119,0,97.4,0,154,0,81.5,0,88.8,0,127.7,1,105.1,1,114.9,1,106.4,1,104.5,1,121.6,1,141.4,1,99,1,126.7,1,134.1,1,81.3,1,88.6,1,132.7,1,132.9,1,134.4,1,103.7,1,119.7,1,115,1,132.9,1,108.5,1,113.9,1,142,1,97.7,1,92.2,1,128.8,1,134.9,1,128.2,1,114.8,1),dim=c(2,60),dimnames=list(c('transportmiddelen','conjunctuur'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('transportmiddelen','conjunctuur'),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 transportmiddelen conjunctuur 1 91.2 0 2 99.2 0 3 108.2 0 4 101.5 0 5 106.9 0 6 104.4 0 7 77.9 0 8 60.0 0 9 99.5 0 10 95.0 0 11 105.6 0 12 102.5 0 13 93.3 0 14 97.3 0 15 127.0 0 16 111.7 0 17 96.4 0 18 133.0 0 19 72.2 0 20 95.8 0 21 124.1 0 22 127.6 0 23 110.7 0 24 104.6 0 25 112.7 0 26 115.3 0 27 139.4 0 28 119.0 0 29 97.4 0 30 154.0 0 31 81.5 0 32 88.8 0 33 127.7 1 34 105.1 1 35 114.9 1 36 106.4 1 37 104.5 1 38 121.6 1 39 141.4 1 40 99.0 1 41 126.7 1 42 134.1 1 43 81.3 1 44 88.6 1 45 132.7 1 46 132.9 1 47 134.4 1 48 103.7 1 49 119.7 1 50 115.0 1 51 132.9 1 52 108.5 1 53 113.9 1 54 142.0 1 55 97.7 1 56 92.2 1 57 128.8 1 58 134.9 1 59 128.2 1 60 114.8 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) conjunctuur 104.80 12.47 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -44.803 -11.029 -1.337 12.196 49.197 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 104.803 3.206 32.689 <2e-16 *** conjunctuur 12.468 4.693 2.657 0.0102 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 18.14 on 58 degrees of freedom Multiple R-squared: 0.1085, Adjusted R-squared: 0.09311 F-statistic: 7.058 on 1 and 58 DF, p-value: 0.01018 > 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.08646819 0.17293637 0.9135318 [2,] 0.03053157 0.06106314 0.9694684 [3,] 0.14549592 0.29099183 0.8545041 [4,] 0.59327901 0.81344198 0.4067210 [5,] 0.48419417 0.96838834 0.5158058 [6,] 0.37753088 0.75506176 0.6224691 [7,] 0.31020121 0.62040242 0.6897988 [8,] 0.23538416 0.47076832 0.7646158 [9,] 0.17310170 0.34620340 0.8268983 [10,] 0.12097555 0.24195109 0.8790245 [11,] 0.24317174 0.48634348 0.7568283 [12,] 0.20791782 0.41583563 0.7920822 [13,] 0.15702590 0.31405180 0.8429741 [14,] 0.30644720 0.61289439 0.6935528 [15,] 0.47316430 0.94632859 0.5268357 [16,] 0.41794656 0.83589312 0.5820534 [17,] 0.45126999 0.90253999 0.5487300 [18,] 0.50517445 0.98965110 0.4948256 [19,] 0.43876354 0.87752708 0.5612365 [20,] 0.36907888 0.73815777 0.6309211 [21,] 0.31268899 0.62537798 0.6873110 [22,] 0.26684584 0.53369169 0.7331542 [23,] 0.42634169 0.85268337 0.5736583 [24,] 0.39118699 0.78237399 0.6088130 [25,] 0.33301619 0.66603238 0.6669838 [26,] 0.82865569 0.34268863 0.1713443 [27,] 0.81679604 0.36640793 0.1832040 [28,] 0.77925817 0.44148366 0.2207418 [29,] 0.73081173 0.53837654 0.2691883 [30,] 0.70108677 0.59782647 0.2989132 [31,] 0.63101740 0.73796519 0.3689826 [32,] 0.57839571 0.84320858 0.4216043 [33,] 0.53254528 0.93490945 0.4674547 [34,] 0.46133487 0.92266975 0.5386651 [35,] 0.51889825 0.96220350 0.4811017 [36,] 0.51526969 0.96946062 0.4847303 [37,] 0.45395946 0.90791893 0.5460405 [38,] 0.43764015 0.87528031 0.5623598 [39,] 0.67572016 0.64855968 0.3242798 [40,] 0.81058441 0.37883117 0.1894156 [41,] 0.78597510 0.42804980 0.2140249 [42,] 0.76132974 0.47734052 0.2386703 [43,] 0.75035020 0.49929960 0.2496498 [44,] 0.72305105 0.55389790 0.2769490 [45,] 0.62750300 0.74499400 0.3724970 [46,] 0.52393303 0.95213394 0.4760670 [47,] 0.47828865 0.95657731 0.5217113 [48,] 0.38929471 0.77858941 0.6107053 [49,] 0.27929795 0.55859590 0.7207021 [50,] 0.33542321 0.67084643 0.6645768 [51,] 0.33645220 0.67290440 0.6635478 > postscript(file="/var/www/html/rcomp/tmp/1bfpt1229093270.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/2l7m61229093270.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/3nkpd1229093270.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/4gyus1229093270.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/561wc1229093270.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 7 -13.603125 -5.603125 3.396875 -3.303125 2.096875 -0.403125 -26.903125 8 9 10 11 12 13 14 -44.803125 -5.303125 -9.803125 0.796875 -2.303125 -11.503125 -7.503125 15 16 17 18 19 20 21 22.196875 6.896875 -8.403125 28.196875 -32.603125 -9.003125 19.296875 22 23 24 25 26 27 28 22.796875 5.896875 -0.203125 7.896875 10.496875 34.596875 14.196875 29 30 31 32 33 34 35 -7.403125 49.196875 -23.303125 -16.003125 10.428571 -12.171429 -2.371429 36 37 38 39 40 41 42 -10.871429 -12.771429 4.328571 24.128571 -18.271429 9.428571 16.828571 43 44 45 46 47 48 49 -35.971429 -28.671429 15.428571 15.628571 17.128571 -13.571429 2.428571 50 51 52 53 54 55 56 -2.271429 15.628571 -8.771429 -3.371429 24.728571 -19.571429 -25.071429 57 58 59 60 11.528571 17.628571 10.928571 -2.471429 > postscript(file="/var/www/html/rcomp/tmp/60hdw1229093270.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 -13.603125 NA 1 -5.603125 -13.603125 2 3.396875 -5.603125 3 -3.303125 3.396875 4 2.096875 -3.303125 5 -0.403125 2.096875 6 -26.903125 -0.403125 7 -44.803125 -26.903125 8 -5.303125 -44.803125 9 -9.803125 -5.303125 10 0.796875 -9.803125 11 -2.303125 0.796875 12 -11.503125 -2.303125 13 -7.503125 -11.503125 14 22.196875 -7.503125 15 6.896875 22.196875 16 -8.403125 6.896875 17 28.196875 -8.403125 18 -32.603125 28.196875 19 -9.003125 -32.603125 20 19.296875 -9.003125 21 22.796875 19.296875 22 5.896875 22.796875 23 -0.203125 5.896875 24 7.896875 -0.203125 25 10.496875 7.896875 26 34.596875 10.496875 27 14.196875 34.596875 28 -7.403125 14.196875 29 49.196875 -7.403125 30 -23.303125 49.196875 31 -16.003125 -23.303125 32 10.428571 -16.003125 33 -12.171429 10.428571 34 -2.371429 -12.171429 35 -10.871429 -2.371429 36 -12.771429 -10.871429 37 4.328571 -12.771429 38 24.128571 4.328571 39 -18.271429 24.128571 40 9.428571 -18.271429 41 16.828571 9.428571 42 -35.971429 16.828571 43 -28.671429 -35.971429 44 15.428571 -28.671429 45 15.628571 15.428571 46 17.128571 15.628571 47 -13.571429 17.128571 48 2.428571 -13.571429 49 -2.271429 2.428571 50 15.628571 -2.271429 51 -8.771429 15.628571 52 -3.371429 -8.771429 53 24.728571 -3.371429 54 -19.571429 24.728571 55 -25.071429 -19.571429 56 11.528571 -25.071429 57 17.628571 11.528571 58 10.928571 17.628571 59 -2.471429 10.928571 60 NA -2.471429 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -5.603125 -13.603125 [2,] 3.396875 -5.603125 [3,] -3.303125 3.396875 [4,] 2.096875 -3.303125 [5,] -0.403125 2.096875 [6,] -26.903125 -0.403125 [7,] -44.803125 -26.903125 [8,] -5.303125 -44.803125 [9,] -9.803125 -5.303125 [10,] 0.796875 -9.803125 [11,] -2.303125 0.796875 [12,] -11.503125 -2.303125 [13,] -7.503125 -11.503125 [14,] 22.196875 -7.503125 [15,] 6.896875 22.196875 [16,] -8.403125 6.896875 [17,] 28.196875 -8.403125 [18,] -32.603125 28.196875 [19,] -9.003125 -32.603125 [20,] 19.296875 -9.003125 [21,] 22.796875 19.296875 [22,] 5.896875 22.796875 [23,] -0.203125 5.896875 [24,] 7.896875 -0.203125 [25,] 10.496875 7.896875 [26,] 34.596875 10.496875 [27,] 14.196875 34.596875 [28,] -7.403125 14.196875 [29,] 49.196875 -7.403125 [30,] -23.303125 49.196875 [31,] -16.003125 -23.303125 [32,] 10.428571 -16.003125 [33,] -12.171429 10.428571 [34,] -2.371429 -12.171429 [35,] -10.871429 -2.371429 [36,] -12.771429 -10.871429 [37,] 4.328571 -12.771429 [38,] 24.128571 4.328571 [39,] -18.271429 24.128571 [40,] 9.428571 -18.271429 [41,] 16.828571 9.428571 [42,] -35.971429 16.828571 [43,] -28.671429 -35.971429 [44,] 15.428571 -28.671429 [45,] 15.628571 15.428571 [46,] 17.128571 15.628571 [47,] -13.571429 17.128571 [48,] 2.428571 -13.571429 [49,] -2.271429 2.428571 [50,] 15.628571 -2.271429 [51,] -8.771429 15.628571 [52,] -3.371429 -8.771429 [53,] 24.728571 -3.371429 [54,] -19.571429 24.728571 [55,] -25.071429 -19.571429 [56,] 11.528571 -25.071429 [57,] 17.628571 11.528571 [58,] 10.928571 17.628571 [59,] -2.471429 10.928571 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -5.603125 -13.603125 2 3.396875 -5.603125 3 -3.303125 3.396875 4 2.096875 -3.303125 5 -0.403125 2.096875 6 -26.903125 -0.403125 7 -44.803125 -26.903125 8 -5.303125 -44.803125 9 -9.803125 -5.303125 10 0.796875 -9.803125 11 -2.303125 0.796875 12 -11.503125 -2.303125 13 -7.503125 -11.503125 14 22.196875 -7.503125 15 6.896875 22.196875 16 -8.403125 6.896875 17 28.196875 -8.403125 18 -32.603125 28.196875 19 -9.003125 -32.603125 20 19.296875 -9.003125 21 22.796875 19.296875 22 5.896875 22.796875 23 -0.203125 5.896875 24 7.896875 -0.203125 25 10.496875 7.896875 26 34.596875 10.496875 27 14.196875 34.596875 28 -7.403125 14.196875 29 49.196875 -7.403125 30 -23.303125 49.196875 31 -16.003125 -23.303125 32 10.428571 -16.003125 33 -12.171429 10.428571 34 -2.371429 -12.171429 35 -10.871429 -2.371429 36 -12.771429 -10.871429 37 4.328571 -12.771429 38 24.128571 4.328571 39 -18.271429 24.128571 40 9.428571 -18.271429 41 16.828571 9.428571 42 -35.971429 16.828571 43 -28.671429 -35.971429 44 15.428571 -28.671429 45 15.628571 15.428571 46 17.128571 15.628571 47 -13.571429 17.128571 48 2.428571 -13.571429 49 -2.271429 2.428571 50 15.628571 -2.271429 51 -8.771429 15.628571 52 -3.371429 -8.771429 53 24.728571 -3.371429 54 -19.571429 24.728571 55 -25.071429 -19.571429 56 11.528571 -25.071429 57 17.628571 11.528571 58 10.928571 17.628571 59 -2.471429 10.928571 > 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/7cbl21229093270.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/8tj3s1229093270.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/925691229093270.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/106tot1229093270.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/118ekp1229093270.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/12524i1229093270.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/13nfmn1229093270.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/14jsuy1229093270.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/15mw4q1229093270.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/16w9wq1229093270.tab") + } > > system("convert tmp/1bfpt1229093270.ps tmp/1bfpt1229093270.png") > system("convert tmp/2l7m61229093270.ps tmp/2l7m61229093270.png") > system("convert tmp/3nkpd1229093270.ps tmp/3nkpd1229093270.png") > system("convert tmp/4gyus1229093270.ps tmp/4gyus1229093270.png") > system("convert tmp/561wc1229093270.ps tmp/561wc1229093270.png") > system("convert tmp/60hdw1229093270.ps tmp/60hdw1229093270.png") > system("convert tmp/7cbl21229093270.ps tmp/7cbl21229093270.png") > system("convert tmp/8tj3s1229093270.ps tmp/8tj3s1229093270.png") > system("convert tmp/925691229093270.ps tmp/925691229093270.png") > system("convert tmp/106tot1229093270.ps tmp/106tot1229093270.png") > > > proc.time() user system elapsed 2.476 1.584 5.746