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(19,613,18,611,19,594,19,595,22,591,23,589,20,584,14,573,14,567,14,569,15,621,11,629,17,628,16,612,20,595,24,597,23,593,20,590,21,580,19,574,23,573,23,573,23,620,23,626,27,620,26,588,17,566,24,557,26,561,24,549,27,532,27,526,26,511,24,499,23,555,23,565,24,542,17,527,21,510,19,514,22,517,22,508,18,493,16,490,14,469,12,478,14,528,16,534,8,518,3,506,0,502,5,516,1,528,1,533,3,536,6,537,7,524,8,536,14,587,14,597,13,581),dim=c(2,61),dimnames=list(c('ICONS','WLH'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('ICONS','WLH'),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 ICONS WLH 1 19 613 2 18 611 3 19 594 4 19 595 5 22 591 6 23 589 7 20 584 8 14 573 9 14 567 10 14 569 11 15 621 12 11 629 13 17 628 14 16 612 15 20 595 16 24 597 17 23 593 18 20 590 19 21 580 20 19 574 21 23 573 22 23 573 23 23 620 24 23 626 25 27 620 26 26 588 27 17 566 28 24 557 29 26 561 30 24 549 31 27 532 32 27 526 33 26 511 34 24 499 35 23 555 36 23 565 37 24 542 38 17 527 39 21 510 40 19 514 41 22 517 42 22 508 43 18 493 44 16 490 45 14 469 46 12 478 47 14 528 48 16 534 49 8 518 50 3 506 51 0 502 52 5 516 53 1 528 54 1 533 55 3 536 56 6 537 57 7 524 58 8 536 59 14 587 60 14 597 61 13 581 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) WLH -11.12504 0.05085 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -14.976 -4.009 1.126 4.991 11.380 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -11.12504 11.87874 -0.937 0.3528 WLH 0.05085 0.02123 2.395 0.0198 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.915 on 59 degrees of freedom Multiple R-squared: 0.08861, Adjusted R-squared: 0.07316 F-statistic: 5.736 on 1 and 59 DF, p-value: 0.01981 > 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.079926e-03 0.0181598528 0.9909200736 [2,] 4.107559e-03 0.0082151175 0.9958924412 [3,] 1.325324e-03 0.0026506476 0.9986746762 [4,] 1.214301e-02 0.0242860217 0.9878569891 [5,] 7.411442e-03 0.0148228832 0.9925885584 [6,] 3.477136e-03 0.0069542715 0.9965228642 [7,] 5.611325e-03 0.0112226506 0.9943886747 [8,] 1.478427e-02 0.0295685356 0.9852157322 [9,] 7.249668e-03 0.0144993360 0.9927503320 [10,] 3.577289e-03 0.0071545789 0.9964227106 [11,] 1.942521e-03 0.0038850424 0.9980574788 [12,] 2.897149e-03 0.0057942979 0.9971028511 [13,] 2.536084e-03 0.0050721681 0.9974639160 [14,] 1.246487e-03 0.0024929747 0.9987535127 [15,] 6.363921e-04 0.0012727842 0.9993636079 [16,] 2.732484e-04 0.0005464968 0.9997267516 [17,] 1.802116e-04 0.0003604233 0.9998197884 [18,] 1.093033e-04 0.0002186066 0.9998906967 [19,] 1.011366e-04 0.0002022731 0.9998988634 [20,] 7.873001e-05 0.0001574600 0.9999212700 [21,] 1.752373e-04 0.0003504746 0.9998247627 [22,] 2.337470e-04 0.0004674941 0.9997662530 [23,] 1.230022e-04 0.0002460043 0.9998769978 [24,] 9.979478e-05 0.0001995896 0.9999002052 [25,] 1.282621e-04 0.0002565242 0.9998717379 [26,] 9.613571e-05 0.0001922714 0.9999038643 [27,] 1.342556e-04 0.0002685111 0.9998657444 [28,] 1.820464e-04 0.0003640927 0.9998179536 [29,] 2.147491e-04 0.0004294983 0.9997852509 [30,] 2.442099e-04 0.0004884198 0.9997557901 [31,] 2.271747e-04 0.0004543493 0.9997728253 [32,] 2.564715e-04 0.0005129430 0.9997435285 [33,] 4.391660e-04 0.0008783319 0.9995608340 [34,] 6.482154e-04 0.0012964307 0.9993517846 [35,] 9.015784e-04 0.0018031569 0.9990984216 [36,] 1.219420e-03 0.0024388394 0.9987805803 [37,] 2.729393e-03 0.0054587865 0.9972706068 [38,] 9.026823e-03 0.0180536455 0.9909731772 [39,] 2.227947e-02 0.0445589329 0.9777205336 [40,] 5.349221e-02 0.1069844261 0.9465077869 [41,] 1.612851e-01 0.3225701294 0.8387149353 [42,] 4.374501e-01 0.8749001399 0.5625499300 [43,] 6.391208e-01 0.7217583304 0.3608791652 [44,] 9.438700e-01 0.1122600368 0.0561300184 [45,] 9.789751e-01 0.0420497638 0.0210248819 [46,] 9.841178e-01 0.0317644339 0.0158822169 [47,] 9.836394e-01 0.0327211215 0.0163605607 [48,] 9.816427e-01 0.0367145432 0.0183572716 [49,] 9.819989e-01 0.0360022820 0.0180011410 [50,] 9.928416e-01 0.0143167858 0.0071583929 [51,] 9.988801e-01 0.0022398318 0.0011199159 [52,] 9.996258e-01 0.0007484942 0.0003742471 > postscript(file="/var/www/html/rcomp/tmp/16p1y1258650213.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/2kqih1258650213.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/31h5f1258650213.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/45lrj1258650213.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/59jwu1258650213.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 -1.04323601 -1.94154507 -0.07717208 -0.12801755 3.07536433 4.17705526 7 8 9 10 11 12 1.43128261 -4.00941722 -3.70434440 -3.80603534 -5.44999977 -9.85676353 13 14 15 16 17 18 -3.80591806 -3.99239054 0.87198245 4.77029151 3.97367339 1.12620980 19 20 21 22 23 24 2.63466449 0.93973731 4.99058278 4.99058278 2.60084570 2.29577288 25 26 27 28 29 30 6.60084570 7.22790073 -0.65349893 6.80411030 8.60072842 7.21087406 31 32 33 34 35 36 11.07524704 11.38031986 11.14300191 9.75314755 5.90580124 5.39734654 37 38 39 40 41 42 7.56679234 1.32947439 6.19384738 3.99046550 6.83792909 7.29553832 43 44 45 46 47 48 4.05822036 2.21075677 1.27851164 -1.17909759 -1.72137108 -0.02644390 49 50 51 52 53 54 -7.21291638 -11.60277074 -14.39938886 -10.11122544 -14.72137108 -14.97559843 55 56 57 58 59 60 -13.12813484 -10.17898031 -8.51798920 -8.12813484 -4.72125380 -5.22970849 61 -5.41618098 > postscript(file="/var/www/html/rcomp/tmp/6gc0h1258650213.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 -1.04323601 NA 1 -1.94154507 -1.04323601 2 -0.07717208 -1.94154507 3 -0.12801755 -0.07717208 4 3.07536433 -0.12801755 5 4.17705526 3.07536433 6 1.43128261 4.17705526 7 -4.00941722 1.43128261 8 -3.70434440 -4.00941722 9 -3.80603534 -3.70434440 10 -5.44999977 -3.80603534 11 -9.85676353 -5.44999977 12 -3.80591806 -9.85676353 13 -3.99239054 -3.80591806 14 0.87198245 -3.99239054 15 4.77029151 0.87198245 16 3.97367339 4.77029151 17 1.12620980 3.97367339 18 2.63466449 1.12620980 19 0.93973731 2.63466449 20 4.99058278 0.93973731 21 4.99058278 4.99058278 22 2.60084570 4.99058278 23 2.29577288 2.60084570 24 6.60084570 2.29577288 25 7.22790073 6.60084570 26 -0.65349893 7.22790073 27 6.80411030 -0.65349893 28 8.60072842 6.80411030 29 7.21087406 8.60072842 30 11.07524704 7.21087406 31 11.38031986 11.07524704 32 11.14300191 11.38031986 33 9.75314755 11.14300191 34 5.90580124 9.75314755 35 5.39734654 5.90580124 36 7.56679234 5.39734654 37 1.32947439 7.56679234 38 6.19384738 1.32947439 39 3.99046550 6.19384738 40 6.83792909 3.99046550 41 7.29553832 6.83792909 42 4.05822036 7.29553832 43 2.21075677 4.05822036 44 1.27851164 2.21075677 45 -1.17909759 1.27851164 46 -1.72137108 -1.17909759 47 -0.02644390 -1.72137108 48 -7.21291638 -0.02644390 49 -11.60277074 -7.21291638 50 -14.39938886 -11.60277074 51 -10.11122544 -14.39938886 52 -14.72137108 -10.11122544 53 -14.97559843 -14.72137108 54 -13.12813484 -14.97559843 55 -10.17898031 -13.12813484 56 -8.51798920 -10.17898031 57 -8.12813484 -8.51798920 58 -4.72125380 -8.12813484 59 -5.22970849 -4.72125380 60 -5.41618098 -5.22970849 61 NA -5.41618098 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.94154507 -1.04323601 [2,] -0.07717208 -1.94154507 [3,] -0.12801755 -0.07717208 [4,] 3.07536433 -0.12801755 [5,] 4.17705526 3.07536433 [6,] 1.43128261 4.17705526 [7,] -4.00941722 1.43128261 [8,] -3.70434440 -4.00941722 [9,] -3.80603534 -3.70434440 [10,] -5.44999977 -3.80603534 [11,] -9.85676353 -5.44999977 [12,] -3.80591806 -9.85676353 [13,] -3.99239054 -3.80591806 [14,] 0.87198245 -3.99239054 [15,] 4.77029151 0.87198245 [16,] 3.97367339 4.77029151 [17,] 1.12620980 3.97367339 [18,] 2.63466449 1.12620980 [19,] 0.93973731 2.63466449 [20,] 4.99058278 0.93973731 [21,] 4.99058278 4.99058278 [22,] 2.60084570 4.99058278 [23,] 2.29577288 2.60084570 [24,] 6.60084570 2.29577288 [25,] 7.22790073 6.60084570 [26,] -0.65349893 7.22790073 [27,] 6.80411030 -0.65349893 [28,] 8.60072842 6.80411030 [29,] 7.21087406 8.60072842 [30,] 11.07524704 7.21087406 [31,] 11.38031986 11.07524704 [32,] 11.14300191 11.38031986 [33,] 9.75314755 11.14300191 [34,] 5.90580124 9.75314755 [35,] 5.39734654 5.90580124 [36,] 7.56679234 5.39734654 [37,] 1.32947439 7.56679234 [38,] 6.19384738 1.32947439 [39,] 3.99046550 6.19384738 [40,] 6.83792909 3.99046550 [41,] 7.29553832 6.83792909 [42,] 4.05822036 7.29553832 [43,] 2.21075677 4.05822036 [44,] 1.27851164 2.21075677 [45,] -1.17909759 1.27851164 [46,] -1.72137108 -1.17909759 [47,] -0.02644390 -1.72137108 [48,] -7.21291638 -0.02644390 [49,] -11.60277074 -7.21291638 [50,] -14.39938886 -11.60277074 [51,] -10.11122544 -14.39938886 [52,] -14.72137108 -10.11122544 [53,] -14.97559843 -14.72137108 [54,] -13.12813484 -14.97559843 [55,] -10.17898031 -13.12813484 [56,] -8.51798920 -10.17898031 [57,] -8.12813484 -8.51798920 [58,] -4.72125380 -8.12813484 [59,] -5.22970849 -4.72125380 [60,] -5.41618098 -5.22970849 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.94154507 -1.04323601 2 -0.07717208 -1.94154507 3 -0.12801755 -0.07717208 4 3.07536433 -0.12801755 5 4.17705526 3.07536433 6 1.43128261 4.17705526 7 -4.00941722 1.43128261 8 -3.70434440 -4.00941722 9 -3.80603534 -3.70434440 10 -5.44999977 -3.80603534 11 -9.85676353 -5.44999977 12 -3.80591806 -9.85676353 13 -3.99239054 -3.80591806 14 0.87198245 -3.99239054 15 4.77029151 0.87198245 16 3.97367339 4.77029151 17 1.12620980 3.97367339 18 2.63466449 1.12620980 19 0.93973731 2.63466449 20 4.99058278 0.93973731 21 4.99058278 4.99058278 22 2.60084570 4.99058278 23 2.29577288 2.60084570 24 6.60084570 2.29577288 25 7.22790073 6.60084570 26 -0.65349893 7.22790073 27 6.80411030 -0.65349893 28 8.60072842 6.80411030 29 7.21087406 8.60072842 30 11.07524704 7.21087406 31 11.38031986 11.07524704 32 11.14300191 11.38031986 33 9.75314755 11.14300191 34 5.90580124 9.75314755 35 5.39734654 5.90580124 36 7.56679234 5.39734654 37 1.32947439 7.56679234 38 6.19384738 1.32947439 39 3.99046550 6.19384738 40 6.83792909 3.99046550 41 7.29553832 6.83792909 42 4.05822036 7.29553832 43 2.21075677 4.05822036 44 1.27851164 2.21075677 45 -1.17909759 1.27851164 46 -1.72137108 -1.17909759 47 -0.02644390 -1.72137108 48 -7.21291638 -0.02644390 49 -11.60277074 -7.21291638 50 -14.39938886 -11.60277074 51 -10.11122544 -14.39938886 52 -14.72137108 -10.11122544 53 -14.97559843 -14.72137108 54 -13.12813484 -14.97559843 55 -10.17898031 -13.12813484 56 -8.51798920 -10.17898031 57 -8.12813484 -8.51798920 58 -4.72125380 -8.12813484 59 -5.22970849 -4.72125380 60 -5.41618098 -5.22970849 > 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/7ftuv1258650213.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/86s321258650213.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/94wkf1258650213.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/10bwry1258650213.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/11dxtg1258650213.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/12lr8w1258650213.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/13zaim1258650213.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/14lmik1258650213.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/15iloz1258650213.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/16lu871258650213.tab") + } > > system("convert tmp/16p1y1258650213.ps tmp/16p1y1258650213.png") > system("convert tmp/2kqih1258650213.ps tmp/2kqih1258650213.png") > system("convert tmp/31h5f1258650213.ps tmp/31h5f1258650213.png") > system("convert tmp/45lrj1258650213.ps tmp/45lrj1258650213.png") > system("convert tmp/59jwu1258650213.ps tmp/59jwu1258650213.png") > system("convert tmp/6gc0h1258650213.ps tmp/6gc0h1258650213.png") > system("convert tmp/7ftuv1258650213.ps tmp/7ftuv1258650213.png") > system("convert tmp/86s321258650213.ps tmp/86s321258650213.png") > system("convert tmp/94wkf1258650213.ps tmp/94wkf1258650213.png") > system("convert tmp/10bwry1258650213.ps tmp/10bwry1258650213.png") > > > proc.time() user system elapsed 2.476 1.559 2.856