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(612613,0,611324,0,594167,0,595454,0,590865,0,589379,0,584428,0,573100,0,567456,0,569028,0,620735,0,628884,0,628232,0,612117,0,595404,0,597141,0,593408,0,590072,0,579799,0,574205,0,572775,0,572942,0,619567,0,625809,0,619916,0,587625,0,565742,0,557274,0,560576,1,548854,1,531673,1,525919,1,511038,1,498662,1,555362,1,564591,1,541657,1,527070,1,509846,1,514258,1,516922,1,507561,1,492622,1,490243,1,469357,1,477580,1,528379,1,533590,1,517945,1,506174,1,501866,1,516141,1,528222,1,532638,1,536322,1,536535,1,523597,1,536214,1,586570,1,596594,1),dim=c(2,60),dimnames=list(c('wlh','dummies'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('wlh','dummies'),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 = '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 wlh dummies t 1 612613 0 1 2 611324 0 2 3 594167 0 3 4 595454 0 4 5 590865 0 5 6 589379 0 6 7 584428 0 7 8 573100 0 8 9 567456 0 9 10 569028 0 10 11 620735 0 11 12 628884 0 12 13 628232 0 13 14 612117 0 14 15 595404 0 15 16 597141 0 16 17 593408 0 17 18 590072 0 18 19 579799 0 19 20 574205 0 20 21 572775 0 21 22 572942 0 22 23 619567 0 23 24 625809 0 24 25 619916 0 25 26 587625 0 26 27 565742 0 27 28 557274 0 28 29 560576 1 29 30 548854 1 30 31 531673 1 31 32 525919 1 32 33 511038 1 33 34 498662 1 34 35 555362 1 35 36 564591 1 36 37 541657 1 37 38 527070 1 38 39 509846 1 39 40 514258 1 40 41 516922 1 41 42 507561 1 42 43 492622 1 43 44 490243 1 44 45 469357 1 45 46 477580 1 46 47 528379 1 47 48 533590 1 48 49 517945 1 49 50 506174 1 50 51 501866 1 51 52 516141 1 52 53 528222 1 53 54 532638 1 54 55 536322 1 55 56 536535 1 56 57 523597 1 57 58 536214 1 58 59 586570 1 59 60 596594 1 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) dummies t 593211.20 -69585.66 48.15 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -56435.14 -18529.74 65.54 16691.66 70079.67 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 593211.20 7221.91 82.140 < 2e-16 *** dummies -69585.66 12981.86 -5.360 1.56e-06 *** t 48.15 373.97 0.129 0.898 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25240 on 57 degrees of freedom Multiple R-squared: 0.6563, Adjusted R-squared: 0.6443 F-statistic: 54.43 on 2 and 57 DF, p-value: 6.021e-14 > 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.168816e-02 2.337633e-02 0.9883118 [2,] 2.145462e-03 4.290924e-03 0.9978545 [3,] 4.733131e-04 9.466261e-04 0.9995267 [4,] 9.067516e-05 1.813503e-04 0.9999093 [5,] 2.130261e-05 4.260522e-05 0.9999787 [6,] 1.150228e-01 2.300457e-01 0.8849772 [7,] 2.931810e-01 5.863621e-01 0.7068190 [8,] 3.517148e-01 7.034296e-01 0.6482852 [9,] 2.808145e-01 5.616291e-01 0.7191855 [10,] 2.135492e-01 4.270983e-01 0.7864508 [11,] 1.547522e-01 3.095044e-01 0.8452478 [12,] 1.105949e-01 2.211897e-01 0.8894051 [13,] 7.811422e-02 1.562284e-01 0.9218858 [14,] 6.246773e-02 1.249355e-01 0.9375323 [15,] 5.264022e-02 1.052804e-01 0.9473598 [16,] 4.215437e-02 8.430874e-02 0.9578456 [17,] 3.168145e-02 6.336289e-02 0.9683186 [18,] 4.500090e-02 9.000179e-02 0.9549991 [19,] 7.097286e-02 1.419457e-01 0.9290271 [20,] 8.660276e-02 1.732055e-01 0.9133972 [21,] 6.811620e-02 1.362324e-01 0.9318838 [22,] 6.950569e-02 1.390114e-01 0.9304943 [23,] 7.546460e-02 1.509292e-01 0.9245354 [24,] 7.619426e-02 1.523885e-01 0.9238057 [25,] 7.186965e-02 1.437393e-01 0.9281304 [26,] 6.318355e-02 1.263671e-01 0.9368165 [27,] 5.251188e-02 1.050238e-01 0.9474881 [28,] 4.688053e-02 9.376105e-02 0.9531195 [29,] 4.839476e-02 9.678952e-02 0.9516052 [30,] 7.659627e-02 1.531925e-01 0.9234037 [31,] 2.187569e-01 4.375138e-01 0.7812431 [32,] 3.153332e-01 6.306664e-01 0.6846668 [33,] 3.798554e-01 7.597109e-01 0.6201446 [34,] 3.923518e-01 7.847035e-01 0.6076482 [35,] 4.288390e-01 8.576780e-01 0.5711610 [36,] 5.153146e-01 9.693707e-01 0.4846854 [37,] 5.673326e-01 8.653347e-01 0.4326674 [38,] 5.547208e-01 8.905583e-01 0.4452792 [39,] 5.163552e-01 9.672895e-01 0.4836448 [40,] 5.667162e-01 8.665676e-01 0.4332838 [41,] 5.799042e-01 8.401915e-01 0.4200958 [42,] 6.087143e-01 7.825714e-01 0.3912857 [43,] 7.588532e-01 4.822937e-01 0.2411468 [44,] 7.750503e-01 4.498995e-01 0.2249497 [45,] 6.972812e-01 6.054376e-01 0.3027188 [46,] 5.783092e-01 8.433815e-01 0.4216908 [47,] 4.562163e-01 9.124327e-01 0.5437837 [48,] 3.826353e-01 7.652706e-01 0.6173647 [49,] 3.361381e-01 6.722761e-01 0.6638619 > postscript(file="/var/www/html/rcomp/tmp/105wt1262208238.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/2eowy1262208238.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/383xe1262208238.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/4ivig1262208238.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/5xiu91262208238.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 19353.6569 18016.5103 811.3638 2050.2173 -2586.9293 -4121.0758 7 8 9 10 11 12 -9120.2224 -20496.3689 -26188.5154 -24664.6620 26994.1915 35095.0449 13 14 15 16 17 18 34394.8984 18231.7518 1470.6053 3159.4588 -621.6878 -4005.8343 19 20 21 22 23 24 -14326.9809 -19969.1274 -21447.2740 -21328.4205 25248.4330 31442.2864 25 26 27 28 29 30 25501.1399 -6838.0067 -28769.1532 -37285.2997 35554.2089 23784.0624 31 32 33 34 35 36 6554.9158 752.7693 -14176.3773 -26600.5238 30051.3297 39232.1831 37 38 39 40 41 42 16250.0366 1614.8900 -15657.2565 -11293.4031 -8677.5496 -18086.6961 43 44 45 46 47 48 -33073.8427 -35500.9892 -56435.1358 -48260.2823 2490.5711 7653.4246 49 50 51 52 53 54 -8039.7219 -19858.8685 -24215.0150 -9988.1616 2044.6919 6412.5453 55 56 57 58 59 60 10048.3988 10213.2523 -2772.8943 9795.9592 60103.8126 70079.6661 > postscript(file="/var/www/html/rcomp/tmp/6q20x1262208238.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 19353.6569 NA 1 18016.5103 19353.6569 2 811.3638 18016.5103 3 2050.2173 811.3638 4 -2586.9293 2050.2173 5 -4121.0758 -2586.9293 6 -9120.2224 -4121.0758 7 -20496.3689 -9120.2224 8 -26188.5154 -20496.3689 9 -24664.6620 -26188.5154 10 26994.1915 -24664.6620 11 35095.0449 26994.1915 12 34394.8984 35095.0449 13 18231.7518 34394.8984 14 1470.6053 18231.7518 15 3159.4588 1470.6053 16 -621.6878 3159.4588 17 -4005.8343 -621.6878 18 -14326.9809 -4005.8343 19 -19969.1274 -14326.9809 20 -21447.2740 -19969.1274 21 -21328.4205 -21447.2740 22 25248.4330 -21328.4205 23 31442.2864 25248.4330 24 25501.1399 31442.2864 25 -6838.0067 25501.1399 26 -28769.1532 -6838.0067 27 -37285.2997 -28769.1532 28 35554.2089 -37285.2997 29 23784.0624 35554.2089 30 6554.9158 23784.0624 31 752.7693 6554.9158 32 -14176.3773 752.7693 33 -26600.5238 -14176.3773 34 30051.3297 -26600.5238 35 39232.1831 30051.3297 36 16250.0366 39232.1831 37 1614.8900 16250.0366 38 -15657.2565 1614.8900 39 -11293.4031 -15657.2565 40 -8677.5496 -11293.4031 41 -18086.6961 -8677.5496 42 -33073.8427 -18086.6961 43 -35500.9892 -33073.8427 44 -56435.1358 -35500.9892 45 -48260.2823 -56435.1358 46 2490.5711 -48260.2823 47 7653.4246 2490.5711 48 -8039.7219 7653.4246 49 -19858.8685 -8039.7219 50 -24215.0150 -19858.8685 51 -9988.1616 -24215.0150 52 2044.6919 -9988.1616 53 6412.5453 2044.6919 54 10048.3988 6412.5453 55 10213.2523 10048.3988 56 -2772.8943 10213.2523 57 9795.9592 -2772.8943 58 60103.8126 9795.9592 59 70079.6661 60103.8126 60 NA 70079.6661 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 18016.5103 19353.6569 [2,] 811.3638 18016.5103 [3,] 2050.2173 811.3638 [4,] -2586.9293 2050.2173 [5,] -4121.0758 -2586.9293 [6,] -9120.2224 -4121.0758 [7,] -20496.3689 -9120.2224 [8,] -26188.5154 -20496.3689 [9,] -24664.6620 -26188.5154 [10,] 26994.1915 -24664.6620 [11,] 35095.0449 26994.1915 [12,] 34394.8984 35095.0449 [13,] 18231.7518 34394.8984 [14,] 1470.6053 18231.7518 [15,] 3159.4588 1470.6053 [16,] -621.6878 3159.4588 [17,] -4005.8343 -621.6878 [18,] -14326.9809 -4005.8343 [19,] -19969.1274 -14326.9809 [20,] -21447.2740 -19969.1274 [21,] -21328.4205 -21447.2740 [22,] 25248.4330 -21328.4205 [23,] 31442.2864 25248.4330 [24,] 25501.1399 31442.2864 [25,] -6838.0067 25501.1399 [26,] -28769.1532 -6838.0067 [27,] -37285.2997 -28769.1532 [28,] 35554.2089 -37285.2997 [29,] 23784.0624 35554.2089 [30,] 6554.9158 23784.0624 [31,] 752.7693 6554.9158 [32,] -14176.3773 752.7693 [33,] -26600.5238 -14176.3773 [34,] 30051.3297 -26600.5238 [35,] 39232.1831 30051.3297 [36,] 16250.0366 39232.1831 [37,] 1614.8900 16250.0366 [38,] -15657.2565 1614.8900 [39,] -11293.4031 -15657.2565 [40,] -8677.5496 -11293.4031 [41,] -18086.6961 -8677.5496 [42,] -33073.8427 -18086.6961 [43,] -35500.9892 -33073.8427 [44,] -56435.1358 -35500.9892 [45,] -48260.2823 -56435.1358 [46,] 2490.5711 -48260.2823 [47,] 7653.4246 2490.5711 [48,] -8039.7219 7653.4246 [49,] -19858.8685 -8039.7219 [50,] -24215.0150 -19858.8685 [51,] -9988.1616 -24215.0150 [52,] 2044.6919 -9988.1616 [53,] 6412.5453 2044.6919 [54,] 10048.3988 6412.5453 [55,] 10213.2523 10048.3988 [56,] -2772.8943 10213.2523 [57,] 9795.9592 -2772.8943 [58,] 60103.8126 9795.9592 [59,] 70079.6661 60103.8126 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 18016.5103 19353.6569 2 811.3638 18016.5103 3 2050.2173 811.3638 4 -2586.9293 2050.2173 5 -4121.0758 -2586.9293 6 -9120.2224 -4121.0758 7 -20496.3689 -9120.2224 8 -26188.5154 -20496.3689 9 -24664.6620 -26188.5154 10 26994.1915 -24664.6620 11 35095.0449 26994.1915 12 34394.8984 35095.0449 13 18231.7518 34394.8984 14 1470.6053 18231.7518 15 3159.4588 1470.6053 16 -621.6878 3159.4588 17 -4005.8343 -621.6878 18 -14326.9809 -4005.8343 19 -19969.1274 -14326.9809 20 -21447.2740 -19969.1274 21 -21328.4205 -21447.2740 22 25248.4330 -21328.4205 23 31442.2864 25248.4330 24 25501.1399 31442.2864 25 -6838.0067 25501.1399 26 -28769.1532 -6838.0067 27 -37285.2997 -28769.1532 28 35554.2089 -37285.2997 29 23784.0624 35554.2089 30 6554.9158 23784.0624 31 752.7693 6554.9158 32 -14176.3773 752.7693 33 -26600.5238 -14176.3773 34 30051.3297 -26600.5238 35 39232.1831 30051.3297 36 16250.0366 39232.1831 37 1614.8900 16250.0366 38 -15657.2565 1614.8900 39 -11293.4031 -15657.2565 40 -8677.5496 -11293.4031 41 -18086.6961 -8677.5496 42 -33073.8427 -18086.6961 43 -35500.9892 -33073.8427 44 -56435.1358 -35500.9892 45 -48260.2823 -56435.1358 46 2490.5711 -48260.2823 47 7653.4246 2490.5711 48 -8039.7219 7653.4246 49 -19858.8685 -8039.7219 50 -24215.0150 -19858.8685 51 -9988.1616 -24215.0150 52 2044.6919 -9988.1616 53 6412.5453 2044.6919 54 10048.3988 6412.5453 55 10213.2523 10048.3988 56 -2772.8943 10213.2523 57 9795.9592 -2772.8943 58 60103.8126 9795.9592 59 70079.6661 60103.8126 > 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/7csn51262208238.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/8cf041262208238.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/96it01262208238.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/10nywu1262208238.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/11e1sr1262208238.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/12o36d1262208238.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/137z0k1262208238.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/1448a91262208238.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/159e791262208238.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/16q8jw1262208239.tab") + } > > try(system("convert tmp/105wt1262208238.ps tmp/105wt1262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/2eowy1262208238.ps tmp/2eowy1262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/383xe1262208238.ps tmp/383xe1262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/4ivig1262208238.ps tmp/4ivig1262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/5xiu91262208238.ps tmp/5xiu91262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/6q20x1262208238.ps tmp/6q20x1262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/7csn51262208238.ps tmp/7csn51262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/8cf041262208238.ps tmp/8cf041262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/96it01262208238.ps tmp/96it01262208238.png",intern=TRUE)) character(0) > try(system("convert tmp/10nywu1262208238.ps tmp/10nywu1262208238.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.442 1.610 3.129