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(105.4,109.1,107.1,111.4,110.7,114.1,117.1,121.8,118.7,127.6,126.5,129.9,127.5,128,134.6,123.5,131.8,124,135.9,127.4,142.7,127.6,141.7,128.4,153.4,131.4,145,135.1,137.7,134,148.3,144.5,152.2,147.3,169.4,150.9,168.6,148.7,161.1,141.4,174.1,138.9,179,139.8,190.6,145.6,190,147.9,181.6,148.5,174.8,151.1,180.5,157.5,196.8,167.5,193.8,172.3,197,173.5,216.3,187.5,221.4,205.5,217.9,195.1,229.7,204.5,227.4,204.5,204.2,201.7,196.6,207,198.8,206.6,207.5,210.6,190.7,211.1,201.6,215,210.5,223.9,223.5,238.2,223.8,238.9,231.2,229.6,244,232.2,234.7,222.1,250.2,221.6,265.7,227.3,287.6,221,283.3,213.6,295.4,243.4,312.3,253.8,333.8,265.3,347.7,268.2,383.2,268.5,407.1,266.9,413.6,268.4,362.7,250.8,321.9,231.2,239.4,192),dim=c(2,61),dimnames=list(c('alg_indexcijfer_grondstoffen','indexcijfer_industr_grondstoffen'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('alg_indexcijfer_grondstoffen','indexcijfer_industr_grondstoffen'),1:61)) > 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 alg_indexcijfer_grondstoffen indexcijfer_industr_grondstoffen 1 105.4 109.1 2 107.1 111.4 3 110.7 114.1 4 117.1 121.8 5 118.7 127.6 6 126.5 129.9 7 127.5 128.0 8 134.6 123.5 9 131.8 124.0 10 135.9 127.4 11 142.7 127.6 12 141.7 128.4 13 153.4 131.4 14 145.0 135.1 15 137.7 134.0 16 148.3 144.5 17 152.2 147.3 18 169.4 150.9 19 168.6 148.7 20 161.1 141.4 21 174.1 138.9 22 179.0 139.8 23 190.6 145.6 24 190.0 147.9 25 181.6 148.5 26 174.8 151.1 27 180.5 157.5 28 196.8 167.5 29 193.8 172.3 30 197.0 173.5 31 216.3 187.5 32 221.4 205.5 33 217.9 195.1 34 229.7 204.5 35 227.4 204.5 36 204.2 201.7 37 196.6 207.0 38 198.8 206.6 39 207.5 210.6 40 190.7 211.1 41 201.6 215.0 42 210.5 223.9 43 223.5 238.2 44 223.8 238.9 45 231.2 229.6 46 244.0 232.2 47 234.7 222.1 48 250.2 221.6 49 265.7 227.3 50 287.6 221.0 51 283.3 213.6 52 295.4 243.4 53 312.3 253.8 54 333.8 265.3 55 347.7 268.2 56 383.2 268.5 57 407.1 266.9 58 413.6 268.4 59 362.7 250.8 60 321.9 231.2 61 239.4 192.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) indexcijfer_industr_grondstoffen -46.020 1.395 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -63.356 -11.781 1.052 10.766 85.303 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -46.01961 15.70882 -2.93 0.00482 ** indexcijfer_industr_grondstoffen 1.39462 0.08287 16.83 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 31.53 on 59 degrees of freedom Multiple R-squared: 0.8276, Adjusted R-squared: 0.8247 F-statistic: 283.2 on 1 and 59 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,] 9.793666e-05 1.958733e-04 0.99990206 [2,] 3.340774e-05 6.681548e-05 0.99996659 [3,] 1.146165e-05 2.292330e-05 0.99998854 [4,] 1.939369e-04 3.878739e-04 0.99980606 [5,] 8.782845e-05 1.756569e-04 0.99991217 [6,] 3.128374e-05 6.256747e-05 0.99996872 [7,] 2.644598e-05 5.289196e-05 0.99997355 [8,] 1.049171e-05 2.098341e-05 0.99998951 [9,] 9.441156e-06 1.888231e-05 0.99999056 [10,] 2.163048e-06 4.326096e-06 0.99999784 [11,] 6.132861e-07 1.226572e-06 0.99999939 [12,] 2.442956e-07 4.885913e-07 0.99999976 [13,] 6.942939e-08 1.388588e-07 0.99999993 [14,] 1.883918e-08 3.767837e-08 0.99999998 [15,] 5.322403e-09 1.064481e-08 0.99999999 [16,] 1.844048e-09 3.688096e-09 1.00000000 [17,] 1.442299e-08 2.884598e-08 0.99999999 [18,] 7.766883e-08 1.553377e-07 0.99999992 [19,] 2.709662e-07 5.419324e-07 0.99999973 [20,] 3.248465e-07 6.496930e-07 0.99999968 [21,] 1.728413e-07 3.456826e-07 0.99999983 [22,] 8.015984e-08 1.603197e-07 0.99999992 [23,] 4.808303e-08 9.616605e-08 0.99999995 [24,] 3.207250e-08 6.414501e-08 0.99999997 [25,] 3.650605e-08 7.301210e-08 0.99999996 [26,] 3.487884e-08 6.975768e-08 0.99999997 [27,] 2.953982e-08 5.907963e-08 0.99999997 [28,] 6.521236e-08 1.304247e-07 0.99999993 [29,] 3.975272e-08 7.950543e-08 0.99999996 [30,] 1.935990e-08 3.871981e-08 0.99999998 [31,] 9.526800e-09 1.905360e-08 0.99999999 [32,] 1.643103e-08 3.286205e-08 0.99999998 [33,] 7.723959e-08 1.544792e-07 0.99999992 [34,] 1.167512e-07 2.335024e-07 0.99999988 [35,] 9.060007e-08 1.812001e-07 0.99999991 [36,] 3.019979e-07 6.039959e-07 0.99999970 [37,] 4.106477e-07 8.212955e-07 0.99999959 [38,] 8.124339e-07 1.624868e-06 0.99999919 [39,] 5.837747e-06 1.167549e-05 0.99999416 [40,] 9.320100e-05 1.864020e-04 0.99990680 [41,] 2.822010e-04 5.644020e-04 0.99971780 [42,] 9.265061e-04 1.853012e-03 0.99907349 [43,] 2.238012e-03 4.476024e-03 0.99776199 [44,] 3.958790e-03 7.917579e-03 0.99604121 [45,] 8.660064e-03 1.732013e-02 0.99133994 [46,] 1.790913e-02 3.581825e-02 0.98209087 [47,] 2.756706e-02 5.513413e-02 0.97243294 [48,] 4.653523e-02 9.307045e-02 0.95346477 [49,] 1.060465e-01 2.120931e-01 0.89395346 [50,] 3.257506e-01 6.515011e-01 0.67424943 [51,] 8.918004e-01 2.163992e-01 0.10819962 [52,] 9.870801e-01 2.583975e-02 0.01291988 > postscript(file="/var/www/html/rcomp/tmp/1fk831227788945.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/2vvye1227788945.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/36hjc1227788945.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/4guxu1227788945.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/5350g1227788945.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 = 61 Frequency = 1 1 2 3 4 5 6 -0.7337834 -2.2414169 -2.4068996 -6.7454986 -13.2343134 -8.6419469 7 8 9 10 11 12 -4.9921627 8.3836419 4.8863302 4.2446112 10.7656866 8.6499880 13 14 15 16 17 18 16.1661182 2.6060122 -3.1599022 -7.2034462 -7.2083913 4.9709650 19 20 21 22 23 24 7.2391361 9.9198858 26.4064439 30.0512830 33.5624682 29.7548347 25 26 27 28 29 30 20.5180608 10.0920403 6.8664516 9.2202192 -0.4739724 1.0524797 31 32 33 34 35 36 0.8277543 -19.1754641 -8.1713824 -9.4808408 -11.7808408 -31.0758958 37 38 39 40 41 42 -46.0673990 -43.3095497 -40.1880426 -57.6853543 -52.2243849 -55.7365318 43 44 45 46 47 48 -62.6796442 -63.3558804 -42.9858843 -33.8119047 -29.0262099 -12.8288983 49 50 51 52 53 54 -5.2782508 25.4078756 31.4280876 1.9683150 4.3642332 9.8260660 55 56 57 58 59 60 19.6816585 54.7632716 80.8946688 85.3027339 58.9481030 45.4827186 61 17.6519497 > postscript(file="/var/www/html/rcomp/tmp/6iak11227788945.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.7337834 NA 1 -2.2414169 -0.7337834 2 -2.4068996 -2.2414169 3 -6.7454986 -2.4068996 4 -13.2343134 -6.7454986 5 -8.6419469 -13.2343134 6 -4.9921627 -8.6419469 7 8.3836419 -4.9921627 8 4.8863302 8.3836419 9 4.2446112 4.8863302 10 10.7656866 4.2446112 11 8.6499880 10.7656866 12 16.1661182 8.6499880 13 2.6060122 16.1661182 14 -3.1599022 2.6060122 15 -7.2034462 -3.1599022 16 -7.2083913 -7.2034462 17 4.9709650 -7.2083913 18 7.2391361 4.9709650 19 9.9198858 7.2391361 20 26.4064439 9.9198858 21 30.0512830 26.4064439 22 33.5624682 30.0512830 23 29.7548347 33.5624682 24 20.5180608 29.7548347 25 10.0920403 20.5180608 26 6.8664516 10.0920403 27 9.2202192 6.8664516 28 -0.4739724 9.2202192 29 1.0524797 -0.4739724 30 0.8277543 1.0524797 31 -19.1754641 0.8277543 32 -8.1713824 -19.1754641 33 -9.4808408 -8.1713824 34 -11.7808408 -9.4808408 35 -31.0758958 -11.7808408 36 -46.0673990 -31.0758958 37 -43.3095497 -46.0673990 38 -40.1880426 -43.3095497 39 -57.6853543 -40.1880426 40 -52.2243849 -57.6853543 41 -55.7365318 -52.2243849 42 -62.6796442 -55.7365318 43 -63.3558804 -62.6796442 44 -42.9858843 -63.3558804 45 -33.8119047 -42.9858843 46 -29.0262099 -33.8119047 47 -12.8288983 -29.0262099 48 -5.2782508 -12.8288983 49 25.4078756 -5.2782508 50 31.4280876 25.4078756 51 1.9683150 31.4280876 52 4.3642332 1.9683150 53 9.8260660 4.3642332 54 19.6816585 9.8260660 55 54.7632716 19.6816585 56 80.8946688 54.7632716 57 85.3027339 80.8946688 58 58.9481030 85.3027339 59 45.4827186 58.9481030 60 17.6519497 45.4827186 61 NA 17.6519497 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.2414169 -0.7337834 [2,] -2.4068996 -2.2414169 [3,] -6.7454986 -2.4068996 [4,] -13.2343134 -6.7454986 [5,] -8.6419469 -13.2343134 [6,] -4.9921627 -8.6419469 [7,] 8.3836419 -4.9921627 [8,] 4.8863302 8.3836419 [9,] 4.2446112 4.8863302 [10,] 10.7656866 4.2446112 [11,] 8.6499880 10.7656866 [12,] 16.1661182 8.6499880 [13,] 2.6060122 16.1661182 [14,] -3.1599022 2.6060122 [15,] -7.2034462 -3.1599022 [16,] -7.2083913 -7.2034462 [17,] 4.9709650 -7.2083913 [18,] 7.2391361 4.9709650 [19,] 9.9198858 7.2391361 [20,] 26.4064439 9.9198858 [21,] 30.0512830 26.4064439 [22,] 33.5624682 30.0512830 [23,] 29.7548347 33.5624682 [24,] 20.5180608 29.7548347 [25,] 10.0920403 20.5180608 [26,] 6.8664516 10.0920403 [27,] 9.2202192 6.8664516 [28,] -0.4739724 9.2202192 [29,] 1.0524797 -0.4739724 [30,] 0.8277543 1.0524797 [31,] -19.1754641 0.8277543 [32,] -8.1713824 -19.1754641 [33,] -9.4808408 -8.1713824 [34,] -11.7808408 -9.4808408 [35,] -31.0758958 -11.7808408 [36,] -46.0673990 -31.0758958 [37,] -43.3095497 -46.0673990 [38,] -40.1880426 -43.3095497 [39,] -57.6853543 -40.1880426 [40,] -52.2243849 -57.6853543 [41,] -55.7365318 -52.2243849 [42,] -62.6796442 -55.7365318 [43,] -63.3558804 -62.6796442 [44,] -42.9858843 -63.3558804 [45,] -33.8119047 -42.9858843 [46,] -29.0262099 -33.8119047 [47,] -12.8288983 -29.0262099 [48,] -5.2782508 -12.8288983 [49,] 25.4078756 -5.2782508 [50,] 31.4280876 25.4078756 [51,] 1.9683150 31.4280876 [52,] 4.3642332 1.9683150 [53,] 9.8260660 4.3642332 [54,] 19.6816585 9.8260660 [55,] 54.7632716 19.6816585 [56,] 80.8946688 54.7632716 [57,] 85.3027339 80.8946688 [58,] 58.9481030 85.3027339 [59,] 45.4827186 58.9481030 [60,] 17.6519497 45.4827186 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.2414169 -0.7337834 2 -2.4068996 -2.2414169 3 -6.7454986 -2.4068996 4 -13.2343134 -6.7454986 5 -8.6419469 -13.2343134 6 -4.9921627 -8.6419469 7 8.3836419 -4.9921627 8 4.8863302 8.3836419 9 4.2446112 4.8863302 10 10.7656866 4.2446112 11 8.6499880 10.7656866 12 16.1661182 8.6499880 13 2.6060122 16.1661182 14 -3.1599022 2.6060122 15 -7.2034462 -3.1599022 16 -7.2083913 -7.2034462 17 4.9709650 -7.2083913 18 7.2391361 4.9709650 19 9.9198858 7.2391361 20 26.4064439 9.9198858 21 30.0512830 26.4064439 22 33.5624682 30.0512830 23 29.7548347 33.5624682 24 20.5180608 29.7548347 25 10.0920403 20.5180608 26 6.8664516 10.0920403 27 9.2202192 6.8664516 28 -0.4739724 9.2202192 29 1.0524797 -0.4739724 30 0.8277543 1.0524797 31 -19.1754641 0.8277543 32 -8.1713824 -19.1754641 33 -9.4808408 -8.1713824 34 -11.7808408 -9.4808408 35 -31.0758958 -11.7808408 36 -46.0673990 -31.0758958 37 -43.3095497 -46.0673990 38 -40.1880426 -43.3095497 39 -57.6853543 -40.1880426 40 -52.2243849 -57.6853543 41 -55.7365318 -52.2243849 42 -62.6796442 -55.7365318 43 -63.3558804 -62.6796442 44 -42.9858843 -63.3558804 45 -33.8119047 -42.9858843 46 -29.0262099 -33.8119047 47 -12.8288983 -29.0262099 48 -5.2782508 -12.8288983 49 25.4078756 -5.2782508 50 31.4280876 25.4078756 51 1.9683150 31.4280876 52 4.3642332 1.9683150 53 9.8260660 4.3642332 54 19.6816585 9.8260660 55 54.7632716 19.6816585 56 80.8946688 54.7632716 57 85.3027339 80.8946688 58 58.9481030 85.3027339 59 45.4827186 58.9481030 60 17.6519497 45.4827186 > 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/7e6nc1227788945.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/8sjqh1227788945.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/9esyx1227788945.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/106dia1227788945.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/11xdtk1227788945.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/12uuf91227788945.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/13fx0t1227788945.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/14g1271227788945.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/15daze1227788945.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/16vgkr1227788945.tab") + } > > system("convert tmp/1fk831227788945.ps tmp/1fk831227788945.png") > system("convert tmp/2vvye1227788945.ps tmp/2vvye1227788945.png") > system("convert tmp/36hjc1227788945.ps tmp/36hjc1227788945.png") > system("convert tmp/4guxu1227788945.ps tmp/4guxu1227788945.png") > system("convert tmp/5350g1227788945.ps tmp/5350g1227788945.png") > system("convert tmp/6iak11227788945.ps tmp/6iak11227788945.png") > system("convert tmp/7e6nc1227788945.ps tmp/7e6nc1227788945.png") > system("convert tmp/8sjqh1227788945.ps tmp/8sjqh1227788945.png") > system("convert tmp/9esyx1227788945.ps tmp/9esyx1227788945.png") > system("convert tmp/106dia1227788945.ps tmp/106dia1227788945.png") > > > proc.time() user system elapsed 2.702 1.679 4.093