R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(9,676,8,642,9,402,9,610,9,294,9,448,10,319,9,548,9,801,9,596,8,923,9,746,9,829,9,125,9,782,9,441,9,162,9,915,10,444,10,209,9,985,9,842,9,429,10,132,9,849,9,172,10,313,9,819,9,955,10,048,10,082,10,541,10,208,10,233,9,439,9,963,10,158,9,225,10,474,9,757,10,490,10,281,10,444,10,640,10,695,10,786,9,832,9,747,10,411,9,511,10,402,9,701,10,540,10,112,10,915,11,183,10,384,10,834,9,886,10,216),dim=c(2,60),dimnames=list(c('y',''),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('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 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > 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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 9 676 1 0 0 0 0 0 0 0 0 0 0 1 2 8 642 0 1 0 0 0 0 0 0 0 0 0 2 3 9 402 0 0 1 0 0 0 0 0 0 0 0 3 4 9 610 0 0 0 1 0 0 0 0 0 0 0 4 5 9 294 0 0 0 0 1 0 0 0 0 0 0 5 6 9 448 0 0 0 0 0 1 0 0 0 0 0 6 7 10 319 0 0 0 0 0 0 1 0 0 0 0 7 8 9 548 0 0 0 0 0 0 0 1 0 0 0 8 9 9 801 0 0 0 0 0 0 0 0 1 0 0 9 10 9 596 0 0 0 0 0 0 0 0 0 1 0 10 11 8 923 0 0 0 0 0 0 0 0 0 0 1 11 12 9 746 0 0 0 0 0 0 0 0 0 0 0 12 13 9 829 1 0 0 0 0 0 0 0 0 0 0 13 14 9 125 0 1 0 0 0 0 0 0 0 0 0 14 15 9 782 0 0 1 0 0 0 0 0 0 0 0 15 16 9 441 0 0 0 1 0 0 0 0 0 0 0 16 17 9 162 0 0 0 0 1 0 0 0 0 0 0 17 18 9 915 0 0 0 0 0 1 0 0 0 0 0 18 19 10 444 0 0 0 0 0 0 1 0 0 0 0 19 20 10 209 0 0 0 0 0 0 0 1 0 0 0 20 21 9 985 0 0 0 0 0 0 0 0 1 0 0 21 22 9 842 0 0 0 0 0 0 0 0 0 1 0 22 23 9 429 0 0 0 0 0 0 0 0 0 0 1 23 24 10 132 0 0 0 0 0 0 0 0 0 0 0 24 25 9 849 1 0 0 0 0 0 0 0 0 0 0 25 26 9 172 0 1 0 0 0 0 0 0 0 0 0 26 27 10 313 0 0 1 0 0 0 0 0 0 0 0 27 28 9 819 0 0 0 1 0 0 0 0 0 0 0 28 29 9 955 0 0 0 0 1 0 0 0 0 0 0 29 30 10 48 0 0 0 0 0 1 0 0 0 0 0 30 31 10 82 0 0 0 0 0 0 1 0 0 0 0 31 32 10 541 0 0 0 0 0 0 0 1 0 0 0 32 33 10 208 0 0 0 0 0 0 0 0 1 0 0 33 34 10 233 0 0 0 0 0 0 0 0 0 1 0 34 35 9 439 0 0 0 0 0 0 0 0 0 0 1 35 36 9 963 0 0 0 0 0 0 0 0 0 0 0 36 37 10 158 1 0 0 0 0 0 0 0 0 0 0 37 38 9 225 0 1 0 0 0 0 0 0 0 0 0 38 39 10 474 0 0 1 0 0 0 0 0 0 0 0 39 40 9 757 0 0 0 1 0 0 0 0 0 0 0 40 41 10 490 0 0 0 0 1 0 0 0 0 0 0 41 42 10 281 0 0 0 0 0 1 0 0 0 0 0 42 43 10 444 0 0 0 0 0 0 1 0 0 0 0 43 44 10 640 0 0 0 0 0 0 0 1 0 0 0 44 45 10 695 0 0 0 0 0 0 0 0 1 0 0 45 46 10 786 0 0 0 0 0 0 0 0 0 1 0 46 47 9 832 0 0 0 0 0 0 0 0 0 0 1 47 48 9 747 0 0 0 0 0 0 0 0 0 0 0 48 49 10 411 1 0 0 0 0 0 0 0 0 0 0 49 50 9 511 0 1 0 0 0 0 0 0 0 0 0 50 51 10 402 0 0 1 0 0 0 0 0 0 0 0 51 52 9 701 0 0 0 1 0 0 0 0 0 0 0 52 53 10 540 0 0 0 0 1 0 0 0 0 0 0 53 54 10 112 0 0 0 0 0 1 0 0 0 0 0 54 55 10 915 0 0 0 0 0 0 1 0 0 0 0 55 56 11 183 0 0 0 0 0 0 0 1 0 0 0 56 57 10 384 0 0 0 0 0 0 0 0 1 0 0 57 58 10 834 0 0 0 0 0 0 0 0 0 1 0 58 59 9 886 0 0 0 0 0 0 0 0 0 0 1 59 60 10 216 0 0 0 0 0 0 0 0 0 0 0 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) V2 M1 M2 M3 M4 9.2957905 -0.0009506 0.2173575 -0.6376164 0.2773850 -0.1587525 M5 M6 M7 M8 M9 M10 0.0549072 0.1160972 0.5744425 0.5409595 0.3042516 0.3279949 M11 t -0.4482617 0.0177030 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.4976 -0.1313 0.0005 0.1431 0.4048 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.2957905 0.1479681 62.823 < 2e-16 *** V2 -0.0009506 0.0001275 -7.457 1.89e-09 *** M1 0.2173575 0.1540626 1.411 0.165019 M2 -0.6376164 0.1567594 -4.067 0.000184 *** M3 0.2773850 0.1541045 1.800 0.078424 . M4 -0.1587525 0.1539170 -1.031 0.307738 M5 0.0549072 0.1536063 0.357 0.722387 M6 0.1160972 0.1553702 0.747 0.458728 M7 0.5744425 0.1538346 3.734 0.000518 *** M8 0.5409595 0.1539540 3.514 0.001004 ** M9 0.3042516 0.1529593 1.989 0.052656 . M10 0.3279949 0.1532498 2.140 0.037669 * M11 -0.4482617 0.1537731 -2.915 0.005477 ** t 0.0177030 0.0018423 9.609 1.42e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2415 on 46 degrees of freedom Multiple R-squared: 0.8706, Adjusted R-squared: 0.8341 F-statistic: 23.81 on 13 and 46 DF, p-value: 3.965e-16 > postscript(file="/var/wessaorg/rcomp/tmp/12w5s1322210915.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/wessaorg/rcomp/tmp/2ax4b1322210915.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/wessaorg/rcomp/tmp/3dvoa1322210915.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/wessaorg/rcomp/tmp/4xn0f1322210915.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/wessaorg/rcomp/tmp/5lxwb1322210915.ps",horizontal=F,onefile=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 = 60 Frequency = 1 1 2 3 4 5 6 0.111757607 -0.083292058 -0.244141535 0.372018742 -0.159735045 -0.092234932 7 8 9 10 11 12 0.309088723 -0.457442806 0.002065037 -0.234255248 -0.164853926 0.200924311 13 14 15 16 17 18 0.044763922 0.212809227 -0.095347993 -0.001069599 -0.497651019 0.139261204 19 20 21 22 23 24 0.215478111 0.007866083 -0.035459908 -0.212842712 0.153111263 0.404816957 25 26 27 28 29 30 -0.148660164 0.045051463 0.246382309 0.145822734 0.043742191 0.102650905 31 32 33 34 35 36 -0.341076903 0.111030608 0.013484201 -0.004197043 -0.049818869 -0.017666861 37 38 39 40 41 42 -0.017964066 -0.117002674 0.186993460 -0.125550923 0.389274911 0.111705582 43 44 45 46 47 48 -0.209394242 -0.007295721 0.263992427 0.309051081 0.111332532 -0.435433615 49 50 51 52 53 54 0.010102701 -0.057565958 -0.093886242 -0.391220954 0.224368961 -0.261382759 55 56 57 58 59 60 0.025904311 0.345841835 -0.244081757 0.142243921 -0.049771001 -0.152640793 > postscript(file="/var/wessaorg/rcomp/tmp/63fyp1322210915.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 0.111757607 NA 1 -0.083292058 0.111757607 2 -0.244141535 -0.083292058 3 0.372018742 -0.244141535 4 -0.159735045 0.372018742 5 -0.092234932 -0.159735045 6 0.309088723 -0.092234932 7 -0.457442806 0.309088723 8 0.002065037 -0.457442806 9 -0.234255248 0.002065037 10 -0.164853926 -0.234255248 11 0.200924311 -0.164853926 12 0.044763922 0.200924311 13 0.212809227 0.044763922 14 -0.095347993 0.212809227 15 -0.001069599 -0.095347993 16 -0.497651019 -0.001069599 17 0.139261204 -0.497651019 18 0.215478111 0.139261204 19 0.007866083 0.215478111 20 -0.035459908 0.007866083 21 -0.212842712 -0.035459908 22 0.153111263 -0.212842712 23 0.404816957 0.153111263 24 -0.148660164 0.404816957 25 0.045051463 -0.148660164 26 0.246382309 0.045051463 27 0.145822734 0.246382309 28 0.043742191 0.145822734 29 0.102650905 0.043742191 30 -0.341076903 0.102650905 31 0.111030608 -0.341076903 32 0.013484201 0.111030608 33 -0.004197043 0.013484201 34 -0.049818869 -0.004197043 35 -0.017666861 -0.049818869 36 -0.017964066 -0.017666861 37 -0.117002674 -0.017964066 38 0.186993460 -0.117002674 39 -0.125550923 0.186993460 40 0.389274911 -0.125550923 41 0.111705582 0.389274911 42 -0.209394242 0.111705582 43 -0.007295721 -0.209394242 44 0.263992427 -0.007295721 45 0.309051081 0.263992427 46 0.111332532 0.309051081 47 -0.435433615 0.111332532 48 0.010102701 -0.435433615 49 -0.057565958 0.010102701 50 -0.093886242 -0.057565958 51 -0.391220954 -0.093886242 52 0.224368961 -0.391220954 53 -0.261382759 0.224368961 54 0.025904311 -0.261382759 55 0.345841835 0.025904311 56 -0.244081757 0.345841835 57 0.142243921 -0.244081757 58 -0.049771001 0.142243921 59 -0.152640793 -0.049771001 60 NA -0.152640793 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.083292058 0.111757607 [2,] -0.244141535 -0.083292058 [3,] 0.372018742 -0.244141535 [4,] -0.159735045 0.372018742 [5,] -0.092234932 -0.159735045 [6,] 0.309088723 -0.092234932 [7,] -0.457442806 0.309088723 [8,] 0.002065037 -0.457442806 [9,] -0.234255248 0.002065037 [10,] -0.164853926 -0.234255248 [11,] 0.200924311 -0.164853926 [12,] 0.044763922 0.200924311 [13,] 0.212809227 0.044763922 [14,] -0.095347993 0.212809227 [15,] -0.001069599 -0.095347993 [16,] -0.497651019 -0.001069599 [17,] 0.139261204 -0.497651019 [18,] 0.215478111 0.139261204 [19,] 0.007866083 0.215478111 [20,] -0.035459908 0.007866083 [21,] -0.212842712 -0.035459908 [22,] 0.153111263 -0.212842712 [23,] 0.404816957 0.153111263 [24,] -0.148660164 0.404816957 [25,] 0.045051463 -0.148660164 [26,] 0.246382309 0.045051463 [27,] 0.145822734 0.246382309 [28,] 0.043742191 0.145822734 [29,] 0.102650905 0.043742191 [30,] -0.341076903 0.102650905 [31,] 0.111030608 -0.341076903 [32,] 0.013484201 0.111030608 [33,] -0.004197043 0.013484201 [34,] -0.049818869 -0.004197043 [35,] -0.017666861 -0.049818869 [36,] -0.017964066 -0.017666861 [37,] -0.117002674 -0.017964066 [38,] 0.186993460 -0.117002674 [39,] -0.125550923 0.186993460 [40,] 0.389274911 -0.125550923 [41,] 0.111705582 0.389274911 [42,] -0.209394242 0.111705582 [43,] -0.007295721 -0.209394242 [44,] 0.263992427 -0.007295721 [45,] 0.309051081 0.263992427 [46,] 0.111332532 0.309051081 [47,] -0.435433615 0.111332532 [48,] 0.010102701 -0.435433615 [49,] -0.057565958 0.010102701 [50,] -0.093886242 -0.057565958 [51,] -0.391220954 -0.093886242 [52,] 0.224368961 -0.391220954 [53,] -0.261382759 0.224368961 [54,] 0.025904311 -0.261382759 [55,] 0.345841835 0.025904311 [56,] -0.244081757 0.345841835 [57,] 0.142243921 -0.244081757 [58,] -0.049771001 0.142243921 [59,] -0.152640793 -0.049771001 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.083292058 0.111757607 2 -0.244141535 -0.083292058 3 0.372018742 -0.244141535 4 -0.159735045 0.372018742 5 -0.092234932 -0.159735045 6 0.309088723 -0.092234932 7 -0.457442806 0.309088723 8 0.002065037 -0.457442806 9 -0.234255248 0.002065037 10 -0.164853926 -0.234255248 11 0.200924311 -0.164853926 12 0.044763922 0.200924311 13 0.212809227 0.044763922 14 -0.095347993 0.212809227 15 -0.001069599 -0.095347993 16 -0.497651019 -0.001069599 17 0.139261204 -0.497651019 18 0.215478111 0.139261204 19 0.007866083 0.215478111 20 -0.035459908 0.007866083 21 -0.212842712 -0.035459908 22 0.153111263 -0.212842712 23 0.404816957 0.153111263 24 -0.148660164 0.404816957 25 0.045051463 -0.148660164 26 0.246382309 0.045051463 27 0.145822734 0.246382309 28 0.043742191 0.145822734 29 0.102650905 0.043742191 30 -0.341076903 0.102650905 31 0.111030608 -0.341076903 32 0.013484201 0.111030608 33 -0.004197043 0.013484201 34 -0.049818869 -0.004197043 35 -0.017666861 -0.049818869 36 -0.017964066 -0.017666861 37 -0.117002674 -0.017964066 38 0.186993460 -0.117002674 39 -0.125550923 0.186993460 40 0.389274911 -0.125550923 41 0.111705582 0.389274911 42 -0.209394242 0.111705582 43 -0.007295721 -0.209394242 44 0.263992427 -0.007295721 45 0.309051081 0.263992427 46 0.111332532 0.309051081 47 -0.435433615 0.111332532 48 0.010102701 -0.435433615 49 -0.057565958 0.010102701 50 -0.093886242 -0.057565958 51 -0.391220954 -0.093886242 52 0.224368961 -0.391220954 53 -0.261382759 0.224368961 54 0.025904311 -0.261382759 55 0.345841835 0.025904311 56 -0.244081757 0.345841835 57 0.142243921 -0.244081757 58 -0.049771001 0.142243921 59 -0.152640793 -0.049771001 > 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/wessaorg/rcomp/tmp/7tz4c1322210915.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/wessaorg/rcomp/tmp/88ahb1322210915.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/wessaorg/rcomp/tmp/96m3g1322210915.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 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/10k7rx1322210915.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/wessaorg/rcomp/tmp/113g801322210915.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/wessaorg/rcomp/tmp/1239go1322210915.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/wessaorg/rcomp/tmp/136c0a1322210915.tab") > > try(system("convert tmp/12w5s1322210915.ps tmp/12w5s1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/2ax4b1322210915.ps tmp/2ax4b1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/3dvoa1322210915.ps tmp/3dvoa1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/4xn0f1322210915.ps tmp/4xn0f1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/5lxwb1322210915.ps tmp/5lxwb1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/63fyp1322210915.ps tmp/63fyp1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/7tz4c1322210915.ps tmp/7tz4c1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/88ahb1322210915.ps tmp/88ahb1322210915.png",intern=TRUE)) character(0) > try(system("convert tmp/96m3g1322210915.ps tmp/96m3g1322210915.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.566 0.606 3.183