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(2284 + ,41 + ,76403 + ,194493 + ,3160 + ,90 + ,108094 + ,530670 + ,4150 + ,136 + ,134759 + ,518365 + ,7285 + ,97 + ,188873 + ,491303 + ,1134 + ,63 + ,146216 + ,527021 + ,4658 + ,114 + ,156608 + ,233773 + ,2384 + ,77 + ,61348 + ,405972 + ,3748 + ,6 + ,50350 + ,652925 + ,5371 + ,47 + ,87720 + ,446211 + ,1285 + ,51 + ,99489 + ,341340 + ,9327 + ,85 + ,87419 + ,387699 + ,5565 + ,43 + ,94355 + ,493408 + ,1528 + ,32 + ,60326 + ,146494 + ,3122 + ,25 + ,94670 + ,414462 + ,7561 + ,77 + ,82425 + ,364304 + ,2675 + ,54 + ,59017 + ,355178 + ,13253 + ,251 + ,90829 + ,357760 + ,880 + ,15 + ,80791 + ,261216 + ,2053 + ,44 + ,100423 + ,397144 + ,1424 + ,73 + ,131116 + ,374943 + ,4036 + ,85 + ,100269 + ,424898 + ,3045 + ,49 + ,27330 + ,202055 + ,5119 + ,38 + ,39039 + ,378525 + ,1431 + ,35 + ,106885 + ,310768 + ,554 + ,9 + ,79285 + ,325738 + ,1975 + ,34 + ,118881 + ,394510 + ,1765 + ,20 + ,77623 + ,247060 + ,1012 + ,29 + ,114768 + ,368078 + ,810 + ,11 + ,74015 + ,236761 + ,1280 + ,52 + ,69465 + ,312378 + ,666 + ,13 + ,117869 + ,339836 + ,1380 + ,29 + ,60982 + ,347385 + ,4677 + ,66 + ,90131 + ,426280 + ,876 + ,33 + ,138971 + ,352850 + ,814 + ,15 + ,39625 + ,301881 + ,514 + ,15 + ,102725 + ,377516 + ,5692 + ,68 + ,64239 + ,357312 + ,3642 + ,100 + ,90262 + ,458343 + ,540 + ,13 + ,103960 + ,354228 + ,2099 + ,45 + ,106611 + ,308636 + ,567 + ,14 + ,103345 + ,386212 + ,2001 + ,36 + ,95551 + ,393343 + ,2949 + ,40 + ,82903 + ,378509 + ,2253 + ,68 + ,63593 + ,452469 + ,6533 + ,29 + ,126910 + ,364839 + ,1889 + ,43 + ,37527 + ,358649 + ,3055 + ,30 + ,60247 + ,376641 + ,272 + ,9 + ,112995 + ,429112 + ,1414 + ,22 + ,70184 + ,330546 + ,2564 + ,19 + ,130140 + ,403560 + ,1383 + ,9 + ,73221 + ,317892) + ,dim=c(4 + ,51) + ,dimnames=list(c('Costs' + ,'Orders' + ,'Dividends' + ,'Wealth') + ,1:51)) > y <- array(NA,dim=c(4,51),dimnames=list(c('Costs','Orders','Dividends','Wealth'),1:51)) > 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 = '4' > #'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 Wealth Costs Orders Dividends 1 194493 2284 41 76403 2 530670 3160 90 108094 3 518365 4150 136 134759 4 491303 7285 97 188873 5 527021 1134 63 146216 6 233773 4658 114 156608 7 405972 2384 77 61348 8 652925 3748 6 50350 9 446211 5371 47 87720 10 341340 1285 51 99489 11 387699 9327 85 87419 12 493408 5565 43 94355 13 146494 1528 32 60326 14 414462 3122 25 94670 15 364304 7561 77 82425 16 355178 2675 54 59017 17 357760 13253 251 90829 18 261216 880 15 80791 19 397144 2053 44 100423 20 374943 1424 73 131116 21 424898 4036 85 100269 22 202055 3045 49 27330 23 378525 5119 38 39039 24 310768 1431 35 106885 25 325738 554 9 79285 26 394510 1975 34 118881 27 247060 1765 20 77623 28 368078 1012 29 114768 29 236761 810 11 74015 30 312378 1280 52 69465 31 339836 666 13 117869 32 347385 1380 29 60982 33 426280 4677 66 90131 34 352850 876 33 138971 35 301881 814 15 39625 36 377516 514 15 102725 37 357312 5692 68 64239 38 458343 3642 100 90262 39 354228 540 13 103960 40 308636 2099 45 106611 41 386212 567 14 103345 42 393343 2001 36 95551 43 378509 2949 40 82903 44 452469 2253 68 63593 45 364839 6533 29 126910 46 358649 1889 43 37527 47 376641 3055 30 60247 48 429112 272 9 112995 49 330546 1414 22 70184 50 403560 2564 19 130140 51 317892 1383 9 73221 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Costs Orders Dividends 281385.616 9.226 -138.708 0.755 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -193024 -35932 2890 36862 299776 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.814e+05 3.943e+04 7.136 5.08e-09 *** Costs 9.226e+00 7.325e+00 1.259 0.214 Orders -1.387e+02 4.567e+02 -0.304 0.763 Dividends 7.551e-01 4.012e-01 1.882 0.066 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 88340 on 47 degrees of freedom Multiple R-squared: 0.1202, Adjusted R-squared: 0.06403 F-statistic: 2.14 on 3 and 47 DF, p-value: 0.1077 > 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.9970144 5.971194e-03 2.985597e-03 [2,] 0.9999938 1.244990e-05 6.224951e-06 [3,] 0.9999852 2.966353e-05 1.483177e-05 [4,] 0.9999679 6.421086e-05 3.210543e-05 [5,] 0.9999350 1.300870e-04 6.504349e-05 [6,] 0.9999299 1.402138e-04 7.010690e-05 [7,] 0.9999995 9.339763e-07 4.669882e-07 [8,] 0.9999990 2.061291e-06 1.030646e-06 [9,] 0.9999973 5.358236e-06 2.679118e-06 [10,] 0.9999925 1.500610e-05 7.503052e-06 [11,] 0.9999973 5.458876e-06 2.729438e-06 [12,] 0.9999975 4.971467e-06 2.485733e-06 [13,] 0.9999934 1.316748e-05 6.583738e-06 [14,] 0.9999877 2.465187e-05 1.232593e-05 [15,] 0.9999691 6.185011e-05 3.092505e-05 [16,] 0.9999960 7.904782e-06 3.952391e-06 [17,] 0.9999918 1.642479e-05 8.212394e-06 [18,] 0.9999909 1.812153e-05 9.060766e-06 [19,] 0.9999757 4.851045e-05 2.425522e-05 [20,] 0.9999374 1.251855e-04 6.259276e-05 [21,] 0.9999734 5.323415e-05 2.661708e-05 [22,] 0.9999288 1.424014e-04 7.120070e-05 [23,] 0.9999801 3.971380e-05 1.985690e-05 [24,] 0.9999853 2.933894e-05 1.466947e-05 [25,] 0.9999657 6.852150e-05 3.426075e-05 [26,] 0.9999031 1.937621e-04 9.688103e-05 [27,] 0.9997809 4.382008e-04 2.191004e-04 [28,] 0.9997829 4.341302e-04 2.170651e-04 [29,] 0.9994994 1.001233e-03 5.006164e-04 [30,] 0.9986274 2.745267e-03 1.372634e-03 [31,] 0.9967905 6.419054e-03 3.209527e-03 [32,] 0.9930634 1.387312e-02 6.936561e-03 [33,] 0.9847298 3.054034e-02 1.527017e-02 [34,] 0.9995927 8.145324e-04 4.072662e-04 [35,] 0.9983277 3.344514e-03 1.672257e-03 [36,] 0.9950984 9.803207e-03 4.901604e-03 [37,] 0.9842199 3.156027e-02 1.578013e-02 [38,] 0.9476615 1.046770e-01 5.233848e-02 > postscript(file="/var/www/html/rcomp/tmp/11b5u1291123098.ps",horizontal=F,onefile=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/2uk4x1291123098.ps",horizontal=F,onefile=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/3uk4x1291123098.ps",horizontal=F,onefile=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/4uk4x1291123098.ps",horizontal=F,onefile=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/5uk4x1291123098.ps",horizontal=F,onefile=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 = 51 Frequency = 1 1 2 3 4 5 6 -159967.108 150995.772 115803.790 13549.385 133508.166 -193024.062 7 8 9 10 11 12 66950.418 299775.524 55558.036 -19948.111 -33952.925 95400.496 13 14 15 16 17 18 -190100.487 36258.456 -38394.049 12041.520 -79661.609 -87210.794 19 20 21 22 23 24 27094.309 -8456.624 42356.911 -121262.548 25706.278 -59670.917 25 26 27 28 29 30 -19376.300 9855.701 -106445.986 -5279.809 -106458.445 -26054.957 31 32 33 34 35 36 -34890.499 11244.476 42844.681 -36973.311 -14853.550 15904.061 37 38 39 40 41 42 -15659.700 89073.495 -8833.739 -66371.762 23504.243 26342.104 43 44 45 46 47 48 12867.074 111712.485 -68622.360 37464.710 25741.005 61145.849 49 50 51 -13827.337 2889.741 -30291.696 > postscript(file="/var/www/html/rcomp/tmp/6ntm01291123098.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 51 Frequency = 1 lag(myerror, k = 1) myerror 0 -159967.108 NA 1 150995.772 -159967.108 2 115803.790 150995.772 3 13549.385 115803.790 4 133508.166 13549.385 5 -193024.062 133508.166 6 66950.418 -193024.062 7 299775.524 66950.418 8 55558.036 299775.524 9 -19948.111 55558.036 10 -33952.925 -19948.111 11 95400.496 -33952.925 12 -190100.487 95400.496 13 36258.456 -190100.487 14 -38394.049 36258.456 15 12041.520 -38394.049 16 -79661.609 12041.520 17 -87210.794 -79661.609 18 27094.309 -87210.794 19 -8456.624 27094.309 20 42356.911 -8456.624 21 -121262.548 42356.911 22 25706.278 -121262.548 23 -59670.917 25706.278 24 -19376.300 -59670.917 25 9855.701 -19376.300 26 -106445.986 9855.701 27 -5279.809 -106445.986 28 -106458.445 -5279.809 29 -26054.957 -106458.445 30 -34890.499 -26054.957 31 11244.476 -34890.499 32 42844.681 11244.476 33 -36973.311 42844.681 34 -14853.550 -36973.311 35 15904.061 -14853.550 36 -15659.700 15904.061 37 89073.495 -15659.700 38 -8833.739 89073.495 39 -66371.762 -8833.739 40 23504.243 -66371.762 41 26342.104 23504.243 42 12867.074 26342.104 43 111712.485 12867.074 44 -68622.360 111712.485 45 37464.710 -68622.360 46 25741.005 37464.710 47 61145.849 25741.005 48 -13827.337 61145.849 49 2889.741 -13827.337 50 -30291.696 2889.741 51 NA -30291.696 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 150995.772 -159967.108 [2,] 115803.790 150995.772 [3,] 13549.385 115803.790 [4,] 133508.166 13549.385 [5,] -193024.062 133508.166 [6,] 66950.418 -193024.062 [7,] 299775.524 66950.418 [8,] 55558.036 299775.524 [9,] -19948.111 55558.036 [10,] -33952.925 -19948.111 [11,] 95400.496 -33952.925 [12,] -190100.487 95400.496 [13,] 36258.456 -190100.487 [14,] -38394.049 36258.456 [15,] 12041.520 -38394.049 [16,] -79661.609 12041.520 [17,] -87210.794 -79661.609 [18,] 27094.309 -87210.794 [19,] -8456.624 27094.309 [20,] 42356.911 -8456.624 [21,] -121262.548 42356.911 [22,] 25706.278 -121262.548 [23,] -59670.917 25706.278 [24,] -19376.300 -59670.917 [25,] 9855.701 -19376.300 [26,] -106445.986 9855.701 [27,] -5279.809 -106445.986 [28,] -106458.445 -5279.809 [29,] -26054.957 -106458.445 [30,] -34890.499 -26054.957 [31,] 11244.476 -34890.499 [32,] 42844.681 11244.476 [33,] -36973.311 42844.681 [34,] -14853.550 -36973.311 [35,] 15904.061 -14853.550 [36,] -15659.700 15904.061 [37,] 89073.495 -15659.700 [38,] -8833.739 89073.495 [39,] -66371.762 -8833.739 [40,] 23504.243 -66371.762 [41,] 26342.104 23504.243 [42,] 12867.074 26342.104 [43,] 111712.485 12867.074 [44,] -68622.360 111712.485 [45,] 37464.710 -68622.360 [46,] 25741.005 37464.710 [47,] 61145.849 25741.005 [48,] -13827.337 61145.849 [49,] 2889.741 -13827.337 [50,] -30291.696 2889.741 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 150995.772 -159967.108 2 115803.790 150995.772 3 13549.385 115803.790 4 133508.166 13549.385 5 -193024.062 133508.166 6 66950.418 -193024.062 7 299775.524 66950.418 8 55558.036 299775.524 9 -19948.111 55558.036 10 -33952.925 -19948.111 11 95400.496 -33952.925 12 -190100.487 95400.496 13 36258.456 -190100.487 14 -38394.049 36258.456 15 12041.520 -38394.049 16 -79661.609 12041.520 17 -87210.794 -79661.609 18 27094.309 -87210.794 19 -8456.624 27094.309 20 42356.911 -8456.624 21 -121262.548 42356.911 22 25706.278 -121262.548 23 -59670.917 25706.278 24 -19376.300 -59670.917 25 9855.701 -19376.300 26 -106445.986 9855.701 27 -5279.809 -106445.986 28 -106458.445 -5279.809 29 -26054.957 -106458.445 30 -34890.499 -26054.957 31 11244.476 -34890.499 32 42844.681 11244.476 33 -36973.311 42844.681 34 -14853.550 -36973.311 35 15904.061 -14853.550 36 -15659.700 15904.061 37 89073.495 -15659.700 38 -8833.739 89073.495 39 -66371.762 -8833.739 40 23504.243 -66371.762 41 26342.104 23504.243 42 12867.074 26342.104 43 111712.485 12867.074 44 -68622.360 111712.485 45 37464.710 -68622.360 46 25741.005 37464.710 47 61145.849 25741.005 48 -13827.337 61145.849 49 2889.741 -13827.337 50 -30291.696 2889.741 > 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/7x23l1291123098.ps",horizontal=F,onefile=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/8x23l1291123098.ps",horizontal=F,onefile=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/9i4511291123099.ps",horizontal=F,onefile=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/10i4511291123099.ps",horizontal=F,onefile=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/11m4371291123099.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/12pnkd1291123099.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/13eoho1291123099.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/147fyr1291123099.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/15axwf1291123099.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/16dyvl1291123099.tab") + } > > try(system("convert tmp/11b5u1291123098.ps tmp/11b5u1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/2uk4x1291123098.ps tmp/2uk4x1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/3uk4x1291123098.ps tmp/3uk4x1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/4uk4x1291123098.ps tmp/4uk4x1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/5uk4x1291123098.ps tmp/5uk4x1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/6ntm01291123098.ps tmp/6ntm01291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/7x23l1291123098.ps tmp/7x23l1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/8x23l1291123098.ps tmp/8x23l1291123098.png",intern=TRUE)) character(0) > try(system("convert tmp/9i4511291123099.ps tmp/9i4511291123099.png",intern=TRUE)) character(0) > try(system("convert tmp/10i4511291123099.ps tmp/10i4511291123099.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.484 1.623 5.554