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(2756.76,0.86,2849.27,0.88,2921.44,0.88,2981.85,0.88,3080.58,0.87,3106.22,0.88,3119.31,0.87,3061.26,0.85,3097.31,0.84,3161.69,0.83,3257.16,0.86,3277.01,0.87,3295.32,0.85,3363.99,0.89,3494.17,0.98,3667.03,1.01,3813.06,1,3917.96,1.01,3895.51,1.05,3801.06,1,3570.12,0.99,3701.61,1.02,3862.27,1.11,3970.1,1.15,4138.52,1.18,4199.75,1.2,4290.89,1.22,4443.91,1.2,4502.64,1.23,4356.98,1.23,4591.27,1.21,4696.96,1.25,4621.4,1.2,4562.84,1.2,4202.52,1.21,4296.49,1.25,4435.23,1.23,4105.18,1.2,4116.68,1.18,3844.49,1.16,3720.98,1.12,3674.4,1.11,3857.62,1.1,3801.06,1.08,3504.37,1.01,3032.6,1.01,3047.03,0.99,2962.34,1.07,2197.82,1.13,2014.45,1.09,1862.83,0.95,1905.41,0.79,1810.99,0.73,1670.07,0.7,1864.44,0.65,2052.02,0.61,2029.6,0.53,2070.83,0.51,2293.41,0.41,2443.27,0.42),dim=c(2,60),dimnames=list(c('BEL20','Depositorente '),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('BEL20','Depositorente '),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 BEL20 Depositorente\r 1 2756.76 0.86 2 2849.27 0.88 3 2921.44 0.88 4 2981.85 0.88 5 3080.58 0.87 6 3106.22 0.88 7 3119.31 0.87 8 3061.26 0.85 9 3097.31 0.84 10 3161.69 0.83 11 3257.16 0.86 12 3277.01 0.87 13 3295.32 0.85 14 3363.99 0.89 15 3494.17 0.98 16 3667.03 1.01 17 3813.06 1.00 18 3917.96 1.01 19 3895.51 1.05 20 3801.06 1.00 21 3570.12 0.99 22 3701.61 1.02 23 3862.27 1.11 24 3970.10 1.15 25 4138.52 1.18 26 4199.75 1.20 27 4290.89 1.22 28 4443.91 1.20 29 4502.64 1.23 30 4356.98 1.23 31 4591.27 1.21 32 4696.96 1.25 33 4621.40 1.20 34 4562.84 1.20 35 4202.52 1.21 36 4296.49 1.25 37 4435.23 1.23 38 4105.18 1.20 39 4116.68 1.18 40 3844.49 1.16 41 3720.98 1.12 42 3674.40 1.11 43 3857.62 1.10 44 3801.06 1.08 45 3504.37 1.01 46 3032.60 1.01 47 3047.03 0.99 48 2962.34 1.07 49 2197.82 1.13 50 2014.45 1.09 51 1862.83 0.95 52 1905.41 0.79 53 1810.99 0.73 54 1670.07 0.70 55 1864.44 0.65 56 2052.02 0.61 57 2029.60 0.53 58 2070.83 0.51 59 2293.41 0.41 60 2443.27 0.42 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `Depositorente\r` 217.9 3217.8 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1710.8 -108.3 107.2 272.3 874.0 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 217.9 308.3 0.707 0.483 `Depositorente\r` 3217.8 307.6 10.461 5.68e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 504.1 on 58 degrees of freedom Multiple R-squared: 0.6536, Adjusted R-squared: 0.6476 F-statistic: 109.4 on 1 and 58 DF, p-value: 5.68e-15 > 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,] 2.154061e-02 4.308122e-02 0.9784593888 [2,] 7.847973e-03 1.569595e-02 0.9921520272 [3,] 4.189236e-03 8.378473e-03 0.9958107636 [4,] 1.443678e-03 2.887355e-03 0.9985563225 [5,] 3.886733e-04 7.773466e-04 0.9996113267 [6,] 1.003382e-04 2.006763e-04 0.9998996618 [7,] 8.193074e-05 1.638615e-04 0.9999180693 [8,] 7.674137e-05 1.534827e-04 0.9999232586 [9,] 4.090353e-05 8.180706e-05 0.9999590965 [10,] 7.088486e-05 1.417697e-04 0.9999291151 [11,] 4.873733e-05 9.747467e-05 0.9999512627 [12,] 2.009158e-05 4.018316e-05 0.9999799084 [13,] 1.285546e-05 2.571091e-05 0.9999871445 [14,] 7.997143e-06 1.599429e-05 0.9999920029 [15,] 2.599748e-06 5.199497e-06 0.9999974003 [16,] 9.916956e-07 1.983391e-06 0.9999990083 [17,] 3.258752e-07 6.517504e-07 0.9999996741 [18,] 1.034051e-07 2.068101e-07 0.9999998966 [19,] 7.108771e-08 1.421754e-07 0.9999999289 [20,] 3.935312e-08 7.870623e-08 0.9999999606 [21,] 1.318863e-08 2.637725e-08 0.9999999868 [22,] 4.107564e-09 8.215129e-09 0.9999999959 [23,] 1.165801e-09 2.331602e-09 0.9999999988 [24,] 5.451725e-10 1.090345e-09 0.9999999995 [25,] 1.944104e-10 3.888208e-10 0.9999999998 [26,] 5.664448e-11 1.132890e-10 0.9999999999 [27,] 5.642178e-11 1.128436e-10 0.9999999999 [28,] 4.061053e-11 8.122106e-11 1.0000000000 [29,] 6.885940e-11 1.377188e-10 0.9999999999 [30,] 7.719488e-11 1.543898e-10 0.9999999999 [31,] 5.605892e-11 1.121178e-10 0.9999999999 [32,] 5.501486e-11 1.100297e-10 0.9999999999 [33,] 4.488567e-11 8.977135e-11 1.0000000000 [34,] 5.340499e-11 1.068100e-10 0.9999999999 [35,] 6.147934e-11 1.229587e-10 0.9999999999 [36,] 1.569303e-10 3.138605e-10 0.9999999998 [37,] 3.393732e-10 6.787464e-10 0.9999999997 [38,] 9.102373e-10 1.820475e-09 0.9999999991 [39,] 5.019856e-09 1.003971e-08 0.9999999950 [40,] 1.282559e-07 2.565117e-07 0.9999998717 [41,] 5.775396e-06 1.155079e-05 0.9999942246 [42,] 2.397852e-04 4.795704e-04 0.9997602148 [43,] 1.031466e-02 2.062933e-02 0.9896853375 [44,] 6.454334e-01 7.091331e-01 0.3545665667 [45,] 9.751705e-01 4.965894e-02 0.0248294716 [46,] 9.977026e-01 4.594744e-03 0.0022973718 [47,] 9.993096e-01 1.380792e-03 0.0006903958 [48,] 9.996657e-01 6.686763e-04 0.0003343381 [49,] 9.991316e-01 1.736826e-03 0.0008684131 [50,] 9.967220e-01 6.555976e-03 0.0032779882 [51,] 9.828480e-01 3.430400e-02 0.0171519996 > postscript(file="/var/www/html/rcomp/tmp/1xb8v1258815043.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/2yfnl1258815043.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/3i9u01258815043.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/4skht1258815043.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/5func1258815043.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 -228.36758 -200.21278 -128.04278 -67.63278 63.27482 56.73722 7 8 9 10 11 12 102.00482 108.31002 176.53762 273.09522 272.03242 259.70482 13 14 15 16 17 18 342.37002 282.32962 122.91121 199.23840 377.44600 450.16840 19 20 21 22 23 24 299.00800 365.44600 166.68361 201.64080 72.70239 51.82199 25 26 27 28 29 30 123.70918 120.58398 147.36878 364.74398 326.94118 181.28118 31 32 33 34 35 36 479.92638 456.90598 542.23398 483.67398 91.17638 56.43598 37 38 39 40 41 42 259.53118 26.01398 101.86918 -105.96561 -100.76521 -115.16761 43 44 45 46 47 48 100.22999 108.02520 36.57840 -435.19160 -356.40639 -698.51720 49 50 51 52 53 54 -1656.10281 -1710.76241 -1411.89599 -854.47437 -755.82877 -800.21596 55 56 57 58 59 60 -444.95796 -128.66755 106.33326 211.91846 756.27447 873.95687 > postscript(file="/var/www/html/rcomp/tmp/62gjt1258815043.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 -228.36758 NA 1 -200.21278 -228.36758 2 -128.04278 -200.21278 3 -67.63278 -128.04278 4 63.27482 -67.63278 5 56.73722 63.27482 6 102.00482 56.73722 7 108.31002 102.00482 8 176.53762 108.31002 9 273.09522 176.53762 10 272.03242 273.09522 11 259.70482 272.03242 12 342.37002 259.70482 13 282.32962 342.37002 14 122.91121 282.32962 15 199.23840 122.91121 16 377.44600 199.23840 17 450.16840 377.44600 18 299.00800 450.16840 19 365.44600 299.00800 20 166.68361 365.44600 21 201.64080 166.68361 22 72.70239 201.64080 23 51.82199 72.70239 24 123.70918 51.82199 25 120.58398 123.70918 26 147.36878 120.58398 27 364.74398 147.36878 28 326.94118 364.74398 29 181.28118 326.94118 30 479.92638 181.28118 31 456.90598 479.92638 32 542.23398 456.90598 33 483.67398 542.23398 34 91.17638 483.67398 35 56.43598 91.17638 36 259.53118 56.43598 37 26.01398 259.53118 38 101.86918 26.01398 39 -105.96561 101.86918 40 -100.76521 -105.96561 41 -115.16761 -100.76521 42 100.22999 -115.16761 43 108.02520 100.22999 44 36.57840 108.02520 45 -435.19160 36.57840 46 -356.40639 -435.19160 47 -698.51720 -356.40639 48 -1656.10281 -698.51720 49 -1710.76241 -1656.10281 50 -1411.89599 -1710.76241 51 -854.47437 -1411.89599 52 -755.82877 -854.47437 53 -800.21596 -755.82877 54 -444.95796 -800.21596 55 -128.66755 -444.95796 56 106.33326 -128.66755 57 211.91846 106.33326 58 756.27447 211.91846 59 873.95687 756.27447 60 NA 873.95687 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -200.21278 -228.36758 [2,] -128.04278 -200.21278 [3,] -67.63278 -128.04278 [4,] 63.27482 -67.63278 [5,] 56.73722 63.27482 [6,] 102.00482 56.73722 [7,] 108.31002 102.00482 [8,] 176.53762 108.31002 [9,] 273.09522 176.53762 [10,] 272.03242 273.09522 [11,] 259.70482 272.03242 [12,] 342.37002 259.70482 [13,] 282.32962 342.37002 [14,] 122.91121 282.32962 [15,] 199.23840 122.91121 [16,] 377.44600 199.23840 [17,] 450.16840 377.44600 [18,] 299.00800 450.16840 [19,] 365.44600 299.00800 [20,] 166.68361 365.44600 [21,] 201.64080 166.68361 [22,] 72.70239 201.64080 [23,] 51.82199 72.70239 [24,] 123.70918 51.82199 [25,] 120.58398 123.70918 [26,] 147.36878 120.58398 [27,] 364.74398 147.36878 [28,] 326.94118 364.74398 [29,] 181.28118 326.94118 [30,] 479.92638 181.28118 [31,] 456.90598 479.92638 [32,] 542.23398 456.90598 [33,] 483.67398 542.23398 [34,] 91.17638 483.67398 [35,] 56.43598 91.17638 [36,] 259.53118 56.43598 [37,] 26.01398 259.53118 [38,] 101.86918 26.01398 [39,] -105.96561 101.86918 [40,] -100.76521 -105.96561 [41,] -115.16761 -100.76521 [42,] 100.22999 -115.16761 [43,] 108.02520 100.22999 [44,] 36.57840 108.02520 [45,] -435.19160 36.57840 [46,] -356.40639 -435.19160 [47,] -698.51720 -356.40639 [48,] -1656.10281 -698.51720 [49,] -1710.76241 -1656.10281 [50,] -1411.89599 -1710.76241 [51,] -854.47437 -1411.89599 [52,] -755.82877 -854.47437 [53,] -800.21596 -755.82877 [54,] -444.95796 -800.21596 [55,] -128.66755 -444.95796 [56,] 106.33326 -128.66755 [57,] 211.91846 106.33326 [58,] 756.27447 211.91846 [59,] 873.95687 756.27447 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -200.21278 -228.36758 2 -128.04278 -200.21278 3 -67.63278 -128.04278 4 63.27482 -67.63278 5 56.73722 63.27482 6 102.00482 56.73722 7 108.31002 102.00482 8 176.53762 108.31002 9 273.09522 176.53762 10 272.03242 273.09522 11 259.70482 272.03242 12 342.37002 259.70482 13 282.32962 342.37002 14 122.91121 282.32962 15 199.23840 122.91121 16 377.44600 199.23840 17 450.16840 377.44600 18 299.00800 450.16840 19 365.44600 299.00800 20 166.68361 365.44600 21 201.64080 166.68361 22 72.70239 201.64080 23 51.82199 72.70239 24 123.70918 51.82199 25 120.58398 123.70918 26 147.36878 120.58398 27 364.74398 147.36878 28 326.94118 364.74398 29 181.28118 326.94118 30 479.92638 181.28118 31 456.90598 479.92638 32 542.23398 456.90598 33 483.67398 542.23398 34 91.17638 483.67398 35 56.43598 91.17638 36 259.53118 56.43598 37 26.01398 259.53118 38 101.86918 26.01398 39 -105.96561 101.86918 40 -100.76521 -105.96561 41 -115.16761 -100.76521 42 100.22999 -115.16761 43 108.02520 100.22999 44 36.57840 108.02520 45 -435.19160 36.57840 46 -356.40639 -435.19160 47 -698.51720 -356.40639 48 -1656.10281 -698.51720 49 -1710.76241 -1656.10281 50 -1411.89599 -1710.76241 51 -854.47437 -1411.89599 52 -755.82877 -854.47437 53 -800.21596 -755.82877 54 -444.95796 -800.21596 55 -128.66755 -444.95796 56 106.33326 -128.66755 57 211.91846 106.33326 58 756.27447 211.91846 59 873.95687 756.27447 > 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/7j43z1258815043.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/8615g1258815043.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/9g4ep1258815043.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/107dff1258815043.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/11hcln1258815043.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/12f55l1258815043.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/13s5ha1258815043.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/14ytyl1258815043.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/150oem1258815043.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/164t6g1258815043.tab") + } > > system("convert tmp/1xb8v1258815043.ps tmp/1xb8v1258815043.png") > system("convert tmp/2yfnl1258815043.ps tmp/2yfnl1258815043.png") > system("convert tmp/3i9u01258815043.ps tmp/3i9u01258815043.png") > system("convert tmp/4skht1258815043.ps tmp/4skht1258815043.png") > system("convert tmp/5func1258815043.ps tmp/5func1258815043.png") > system("convert tmp/62gjt1258815043.ps tmp/62gjt1258815043.png") > system("convert tmp/7j43z1258815043.ps tmp/7j43z1258815043.png") > system("convert tmp/8615g1258815043.ps tmp/8615g1258815043.png") > system("convert tmp/9g4ep1258815043.ps tmp/9g4ep1258815043.png") > system("convert tmp/107dff1258815043.ps tmp/107dff1258815043.png") > > > proc.time() user system elapsed 2.481 1.575 3.277