R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.43,0,0,0,1.44,0,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.48,1,0,0,1.57,1,1,0,1.58,1,1,0,1.58,1,1,0,1.58,1,1,0,1.58,1,1,0,1.59,1,1,0,1.6,1,1,1,1.6,1,1,2,1.61,1,1,3,1.61,1,1,4,1.61,1,1,5,1.62,1,1,6,1.63,1,1,7,1.63,1,1,8,1.64,1,1,9,1.64,1,1,10,1.64,1,1,11,1.64,1,1,12,1.64,1,1,13,1.65,1,1,14,1.65,1,1,15,1.65,1,1,16,1.65,1,1,17),dim=c(4,72),dimnames=list(c('Y','x1','x2','x3'),1:72)) > y <- array(NA,dim=c(4,72),dimnames=list(c('Y','x1','x2','x3'),1:72)) > 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) > 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 Y x1 x2 x3 1 1.43 0 0 0 2 1.43 0 0 0 3 1.43 0 0 0 4 1.43 0 0 0 5 1.43 0 0 0 6 1.43 0 0 0 7 1.43 0 0 0 8 1.43 0 0 0 9 1.43 0 0 0 10 1.43 0 0 0 11 1.43 0 0 0 12 1.43 0 0 0 13 1.43 0 0 0 14 1.43 0 0 0 15 1.43 0 0 0 16 1.43 0 0 0 17 1.43 0 0 0 18 1.43 0 0 0 19 1.44 0 0 0 20 1.48 1 0 0 21 1.48 1 0 0 22 1.48 1 0 0 23 1.48 1 0 0 24 1.48 1 0 0 25 1.48 1 0 0 26 1.48 1 0 0 27 1.48 1 0 0 28 1.48 1 0 0 29 1.48 1 0 0 30 1.48 1 0 0 31 1.48 1 0 0 32 1.48 1 0 0 33 1.48 1 0 0 34 1.48 1 0 0 35 1.48 1 0 0 36 1.48 1 0 0 37 1.48 1 0 0 38 1.48 1 0 0 39 1.48 1 0 0 40 1.48 1 0 0 41 1.48 1 0 0 42 1.48 1 0 0 43 1.48 1 0 0 44 1.48 1 0 0 45 1.48 1 0 0 46 1.48 1 0 0 47 1.48 1 0 0 48 1.48 1 0 0 49 1.48 1 0 0 50 1.57 1 1 0 51 1.58 1 1 0 52 1.58 1 1 0 53 1.58 1 1 0 54 1.58 1 1 0 55 1.59 1 1 0 56 1.60 1 1 1 57 1.60 1 1 2 58 1.61 1 1 3 59 1.61 1 1 4 60 1.61 1 1 5 61 1.62 1 1 6 62 1.63 1 1 7 63 1.63 1 1 8 64 1.64 1 1 9 65 1.64 1 1 10 66 1.64 1 1 11 67 1.64 1 1 12 68 1.64 1 1 13 69 1.65 1 1 14 70 1.65 1 1 15 71 1.65 1 1 16 72 1.65 1 1 17 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x1 x2 x3 1.430526 0.049474 0.107514 0.004426 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.751e-02 -5.263e-04 1.423e-19 1.423e-19 1.265e-02 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.4305263 0.0010963 1304.89 <2e-16 *** x1 0.0494737 0.0014011 35.31 <2e-16 *** x2 0.1075145 0.0017524 61.35 <2e-16 *** x3 0.0044259 0.0001725 25.66 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.004779 on 68 degrees of freedom Multiple R-Squared: 0.9964, Adjusted R-squared: 0.9962 F-statistic: 6206 on 3 and 68 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/rcomp/tmp/1lh831197985636.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/2h7321197985636.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/3sunl1197985636.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/4s1yl1197985636.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/5091a1197985636.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 72 Frequency = 1 1 2 3 4 5 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 6 7 8 9 10 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 11 12 13 14 15 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 -5.263158e-04 16 17 18 19 20 -5.263158e-04 -5.263158e-04 -5.263158e-04 9.473684e-03 1.423015e-19 21 22 23 24 25 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 26 27 28 29 30 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 31 32 33 34 35 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 36 37 38 39 40 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 41 42 43 44 45 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 46 47 48 49 50 1.423015e-19 1.423015e-19 1.423015e-19 1.423015e-19 -1.751445e-02 51 52 53 54 55 -7.514451e-03 -7.514451e-03 -7.514451e-03 -7.514451e-03 2.485549e-03 56 57 58 59 60 8.059617e-03 3.633685e-03 9.207752e-03 4.781820e-03 3.558880e-04 61 62 63 64 65 5.929956e-03 1.150402e-02 7.078091e-03 1.265216e-02 8.226227e-03 66 67 68 69 70 3.800295e-03 -6.256375e-04 -5.051570e-03 5.224980e-04 -3.903434e-03 71 72 -8.329366e-03 -1.275530e-02 > postscript(file="/var/www/html/rcomp/tmp/6xufa1197985636.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 = 72 Frequency = 1 lag(myerror, k = 1) myerror 0 -5.263158e-04 NA 1 -5.263158e-04 -5.263158e-04 2 -5.263158e-04 -5.263158e-04 3 -5.263158e-04 -5.263158e-04 4 -5.263158e-04 -5.263158e-04 5 -5.263158e-04 -5.263158e-04 6 -5.263158e-04 -5.263158e-04 7 -5.263158e-04 -5.263158e-04 8 -5.263158e-04 -5.263158e-04 9 -5.263158e-04 -5.263158e-04 10 -5.263158e-04 -5.263158e-04 11 -5.263158e-04 -5.263158e-04 12 -5.263158e-04 -5.263158e-04 13 -5.263158e-04 -5.263158e-04 14 -5.263158e-04 -5.263158e-04 15 -5.263158e-04 -5.263158e-04 16 -5.263158e-04 -5.263158e-04 17 -5.263158e-04 -5.263158e-04 18 9.473684e-03 -5.263158e-04 19 1.423015e-19 9.473684e-03 20 1.423015e-19 1.423015e-19 21 1.423015e-19 1.423015e-19 22 1.423015e-19 1.423015e-19 23 1.423015e-19 1.423015e-19 24 1.423015e-19 1.423015e-19 25 1.423015e-19 1.423015e-19 26 1.423015e-19 1.423015e-19 27 1.423015e-19 1.423015e-19 28 1.423015e-19 1.423015e-19 29 1.423015e-19 1.423015e-19 30 1.423015e-19 1.423015e-19 31 1.423015e-19 1.423015e-19 32 1.423015e-19 1.423015e-19 33 1.423015e-19 1.423015e-19 34 1.423015e-19 1.423015e-19 35 1.423015e-19 1.423015e-19 36 1.423015e-19 1.423015e-19 37 1.423015e-19 1.423015e-19 38 1.423015e-19 1.423015e-19 39 1.423015e-19 1.423015e-19 40 1.423015e-19 1.423015e-19 41 1.423015e-19 1.423015e-19 42 1.423015e-19 1.423015e-19 43 1.423015e-19 1.423015e-19 44 1.423015e-19 1.423015e-19 45 1.423015e-19 1.423015e-19 46 1.423015e-19 1.423015e-19 47 1.423015e-19 1.423015e-19 48 1.423015e-19 1.423015e-19 49 -1.751445e-02 1.423015e-19 50 -7.514451e-03 -1.751445e-02 51 -7.514451e-03 -7.514451e-03 52 -7.514451e-03 -7.514451e-03 53 -7.514451e-03 -7.514451e-03 54 2.485549e-03 -7.514451e-03 55 8.059617e-03 2.485549e-03 56 3.633685e-03 8.059617e-03 57 9.207752e-03 3.633685e-03 58 4.781820e-03 9.207752e-03 59 3.558880e-04 4.781820e-03 60 5.929956e-03 3.558880e-04 61 1.150402e-02 5.929956e-03 62 7.078091e-03 1.150402e-02 63 1.265216e-02 7.078091e-03 64 8.226227e-03 1.265216e-02 65 3.800295e-03 8.226227e-03 66 -6.256375e-04 3.800295e-03 67 -5.051570e-03 -6.256375e-04 68 5.224980e-04 -5.051570e-03 69 -3.903434e-03 5.224980e-04 70 -8.329366e-03 -3.903434e-03 71 -1.275530e-02 -8.329366e-03 72 NA -1.275530e-02 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -5.263158e-04 -5.263158e-04 [2,] -5.263158e-04 -5.263158e-04 [3,] -5.263158e-04 -5.263158e-04 [4,] -5.263158e-04 -5.263158e-04 [5,] -5.263158e-04 -5.263158e-04 [6,] -5.263158e-04 -5.263158e-04 [7,] -5.263158e-04 -5.263158e-04 [8,] -5.263158e-04 -5.263158e-04 [9,] -5.263158e-04 -5.263158e-04 [10,] -5.263158e-04 -5.263158e-04 [11,] -5.263158e-04 -5.263158e-04 [12,] -5.263158e-04 -5.263158e-04 [13,] -5.263158e-04 -5.263158e-04 [14,] -5.263158e-04 -5.263158e-04 [15,] -5.263158e-04 -5.263158e-04 [16,] -5.263158e-04 -5.263158e-04 [17,] -5.263158e-04 -5.263158e-04 [18,] 9.473684e-03 -5.263158e-04 [19,] 1.423015e-19 9.473684e-03 [20,] 1.423015e-19 1.423015e-19 [21,] 1.423015e-19 1.423015e-19 [22,] 1.423015e-19 1.423015e-19 [23,] 1.423015e-19 1.423015e-19 [24,] 1.423015e-19 1.423015e-19 [25,] 1.423015e-19 1.423015e-19 [26,] 1.423015e-19 1.423015e-19 [27,] 1.423015e-19 1.423015e-19 [28,] 1.423015e-19 1.423015e-19 [29,] 1.423015e-19 1.423015e-19 [30,] 1.423015e-19 1.423015e-19 [31,] 1.423015e-19 1.423015e-19 [32,] 1.423015e-19 1.423015e-19 [33,] 1.423015e-19 1.423015e-19 [34,] 1.423015e-19 1.423015e-19 [35,] 1.423015e-19 1.423015e-19 [36,] 1.423015e-19 1.423015e-19 [37,] 1.423015e-19 1.423015e-19 [38,] 1.423015e-19 1.423015e-19 [39,] 1.423015e-19 1.423015e-19 [40,] 1.423015e-19 1.423015e-19 [41,] 1.423015e-19 1.423015e-19 [42,] 1.423015e-19 1.423015e-19 [43,] 1.423015e-19 1.423015e-19 [44,] 1.423015e-19 1.423015e-19 [45,] 1.423015e-19 1.423015e-19 [46,] 1.423015e-19 1.423015e-19 [47,] 1.423015e-19 1.423015e-19 [48,] 1.423015e-19 1.423015e-19 [49,] -1.751445e-02 1.423015e-19 [50,] -7.514451e-03 -1.751445e-02 [51,] -7.514451e-03 -7.514451e-03 [52,] -7.514451e-03 -7.514451e-03 [53,] -7.514451e-03 -7.514451e-03 [54,] 2.485549e-03 -7.514451e-03 [55,] 8.059617e-03 2.485549e-03 [56,] 3.633685e-03 8.059617e-03 [57,] 9.207752e-03 3.633685e-03 [58,] 4.781820e-03 9.207752e-03 [59,] 3.558880e-04 4.781820e-03 [60,] 5.929956e-03 3.558880e-04 [61,] 1.150402e-02 5.929956e-03 [62,] 7.078091e-03 1.150402e-02 [63,] 1.265216e-02 7.078091e-03 [64,] 8.226227e-03 1.265216e-02 [65,] 3.800295e-03 8.226227e-03 [66,] -6.256375e-04 3.800295e-03 [67,] -5.051570e-03 -6.256375e-04 [68,] 5.224980e-04 -5.051570e-03 [69,] -3.903434e-03 5.224980e-04 [70,] -8.329366e-03 -3.903434e-03 [71,] -1.275530e-02 -8.329366e-03 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -5.263158e-04 -5.263158e-04 2 -5.263158e-04 -5.263158e-04 3 -5.263158e-04 -5.263158e-04 4 -5.263158e-04 -5.263158e-04 5 -5.263158e-04 -5.263158e-04 6 -5.263158e-04 -5.263158e-04 7 -5.263158e-04 -5.263158e-04 8 -5.263158e-04 -5.263158e-04 9 -5.263158e-04 -5.263158e-04 10 -5.263158e-04 -5.263158e-04 11 -5.263158e-04 -5.263158e-04 12 -5.263158e-04 -5.263158e-04 13 -5.263158e-04 -5.263158e-04 14 -5.263158e-04 -5.263158e-04 15 -5.263158e-04 -5.263158e-04 16 -5.263158e-04 -5.263158e-04 17 -5.263158e-04 -5.263158e-04 18 9.473684e-03 -5.263158e-04 19 1.423015e-19 9.473684e-03 20 1.423015e-19 1.423015e-19 21 1.423015e-19 1.423015e-19 22 1.423015e-19 1.423015e-19 23 1.423015e-19 1.423015e-19 24 1.423015e-19 1.423015e-19 25 1.423015e-19 1.423015e-19 26 1.423015e-19 1.423015e-19 27 1.423015e-19 1.423015e-19 28 1.423015e-19 1.423015e-19 29 1.423015e-19 1.423015e-19 30 1.423015e-19 1.423015e-19 31 1.423015e-19 1.423015e-19 32 1.423015e-19 1.423015e-19 33 1.423015e-19 1.423015e-19 34 1.423015e-19 1.423015e-19 35 1.423015e-19 1.423015e-19 36 1.423015e-19 1.423015e-19 37 1.423015e-19 1.423015e-19 38 1.423015e-19 1.423015e-19 39 1.423015e-19 1.423015e-19 40 1.423015e-19 1.423015e-19 41 1.423015e-19 1.423015e-19 42 1.423015e-19 1.423015e-19 43 1.423015e-19 1.423015e-19 44 1.423015e-19 1.423015e-19 45 1.423015e-19 1.423015e-19 46 1.423015e-19 1.423015e-19 47 1.423015e-19 1.423015e-19 48 1.423015e-19 1.423015e-19 49 -1.751445e-02 1.423015e-19 50 -7.514451e-03 -1.751445e-02 51 -7.514451e-03 -7.514451e-03 52 -7.514451e-03 -7.514451e-03 53 -7.514451e-03 -7.514451e-03 54 2.485549e-03 -7.514451e-03 55 8.059617e-03 2.485549e-03 56 3.633685e-03 8.059617e-03 57 9.207752e-03 3.633685e-03 58 4.781820e-03 9.207752e-03 59 3.558880e-04 4.781820e-03 60 5.929956e-03 3.558880e-04 61 1.150402e-02 5.929956e-03 62 7.078091e-03 1.150402e-02 63 1.265216e-02 7.078091e-03 64 8.226227e-03 1.265216e-02 65 3.800295e-03 8.226227e-03 66 -6.256375e-04 3.800295e-03 67 -5.051570e-03 -6.256375e-04 68 5.224980e-04 -5.051570e-03 69 -3.903434e-03 5.224980e-04 70 -8.329366e-03 -3.903434e-03 71 -1.275530e-02 -8.329366e-03 > 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/7st8b1197985636.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/8xz1w1197985636.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/99eib1197985636.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 > 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/108qns1197985636.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/11ygl11197985636.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/12mnfk1197985636.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/13r0mf1197985637.tab") > > system("convert tmp/1lh831197985636.ps tmp/1lh831197985636.png") > system("convert tmp/2h7321197985636.ps tmp/2h7321197985636.png") > system("convert tmp/3sunl1197985636.ps tmp/3sunl1197985636.png") > system("convert tmp/4s1yl1197985636.ps tmp/4s1yl1197985636.png") > system("convert tmp/5091a1197985636.ps tmp/5091a1197985636.png") > system("convert tmp/6xufa1197985636.ps tmp/6xufa1197985636.png") > system("convert tmp/7st8b1197985636.ps tmp/7st8b1197985636.png") > system("convert tmp/8xz1w1197985636.ps tmp/8xz1w1197985636.png") > system("convert tmp/99eib1197985636.ps tmp/99eib1197985636.png") > > > proc.time() user system elapsed 2.240 1.454 2.563