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(19915,23322,19843,22558,19761,19185,20858,17869,21968,21515,23061,17686,22661,18044,22269,20398,21857,22894,21568,22016,21274,25325,20987,27683,19683,17333,19381,20190,19071,22589,20772,14588,22485,14296,24181,12237,23479,7607,22782,9303,22067,9226,21489,9351,20903,21266,20330,21377,19736,22034,19483,22483,19242,15122,20334,18982,21423,19653,22523,16653,21986,23528,21462,24612,20908,24733,20575,21839,20237,22421,19904,26543,19610,27067,19251,31403,18941,25762,20450,29359,21946,34174,23409,20163,22741,25226,22069,25077,21539,29764,21189,21372,20960,34136,20704,29126,19697,17279,19598,16163,19456,8058,20316,17888,21083,7642,22158,7458,21469,4639,20892,10276,20578,3129,20233,20023,19947,3744,20049,7848),dim=c(2,60),dimnames=list(c('X','Y'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('X','Y'),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 X Y 1 19915 23322 2 19843 22558 3 19761 19185 4 20858 17869 5 21968 21515 6 23061 17686 7 22661 18044 8 22269 20398 9 21857 22894 10 21568 22016 11 21274 25325 12 20987 27683 13 19683 17333 14 19381 20190 15 19071 22589 16 20772 14588 17 22485 14296 18 24181 12237 19 23479 7607 20 22782 9303 21 22067 9226 22 21489 9351 23 20903 21266 24 20330 21377 25 19736 22034 26 19483 22483 27 19242 15122 28 20334 18982 29 21423 19653 30 22523 16653 31 21986 23528 32 21462 24612 33 20908 24733 34 20575 21839 35 20237 22421 36 19904 26543 37 19610 27067 38 19251 31403 39 18941 25762 40 20450 29359 41 21946 34174 42 23409 20163 43 22741 25226 44 22069 25077 45 21539 29764 46 21189 21372 47 20960 34136 48 20704 29126 49 19697 17279 50 19598 16163 51 19456 8058 52 20316 17888 53 21083 7642 54 22158 7458 55 21469 4639 56 20892 10276 57 20578 3129 58 20233 20023 59 19947 3744 60 20049 7848 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Y 2.149e+04 -2.667e-02 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1863.6 -1075.2 -89.3 892.9 3015.7 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.149e+04 4.419e+02 48.639 <2e-16 *** Y -2.667e-02 2.143e-02 -1.244 0.218 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1237 on 58 degrees of freedom Multiple R-squared: 0.02599, Adjusted R-squared: 0.009196 F-statistic: 1.548 on 1 and 58 DF, p-value: 0.2185 > 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.4650041 0.93000826 0.53499587 [2,] 0.6400975 0.71980494 0.35990247 [3,] 0.5878757 0.82424864 0.41212432 [4,] 0.5695595 0.86088109 0.43044055 [5,] 0.5686976 0.86260472 0.43130236 [6,] 0.4787844 0.95756887 0.52121557 [7,] 0.4080108 0.81602153 0.59198924 [8,] 0.3242151 0.64843017 0.67578492 [9,] 0.4443493 0.88869851 0.55565075 [10,] 0.5321191 0.93576184 0.46788092 [11,] 0.6289647 0.74207057 0.37103528 [12,] 0.5514683 0.89706345 0.44853172 [13,] 0.5432316 0.91353673 0.45676837 [14,] 0.7625996 0.47480089 0.23740044 [15,] 0.7923722 0.41525565 0.20762782 [16,] 0.7926992 0.41460166 0.20730083 [17,] 0.7784011 0.44319782 0.22159891 [18,] 0.7640481 0.47190376 0.23595188 [19,] 0.7000360 0.59992792 0.29996396 [20,] 0.6448861 0.71022790 0.35511395 [21,] 0.6325551 0.73488977 0.36744489 [22,] 0.6452007 0.70959869 0.35479934 [23,] 0.7764533 0.44709344 0.22354672 [24,] 0.7328663 0.53426735 0.26713368 [25,] 0.6798605 0.64027902 0.32013951 [26,] 0.7207286 0.55854272 0.27927136 [27,] 0.7383050 0.52338996 0.26169498 [28,] 0.7066165 0.58676702 0.29338351 [29,] 0.6411745 0.71765107 0.35882554 [30,] 0.5691473 0.86170531 0.43085266 [31,] 0.5067424 0.98651527 0.49325763 [32,] 0.4584519 0.91690373 0.54154813 [33,] 0.4422796 0.88455929 0.55772035 [34,] 0.4910719 0.98214377 0.50892812 [35,] 0.6528813 0.69423747 0.34711873 [36,] 0.6261599 0.74768017 0.37384008 [37,] 0.6686999 0.66260016 0.33130008 [38,] 0.8911530 0.21769397 0.10884698 [39,] 0.9554637 0.08907253 0.04453626 [40,] 0.9678130 0.06437398 0.03218699 [41,] 0.9653716 0.06925686 0.03462843 [42,] 0.9523990 0.09520192 0.04760096 [43,] 0.9402391 0.11952181 0.05976091 [44,] 0.9297093 0.14058133 0.07029067 [45,] 0.9046234 0.19075320 0.09537660 [46,] 0.8893011 0.22139783 0.11069891 [47,] 0.9296798 0.14064048 0.07032024 [48,] 0.8746655 0.25066898 0.12533449 [49,] 0.7904425 0.41911502 0.20955751 [50,] 0.9052435 0.18951297 0.09475649 [51,] 0.9411276 0.11774472 0.05887236 > postscript(file="/var/www/html/rcomp/tmp/1bzga1261251207.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/22wxe1261251207.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/3a6cv1261251207.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/4xg4f1261251207.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/5wn0h1261251207.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 -954.68499 -1047.05735 -1218.99973 -157.09139 1050.13064 2041.02884 7 8 9 10 11 12 1650.57505 1321.34539 975.90222 663.49000 457.72580 233.60280 13 14 15 16 17 18 -1346.38404 -1572.20101 -1818.23073 -330.58056 1374.63315 3015.72910 19 20 21 22 23 24 2190.26832 1538.49283 821.43959 246.77277 -21.50904 -591.54919 25 26 27 28 29 30 -1168.03002 -1409.05726 -1846.34123 -651.41281 455.47967 1475.48349 31 32 33 34 35 36 1121.80808 626.71337 75.93988 -334.22977 -656.71051 -879.79575 37 38 39 40 41 42 -1159.82309 -1403.20193 -1863.62143 -258.70600 1365.68788 2455.07902 43 44 45 46 47 48 1922.08592 1246.11278 841.09349 267.31749 378.67460 -10.91904 49 50 51 52 53 54 -1333.82398 -1462.58256 -1820.70559 -698.58475 -204.79839 865.29517 55 56 57 58 59 60 101.12543 -325.56174 -830.13932 -724.65413 -1444.74010 -1233.30532 > postscript(file="/var/www/html/rcomp/tmp/65gpc1261251207.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 -954.68499 NA 1 -1047.05735 -954.68499 2 -1218.99973 -1047.05735 3 -157.09139 -1218.99973 4 1050.13064 -157.09139 5 2041.02884 1050.13064 6 1650.57505 2041.02884 7 1321.34539 1650.57505 8 975.90222 1321.34539 9 663.49000 975.90222 10 457.72580 663.49000 11 233.60280 457.72580 12 -1346.38404 233.60280 13 -1572.20101 -1346.38404 14 -1818.23073 -1572.20101 15 -330.58056 -1818.23073 16 1374.63315 -330.58056 17 3015.72910 1374.63315 18 2190.26832 3015.72910 19 1538.49283 2190.26832 20 821.43959 1538.49283 21 246.77277 821.43959 22 -21.50904 246.77277 23 -591.54919 -21.50904 24 -1168.03002 -591.54919 25 -1409.05726 -1168.03002 26 -1846.34123 -1409.05726 27 -651.41281 -1846.34123 28 455.47967 -651.41281 29 1475.48349 455.47967 30 1121.80808 1475.48349 31 626.71337 1121.80808 32 75.93988 626.71337 33 -334.22977 75.93988 34 -656.71051 -334.22977 35 -879.79575 -656.71051 36 -1159.82309 -879.79575 37 -1403.20193 -1159.82309 38 -1863.62143 -1403.20193 39 -258.70600 -1863.62143 40 1365.68788 -258.70600 41 2455.07902 1365.68788 42 1922.08592 2455.07902 43 1246.11278 1922.08592 44 841.09349 1246.11278 45 267.31749 841.09349 46 378.67460 267.31749 47 -10.91904 378.67460 48 -1333.82398 -10.91904 49 -1462.58256 -1333.82398 50 -1820.70559 -1462.58256 51 -698.58475 -1820.70559 52 -204.79839 -698.58475 53 865.29517 -204.79839 54 101.12543 865.29517 55 -325.56174 101.12543 56 -830.13932 -325.56174 57 -724.65413 -830.13932 58 -1444.74010 -724.65413 59 -1233.30532 -1444.74010 60 NA -1233.30532 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1047.05735 -954.68499 [2,] -1218.99973 -1047.05735 [3,] -157.09139 -1218.99973 [4,] 1050.13064 -157.09139 [5,] 2041.02884 1050.13064 [6,] 1650.57505 2041.02884 [7,] 1321.34539 1650.57505 [8,] 975.90222 1321.34539 [9,] 663.49000 975.90222 [10,] 457.72580 663.49000 [11,] 233.60280 457.72580 [12,] -1346.38404 233.60280 [13,] -1572.20101 -1346.38404 [14,] -1818.23073 -1572.20101 [15,] -330.58056 -1818.23073 [16,] 1374.63315 -330.58056 [17,] 3015.72910 1374.63315 [18,] 2190.26832 3015.72910 [19,] 1538.49283 2190.26832 [20,] 821.43959 1538.49283 [21,] 246.77277 821.43959 [22,] -21.50904 246.77277 [23,] -591.54919 -21.50904 [24,] -1168.03002 -591.54919 [25,] -1409.05726 -1168.03002 [26,] -1846.34123 -1409.05726 [27,] -651.41281 -1846.34123 [28,] 455.47967 -651.41281 [29,] 1475.48349 455.47967 [30,] 1121.80808 1475.48349 [31,] 626.71337 1121.80808 [32,] 75.93988 626.71337 [33,] -334.22977 75.93988 [34,] -656.71051 -334.22977 [35,] -879.79575 -656.71051 [36,] -1159.82309 -879.79575 [37,] -1403.20193 -1159.82309 [38,] -1863.62143 -1403.20193 [39,] -258.70600 -1863.62143 [40,] 1365.68788 -258.70600 [41,] 2455.07902 1365.68788 [42,] 1922.08592 2455.07902 [43,] 1246.11278 1922.08592 [44,] 841.09349 1246.11278 [45,] 267.31749 841.09349 [46,] 378.67460 267.31749 [47,] -10.91904 378.67460 [48,] -1333.82398 -10.91904 [49,] -1462.58256 -1333.82398 [50,] -1820.70559 -1462.58256 [51,] -698.58475 -1820.70559 [52,] -204.79839 -698.58475 [53,] 865.29517 -204.79839 [54,] 101.12543 865.29517 [55,] -325.56174 101.12543 [56,] -830.13932 -325.56174 [57,] -724.65413 -830.13932 [58,] -1444.74010 -724.65413 [59,] -1233.30532 -1444.74010 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1047.05735 -954.68499 2 -1218.99973 -1047.05735 3 -157.09139 -1218.99973 4 1050.13064 -157.09139 5 2041.02884 1050.13064 6 1650.57505 2041.02884 7 1321.34539 1650.57505 8 975.90222 1321.34539 9 663.49000 975.90222 10 457.72580 663.49000 11 233.60280 457.72580 12 -1346.38404 233.60280 13 -1572.20101 -1346.38404 14 -1818.23073 -1572.20101 15 -330.58056 -1818.23073 16 1374.63315 -330.58056 17 3015.72910 1374.63315 18 2190.26832 3015.72910 19 1538.49283 2190.26832 20 821.43959 1538.49283 21 246.77277 821.43959 22 -21.50904 246.77277 23 -591.54919 -21.50904 24 -1168.03002 -591.54919 25 -1409.05726 -1168.03002 26 -1846.34123 -1409.05726 27 -651.41281 -1846.34123 28 455.47967 -651.41281 29 1475.48349 455.47967 30 1121.80808 1475.48349 31 626.71337 1121.80808 32 75.93988 626.71337 33 -334.22977 75.93988 34 -656.71051 -334.22977 35 -879.79575 -656.71051 36 -1159.82309 -879.79575 37 -1403.20193 -1159.82309 38 -1863.62143 -1403.20193 39 -258.70600 -1863.62143 40 1365.68788 -258.70600 41 2455.07902 1365.68788 42 1922.08592 2455.07902 43 1246.11278 1922.08592 44 841.09349 1246.11278 45 267.31749 841.09349 46 378.67460 267.31749 47 -10.91904 378.67460 48 -1333.82398 -10.91904 49 -1462.58256 -1333.82398 50 -1820.70559 -1462.58256 51 -698.58475 -1820.70559 52 -204.79839 -698.58475 53 865.29517 -204.79839 54 101.12543 865.29517 55 -325.56174 101.12543 56 -830.13932 -325.56174 57 -724.65413 -830.13932 58 -1444.74010 -724.65413 59 -1233.30532 -1444.74010 > 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/7s0ca1261251207.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/8flcw1261251207.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/9w71k1261251207.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/10vfcu1261251207.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/11jc1s1261251207.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/1228k41261251207.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/13mic91261251208.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/147m1z1261251208.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/15c46g1261251208.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/165gpj1261251208.tab") + } > > try(system("convert tmp/1bzga1261251207.ps tmp/1bzga1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/22wxe1261251207.ps tmp/22wxe1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/3a6cv1261251207.ps tmp/3a6cv1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/4xg4f1261251207.ps tmp/4xg4f1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/5wn0h1261251207.ps tmp/5wn0h1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/65gpc1261251207.ps tmp/65gpc1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/7s0ca1261251207.ps tmp/7s0ca1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/8flcw1261251207.ps tmp/8flcw1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/9w71k1261251207.ps tmp/9w71k1261251207.png",intern=TRUE)) character(0) > try(system("convert tmp/10vfcu1261251207.ps tmp/10vfcu1261251207.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.488 1.569 3.870