R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(695,0,638,0,762,0,635,0,721,0,854,0,418,0,367,0,824,0,687,0,601,0,676,0,740,0,691,0,683,0,594,0,729,0,731,0,386,0,331,0,707,0,715,0,657,0,653,0,642,0,643,0,718,0,654,0,632,0,731,0,392,1,344,1,792,1,852,1,649,1,629,1,685,1,617,1,715,1,715,1,629,1,916,1,531,1,357,1,917,1,828,1,708,1,858,1,775,1,785,1,1006,1,789,1,734,1,906,1,532,1,387,1,991,1,841,1,892,1,782,1,813,1,793,1,978,1,775,1,797,1,946,1,594,1,438,1,1022,1,868,1),dim=c(2,70),dimnames=list(c('MultipleLinear','Regression'),1:70)) > y <- array(NA,dim=c(2,70),dimnames=list(c('MultipleLinear','Regression'),1:70)) > 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 MultipleLinear Regression 1 695 0 2 638 0 3 762 0 4 635 0 5 721 0 6 854 0 7 418 0 8 367 0 9 824 0 10 687 0 11 601 0 12 676 0 13 740 0 14 691 0 15 683 0 16 594 0 17 729 0 18 731 0 19 386 0 20 331 0 21 707 0 22 715 0 23 657 0 24 653 0 25 642 0 26 643 0 27 718 0 28 654 0 29 632 0 30 731 0 31 392 1 32 344 1 33 792 1 34 852 1 35 649 1 36 629 1 37 685 1 38 617 1 39 715 1 40 715 1 41 629 1 42 916 1 43 531 1 44 357 1 45 917 1 46 828 1 47 708 1 48 858 1 49 775 1 50 785 1 51 1006 1 52 789 1 53 734 1 54 906 1 55 532 1 56 387 1 57 991 1 58 841 1 59 892 1 60 782 1 61 813 1 62 793 1 63 978 1 64 775 1 65 797 1 66 946 1 67 594 1 68 438 1 69 1022 1 70 868 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Regression 650.50 88.95 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -395.45 -53.21 36.02 86.54 282.55 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 650.50 29.36 22.16 <2e-16 *** Regression 88.95 38.84 2.29 0.0251 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 160.8 on 68 degrees of freedom Multiple R-squared: 0.07161, Adjusted R-squared: 0.05795 F-statistic: 5.245 on 1 and 68 DF, p-value: 0.02512 > 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.06674612 0.13349225 0.9332539 [2,] 0.13248196 0.26496392 0.8675180 [3,] 0.46372878 0.92745755 0.5362712 [4,] 0.70182113 0.59635774 0.2981789 [5,] 0.70358970 0.59282060 0.2964103 [6,] 0.60393264 0.79213471 0.3960674 [7,] 0.50964346 0.98071308 0.4903565 [8,] 0.40891272 0.81782544 0.5910873 [9,] 0.33932656 0.67865312 0.6606734 [10,] 0.25852758 0.51705515 0.7414724 [11,] 0.18952532 0.37905063 0.8104747 [12,] 0.14305335 0.28610670 0.8569466 [13,] 0.10678369 0.21356738 0.8932163 [14,] 0.07849898 0.15699797 0.9215010 [15,] 0.17256122 0.34512243 0.8274388 [16,] 0.37231320 0.74462640 0.6276868 [17,] 0.30950241 0.61900483 0.6904976 [18,] 0.25440799 0.50881598 0.7455920 [19,] 0.19632923 0.39265845 0.8036708 [20,] 0.14750164 0.29500327 0.8524984 [21,] 0.10808762 0.21617524 0.8919124 [22,] 0.07722639 0.15445277 0.9227736 [23,] 0.05713030 0.11426060 0.9428697 [24,] 0.03877902 0.07755803 0.9612210 [25,] 0.02622136 0.05244272 0.9737786 [26,] 0.01855771 0.03711543 0.9814423 [27,] 0.02247986 0.04495972 0.9775201 [28,] 0.03846710 0.07693420 0.9615329 [29,] 0.09795226 0.19590453 0.9020477 [30,] 0.14852171 0.29704342 0.8514783 [31,] 0.11958112 0.23916224 0.8804189 [32,] 0.09634739 0.19269479 0.9036526 [33,] 0.07483396 0.14966791 0.9251660 [34,] 0.06043472 0.12086944 0.9395653 [35,] 0.04601987 0.09203974 0.9539801 [36,] 0.03400439 0.06800878 0.9659956 [37,] 0.02639405 0.05278810 0.9736060 [38,] 0.03827992 0.07655984 0.9617201 [39,] 0.04522107 0.09044215 0.9547789 [40,] 0.18938894 0.37877789 0.8106111 [41,] 0.22461114 0.44922229 0.7753889 [42,] 0.19856793 0.39713586 0.8014321 [43,] 0.16011479 0.32022958 0.8398852 [44,] 0.14399918 0.28799835 0.8560008 [45,] 0.11053683 0.22107366 0.8894632 [46,] 0.08291198 0.16582396 0.9170880 [47,] 0.13077425 0.26154849 0.8692258 [48,] 0.09639112 0.19278224 0.9036089 [49,] 0.06817456 0.13634913 0.9318254 [50,] 0.06230330 0.12460659 0.9376967 [51,] 0.08570910 0.17141820 0.9142909 [52,] 0.36287895 0.72575790 0.6371210 [53,] 0.41052526 0.82105052 0.5894747 [54,] 0.33245141 0.66490282 0.6675486 [55,] 0.28109290 0.56218580 0.7189071 [56,] 0.20323653 0.40647305 0.7967635 [57,] 0.13858876 0.27717753 0.8614112 [58,] 0.08667676 0.17335352 0.9133232 [59,] 0.09172013 0.18344027 0.9082799 [60,] 0.04899805 0.09799610 0.9510019 [61,] 0.02255899 0.04511798 0.9774410 > postscript(file="/var/www/html/freestat/rcomp/tmp/1oip71292925777.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/freestat/rcomp/tmp/2oip71292925777.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/freestat/rcomp/tmp/3gr6s1292925777.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/freestat/rcomp/tmp/4gr6s1292925777.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/freestat/rcomp/tmp/5gr6s1292925777.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 = 70 Frequency = 1 1 2 3 4 5 6 7 8 9 10 44.50 -12.50 111.50 -15.50 70.50 203.50 -232.50 -283.50 173.50 36.50 11 12 13 14 15 16 17 18 19 20 -49.50 25.50 89.50 40.50 32.50 -56.50 78.50 80.50 -264.50 -319.50 21 22 23 24 25 26 27 28 29 30 56.50 64.50 6.50 2.50 -8.50 -7.50 67.50 3.50 -18.50 80.50 31 32 33 34 35 36 37 38 39 40 -347.45 -395.45 52.55 112.55 -90.45 -110.45 -54.45 -122.45 -24.45 -24.45 41 42 43 44 45 46 47 48 49 50 -110.45 176.55 -208.45 -382.45 177.55 88.55 -31.45 118.55 35.55 45.55 51 52 53 54 55 56 57 58 59 60 266.55 49.55 -5.45 166.55 -207.45 -352.45 251.55 101.55 152.55 42.55 61 62 63 64 65 66 67 68 69 70 73.55 53.55 238.55 35.55 57.55 206.55 -145.45 -301.45 282.55 128.55 > postscript(file="/var/www/html/freestat/rcomp/tmp/69ind1292925777.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 = 70 Frequency = 1 lag(myerror, k = 1) myerror 0 44.50 NA 1 -12.50 44.50 2 111.50 -12.50 3 -15.50 111.50 4 70.50 -15.50 5 203.50 70.50 6 -232.50 203.50 7 -283.50 -232.50 8 173.50 -283.50 9 36.50 173.50 10 -49.50 36.50 11 25.50 -49.50 12 89.50 25.50 13 40.50 89.50 14 32.50 40.50 15 -56.50 32.50 16 78.50 -56.50 17 80.50 78.50 18 -264.50 80.50 19 -319.50 -264.50 20 56.50 -319.50 21 64.50 56.50 22 6.50 64.50 23 2.50 6.50 24 -8.50 2.50 25 -7.50 -8.50 26 67.50 -7.50 27 3.50 67.50 28 -18.50 3.50 29 80.50 -18.50 30 -347.45 80.50 31 -395.45 -347.45 32 52.55 -395.45 33 112.55 52.55 34 -90.45 112.55 35 -110.45 -90.45 36 -54.45 -110.45 37 -122.45 -54.45 38 -24.45 -122.45 39 -24.45 -24.45 40 -110.45 -24.45 41 176.55 -110.45 42 -208.45 176.55 43 -382.45 -208.45 44 177.55 -382.45 45 88.55 177.55 46 -31.45 88.55 47 118.55 -31.45 48 35.55 118.55 49 45.55 35.55 50 266.55 45.55 51 49.55 266.55 52 -5.45 49.55 53 166.55 -5.45 54 -207.45 166.55 55 -352.45 -207.45 56 251.55 -352.45 57 101.55 251.55 58 152.55 101.55 59 42.55 152.55 60 73.55 42.55 61 53.55 73.55 62 238.55 53.55 63 35.55 238.55 64 57.55 35.55 65 206.55 57.55 66 -145.45 206.55 67 -301.45 -145.45 68 282.55 -301.45 69 128.55 282.55 70 NA 128.55 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -12.50 44.50 [2,] 111.50 -12.50 [3,] -15.50 111.50 [4,] 70.50 -15.50 [5,] 203.50 70.50 [6,] -232.50 203.50 [7,] -283.50 -232.50 [8,] 173.50 -283.50 [9,] 36.50 173.50 [10,] -49.50 36.50 [11,] 25.50 -49.50 [12,] 89.50 25.50 [13,] 40.50 89.50 [14,] 32.50 40.50 [15,] -56.50 32.50 [16,] 78.50 -56.50 [17,] 80.50 78.50 [18,] -264.50 80.50 [19,] -319.50 -264.50 [20,] 56.50 -319.50 [21,] 64.50 56.50 [22,] 6.50 64.50 [23,] 2.50 6.50 [24,] -8.50 2.50 [25,] -7.50 -8.50 [26,] 67.50 -7.50 [27,] 3.50 67.50 [28,] -18.50 3.50 [29,] 80.50 -18.50 [30,] -347.45 80.50 [31,] -395.45 -347.45 [32,] 52.55 -395.45 [33,] 112.55 52.55 [34,] -90.45 112.55 [35,] -110.45 -90.45 [36,] -54.45 -110.45 [37,] -122.45 -54.45 [38,] -24.45 -122.45 [39,] -24.45 -24.45 [40,] -110.45 -24.45 [41,] 176.55 -110.45 [42,] -208.45 176.55 [43,] -382.45 -208.45 [44,] 177.55 -382.45 [45,] 88.55 177.55 [46,] -31.45 88.55 [47,] 118.55 -31.45 [48,] 35.55 118.55 [49,] 45.55 35.55 [50,] 266.55 45.55 [51,] 49.55 266.55 [52,] -5.45 49.55 [53,] 166.55 -5.45 [54,] -207.45 166.55 [55,] -352.45 -207.45 [56,] 251.55 -352.45 [57,] 101.55 251.55 [58,] 152.55 101.55 [59,] 42.55 152.55 [60,] 73.55 42.55 [61,] 53.55 73.55 [62,] 238.55 53.55 [63,] 35.55 238.55 [64,] 57.55 35.55 [65,] 206.55 57.55 [66,] -145.45 206.55 [67,] -301.45 -145.45 [68,] 282.55 -301.45 [69,] 128.55 282.55 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -12.50 44.50 2 111.50 -12.50 3 -15.50 111.50 4 70.50 -15.50 5 203.50 70.50 6 -232.50 203.50 7 -283.50 -232.50 8 173.50 -283.50 9 36.50 173.50 10 -49.50 36.50 11 25.50 -49.50 12 89.50 25.50 13 40.50 89.50 14 32.50 40.50 15 -56.50 32.50 16 78.50 -56.50 17 80.50 78.50 18 -264.50 80.50 19 -319.50 -264.50 20 56.50 -319.50 21 64.50 56.50 22 6.50 64.50 23 2.50 6.50 24 -8.50 2.50 25 -7.50 -8.50 26 67.50 -7.50 27 3.50 67.50 28 -18.50 3.50 29 80.50 -18.50 30 -347.45 80.50 31 -395.45 -347.45 32 52.55 -395.45 33 112.55 52.55 34 -90.45 112.55 35 -110.45 -90.45 36 -54.45 -110.45 37 -122.45 -54.45 38 -24.45 -122.45 39 -24.45 -24.45 40 -110.45 -24.45 41 176.55 -110.45 42 -208.45 176.55 43 -382.45 -208.45 44 177.55 -382.45 45 88.55 177.55 46 -31.45 88.55 47 118.55 -31.45 48 35.55 118.55 49 45.55 35.55 50 266.55 45.55 51 49.55 266.55 52 -5.45 49.55 53 166.55 -5.45 54 -207.45 166.55 55 -352.45 -207.45 56 251.55 -352.45 57 101.55 251.55 58 152.55 101.55 59 42.55 152.55 60 73.55 42.55 61 53.55 73.55 62 238.55 53.55 63 35.55 238.55 64 57.55 35.55 65 206.55 57.55 66 -145.45 206.55 67 -301.45 -145.45 68 282.55 -301.45 69 128.55 282.55 > 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/freestat/rcomp/tmp/7kr4g1292925777.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/freestat/rcomp/tmp/8kr4g1292925777.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/freestat/rcomp/tmp/9kr4g1292925777.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/freestat/rcomp/tmp/10cj3j1292925777.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11gj271292925777.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/freestat/rcomp/tmp/12jkiv1292925777.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/freestat/rcomp/tmp/13ftgl1292925777.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/freestat/rcomp/tmp/140cw91292925777.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/freestat/rcomp/tmp/15mudf1292925777.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/freestat/rcomp/tmp/16pdc31292925777.tab") + } > > try(system("convert tmp/1oip71292925777.ps tmp/1oip71292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/2oip71292925777.ps tmp/2oip71292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/3gr6s1292925777.ps tmp/3gr6s1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/4gr6s1292925777.ps tmp/4gr6s1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/5gr6s1292925777.ps tmp/5gr6s1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/69ind1292925777.ps tmp/69ind1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/7kr4g1292925777.ps tmp/7kr4g1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/8kr4g1292925777.ps tmp/8kr4g1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/9kr4g1292925777.ps tmp/9kr4g1292925777.png",intern=TRUE)) character(0) > try(system("convert tmp/10cj3j1292925777.ps tmp/10cj3j1292925777.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.041 2.574 4.745