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 = '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 t 1 1.43 0 0 0 1 2 1.43 0 0 0 2 3 1.43 0 0 0 3 4 1.43 0 0 0 4 5 1.43 0 0 0 5 6 1.43 0 0 0 6 7 1.43 0 0 0 7 8 1.43 0 0 0 8 9 1.43 0 0 0 9 10 1.43 0 0 0 10 11 1.43 0 0 0 11 12 1.43 0 0 0 12 13 1.43 0 0 0 13 14 1.43 0 0 0 14 15 1.43 0 0 0 15 16 1.43 0 0 0 16 17 1.43 0 0 0 17 18 1.43 0 0 0 18 19 1.44 0 0 0 19 20 1.48 1 0 0 20 21 1.48 1 0 0 21 22 1.48 1 0 0 22 23 1.48 1 0 0 23 24 1.48 1 0 0 24 25 1.48 1 0 0 25 26 1.48 1 0 0 26 27 1.48 1 0 0 27 28 1.48 1 0 0 28 29 1.48 1 0 0 29 30 1.48 1 0 0 30 31 1.48 1 0 0 31 32 1.48 1 0 0 32 33 1.48 1 0 0 33 34 1.48 1 0 0 34 35 1.48 1 0 0 35 36 1.48 1 0 0 36 37 1.48 1 0 0 37 38 1.48 1 0 0 38 39 1.48 1 0 0 39 40 1.48 1 0 0 40 41 1.48 1 0 0 41 42 1.48 1 0 0 42 43 1.48 1 0 0 43 44 1.48 1 0 0 44 45 1.48 1 0 0 45 46 1.48 1 0 0 46 47 1.48 1 0 0 47 48 1.48 1 0 0 48 49 1.48 1 0 0 49 50 1.57 1 1 0 50 51 1.58 1 1 0 51 52 1.58 1 1 0 52 53 1.58 1 1 0 53 54 1.58 1 1 0 54 55 1.59 1 1 0 55 56 1.60 1 1 1 56 57 1.60 1 1 2 57 58 1.61 1 1 3 58 59 1.61 1 1 4 59 60 1.61 1 1 5 60 61 1.62 1 1 6 61 62 1.63 1 1 7 62 63 1.63 1 1 8 63 64 1.64 1 1 9 64 65 1.64 1 1 10 65 66 1.64 1 1 11 66 67 1.64 1 1 12 67 68 1.64 1 1 13 68 69 1.65 1 1 14 69 70 1.65 1 1 15 70 71 1.65 1 1 16 71 72 1.65 1 1 17 72 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x1 x2 x3 t 1.430e+00 4.730e-02 1.058e-01 4.326e-03 8.868e-05 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.0172056 -0.0008936 -0.0001523 0.0007760 0.0126214 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.430e+00 1.416e-03 1009.979 <2e-16 *** x1 4.730e-02 2.603e-03 18.173 <2e-16 *** x2 1.058e-01 2.441e-03 43.350 <2e-16 *** x3 4.326e-03 2.000e-04 21.627 <2e-16 *** t 8.868e-05 8.953e-05 0.991 0.325 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.004779 on 67 degrees of freedom Multiple R-Squared: 0.9964, Adjusted R-squared: 0.9962 F-statistic: 4653 on 4 and 67 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/rcomp/tmp/1zuzn1197985107.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/2fl6v1197985107.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/30cf81197985107.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/4ri111197985107.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/5b8pv1197985107.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 2.718100e-04 1.831293e-04 9.444871e-05 5.768064e-06 -8.291258e-05 6 7 8 9 10 -1.715932e-04 -2.602739e-04 -3.489545e-04 -4.376351e-04 -5.263158e-04 11 12 13 14 15 -6.149964e-04 -7.036771e-04 -7.923577e-04 -8.810384e-04 -9.697190e-04 16 17 18 19 20 -1.058400e-03 -1.147080e-03 -1.235761e-03 8.675558e-03 1.285869e-03 21 22 23 24 25 1.197189e-03 1.108508e-03 1.019827e-03 9.311467e-04 8.424661e-04 26 27 28 29 30 7.537855e-04 6.651048e-04 5.764242e-04 4.877435e-04 3.990629e-04 31 32 33 34 35 3.103822e-04 2.217016e-04 1.330210e-04 4.434032e-05 -4.434032e-05 36 37 38 39 40 -1.330210e-04 -2.217016e-04 -3.103822e-04 -3.990629e-04 -4.877435e-04 41 42 43 44 45 -5.764242e-04 -6.651048e-04 -7.537855e-04 -8.424661e-04 -9.311467e-04 46 47 48 49 50 -1.019827e-03 -1.108508e-03 -1.197189e-03 -1.285869e-03 -1.720561e-02 51 52 53 54 55 -7.294287e-03 -7.382968e-03 -7.471648e-03 -7.560329e-03 2.350990e-03 56 57 58 59 60 7.936592e-03 3.522193e-03 9.107795e-03 4.693396e-03 2.789973e-04 61 62 63 64 65 5.864599e-03 1.145020e-02 7.035801e-03 1.262140e-02 8.207004e-03 66 67 68 69 70 3.792606e-03 -6.217930e-04 -5.036192e-03 5.494098e-04 -3.864989e-03 71 72 -8.279387e-03 -1.269379e-02 > postscript(file="/var/www/html/rcomp/tmp/6f38o1197985107.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 2.718100e-04 NA 1 1.831293e-04 2.718100e-04 2 9.444871e-05 1.831293e-04 3 5.768064e-06 9.444871e-05 4 -8.291258e-05 5.768064e-06 5 -1.715932e-04 -8.291258e-05 6 -2.602739e-04 -1.715932e-04 7 -3.489545e-04 -2.602739e-04 8 -4.376351e-04 -3.489545e-04 9 -5.263158e-04 -4.376351e-04 10 -6.149964e-04 -5.263158e-04 11 -7.036771e-04 -6.149964e-04 12 -7.923577e-04 -7.036771e-04 13 -8.810384e-04 -7.923577e-04 14 -9.697190e-04 -8.810384e-04 15 -1.058400e-03 -9.697190e-04 16 -1.147080e-03 -1.058400e-03 17 -1.235761e-03 -1.147080e-03 18 8.675558e-03 -1.235761e-03 19 1.285869e-03 8.675558e-03 20 1.197189e-03 1.285869e-03 21 1.108508e-03 1.197189e-03 22 1.019827e-03 1.108508e-03 23 9.311467e-04 1.019827e-03 24 8.424661e-04 9.311467e-04 25 7.537855e-04 8.424661e-04 26 6.651048e-04 7.537855e-04 27 5.764242e-04 6.651048e-04 28 4.877435e-04 5.764242e-04 29 3.990629e-04 4.877435e-04 30 3.103822e-04 3.990629e-04 31 2.217016e-04 3.103822e-04 32 1.330210e-04 2.217016e-04 33 4.434032e-05 1.330210e-04 34 -4.434032e-05 4.434032e-05 35 -1.330210e-04 -4.434032e-05 36 -2.217016e-04 -1.330210e-04 37 -3.103822e-04 -2.217016e-04 38 -3.990629e-04 -3.103822e-04 39 -4.877435e-04 -3.990629e-04 40 -5.764242e-04 -4.877435e-04 41 -6.651048e-04 -5.764242e-04 42 -7.537855e-04 -6.651048e-04 43 -8.424661e-04 -7.537855e-04 44 -9.311467e-04 -8.424661e-04 45 -1.019827e-03 -9.311467e-04 46 -1.108508e-03 -1.019827e-03 47 -1.197189e-03 -1.108508e-03 48 -1.285869e-03 -1.197189e-03 49 -1.720561e-02 -1.285869e-03 50 -7.294287e-03 -1.720561e-02 51 -7.382968e-03 -7.294287e-03 52 -7.471648e-03 -7.382968e-03 53 -7.560329e-03 -7.471648e-03 54 2.350990e-03 -7.560329e-03 55 7.936592e-03 2.350990e-03 56 3.522193e-03 7.936592e-03 57 9.107795e-03 3.522193e-03 58 4.693396e-03 9.107795e-03 59 2.789973e-04 4.693396e-03 60 5.864599e-03 2.789973e-04 61 1.145020e-02 5.864599e-03 62 7.035801e-03 1.145020e-02 63 1.262140e-02 7.035801e-03 64 8.207004e-03 1.262140e-02 65 3.792606e-03 8.207004e-03 66 -6.217930e-04 3.792606e-03 67 -5.036192e-03 -6.217930e-04 68 5.494098e-04 -5.036192e-03 69 -3.864989e-03 5.494098e-04 70 -8.279387e-03 -3.864989e-03 71 -1.269379e-02 -8.279387e-03 72 NA -1.269379e-02 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.831293e-04 2.718100e-04 [2,] 9.444871e-05 1.831293e-04 [3,] 5.768064e-06 9.444871e-05 [4,] -8.291258e-05 5.768064e-06 [5,] -1.715932e-04 -8.291258e-05 [6,] -2.602739e-04 -1.715932e-04 [7,] -3.489545e-04 -2.602739e-04 [8,] -4.376351e-04 -3.489545e-04 [9,] -5.263158e-04 -4.376351e-04 [10,] -6.149964e-04 -5.263158e-04 [11,] -7.036771e-04 -6.149964e-04 [12,] -7.923577e-04 -7.036771e-04 [13,] -8.810384e-04 -7.923577e-04 [14,] -9.697190e-04 -8.810384e-04 [15,] -1.058400e-03 -9.697190e-04 [16,] -1.147080e-03 -1.058400e-03 [17,] -1.235761e-03 -1.147080e-03 [18,] 8.675558e-03 -1.235761e-03 [19,] 1.285869e-03 8.675558e-03 [20,] 1.197189e-03 1.285869e-03 [21,] 1.108508e-03 1.197189e-03 [22,] 1.019827e-03 1.108508e-03 [23,] 9.311467e-04 1.019827e-03 [24,] 8.424661e-04 9.311467e-04 [25,] 7.537855e-04 8.424661e-04 [26,] 6.651048e-04 7.537855e-04 [27,] 5.764242e-04 6.651048e-04 [28,] 4.877435e-04 5.764242e-04 [29,] 3.990629e-04 4.877435e-04 [30,] 3.103822e-04 3.990629e-04 [31,] 2.217016e-04 3.103822e-04 [32,] 1.330210e-04 2.217016e-04 [33,] 4.434032e-05 1.330210e-04 [34,] -4.434032e-05 4.434032e-05 [35,] -1.330210e-04 -4.434032e-05 [36,] -2.217016e-04 -1.330210e-04 [37,] -3.103822e-04 -2.217016e-04 [38,] -3.990629e-04 -3.103822e-04 [39,] -4.877435e-04 -3.990629e-04 [40,] -5.764242e-04 -4.877435e-04 [41,] -6.651048e-04 -5.764242e-04 [42,] -7.537855e-04 -6.651048e-04 [43,] -8.424661e-04 -7.537855e-04 [44,] -9.311467e-04 -8.424661e-04 [45,] -1.019827e-03 -9.311467e-04 [46,] -1.108508e-03 -1.019827e-03 [47,] -1.197189e-03 -1.108508e-03 [48,] -1.285869e-03 -1.197189e-03 [49,] -1.720561e-02 -1.285869e-03 [50,] -7.294287e-03 -1.720561e-02 [51,] -7.382968e-03 -7.294287e-03 [52,] -7.471648e-03 -7.382968e-03 [53,] -7.560329e-03 -7.471648e-03 [54,] 2.350990e-03 -7.560329e-03 [55,] 7.936592e-03 2.350990e-03 [56,] 3.522193e-03 7.936592e-03 [57,] 9.107795e-03 3.522193e-03 [58,] 4.693396e-03 9.107795e-03 [59,] 2.789973e-04 4.693396e-03 [60,] 5.864599e-03 2.789973e-04 [61,] 1.145020e-02 5.864599e-03 [62,] 7.035801e-03 1.145020e-02 [63,] 1.262140e-02 7.035801e-03 [64,] 8.207004e-03 1.262140e-02 [65,] 3.792606e-03 8.207004e-03 [66,] -6.217930e-04 3.792606e-03 [67,] -5.036192e-03 -6.217930e-04 [68,] 5.494098e-04 -5.036192e-03 [69,] -3.864989e-03 5.494098e-04 [70,] -8.279387e-03 -3.864989e-03 [71,] -1.269379e-02 -8.279387e-03 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.831293e-04 2.718100e-04 2 9.444871e-05 1.831293e-04 3 5.768064e-06 9.444871e-05 4 -8.291258e-05 5.768064e-06 5 -1.715932e-04 -8.291258e-05 6 -2.602739e-04 -1.715932e-04 7 -3.489545e-04 -2.602739e-04 8 -4.376351e-04 -3.489545e-04 9 -5.263158e-04 -4.376351e-04 10 -6.149964e-04 -5.263158e-04 11 -7.036771e-04 -6.149964e-04 12 -7.923577e-04 -7.036771e-04 13 -8.810384e-04 -7.923577e-04 14 -9.697190e-04 -8.810384e-04 15 -1.058400e-03 -9.697190e-04 16 -1.147080e-03 -1.058400e-03 17 -1.235761e-03 -1.147080e-03 18 8.675558e-03 -1.235761e-03 19 1.285869e-03 8.675558e-03 20 1.197189e-03 1.285869e-03 21 1.108508e-03 1.197189e-03 22 1.019827e-03 1.108508e-03 23 9.311467e-04 1.019827e-03 24 8.424661e-04 9.311467e-04 25 7.537855e-04 8.424661e-04 26 6.651048e-04 7.537855e-04 27 5.764242e-04 6.651048e-04 28 4.877435e-04 5.764242e-04 29 3.990629e-04 4.877435e-04 30 3.103822e-04 3.990629e-04 31 2.217016e-04 3.103822e-04 32 1.330210e-04 2.217016e-04 33 4.434032e-05 1.330210e-04 34 -4.434032e-05 4.434032e-05 35 -1.330210e-04 -4.434032e-05 36 -2.217016e-04 -1.330210e-04 37 -3.103822e-04 -2.217016e-04 38 -3.990629e-04 -3.103822e-04 39 -4.877435e-04 -3.990629e-04 40 -5.764242e-04 -4.877435e-04 41 -6.651048e-04 -5.764242e-04 42 -7.537855e-04 -6.651048e-04 43 -8.424661e-04 -7.537855e-04 44 -9.311467e-04 -8.424661e-04 45 -1.019827e-03 -9.311467e-04 46 -1.108508e-03 -1.019827e-03 47 -1.197189e-03 -1.108508e-03 48 -1.285869e-03 -1.197189e-03 49 -1.720561e-02 -1.285869e-03 50 -7.294287e-03 -1.720561e-02 51 -7.382968e-03 -7.294287e-03 52 -7.471648e-03 -7.382968e-03 53 -7.560329e-03 -7.471648e-03 54 2.350990e-03 -7.560329e-03 55 7.936592e-03 2.350990e-03 56 3.522193e-03 7.936592e-03 57 9.107795e-03 3.522193e-03 58 4.693396e-03 9.107795e-03 59 2.789973e-04 4.693396e-03 60 5.864599e-03 2.789973e-04 61 1.145020e-02 5.864599e-03 62 7.035801e-03 1.145020e-02 63 1.262140e-02 7.035801e-03 64 8.207004e-03 1.262140e-02 65 3.792606e-03 8.207004e-03 66 -6.217930e-04 3.792606e-03 67 -5.036192e-03 -6.217930e-04 68 5.494098e-04 -5.036192e-03 69 -3.864989e-03 5.494098e-04 70 -8.279387e-03 -3.864989e-03 71 -1.269379e-02 -8.279387e-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/7bglz1197985107.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/8adiu1197985107.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/98hni1197985107.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/10k4871197985108.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/11lz2a1197985108.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/12ldbb1197985108.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/13buo21197985108.tab") > > system("convert tmp/1zuzn1197985107.ps tmp/1zuzn1197985107.png") > system("convert tmp/2fl6v1197985107.ps tmp/2fl6v1197985107.png") > system("convert tmp/30cf81197985107.ps tmp/30cf81197985107.png") > system("convert tmp/4ri111197985107.ps tmp/4ri111197985107.png") > system("convert tmp/5b8pv1197985107.ps tmp/5b8pv1197985107.png") > system("convert tmp/6f38o1197985107.ps tmp/6f38o1197985107.png") > system("convert tmp/7bglz1197985107.ps tmp/7bglz1197985107.png") > system("convert tmp/8adiu1197985107.ps tmp/8adiu1197985107.png") > system("convert tmp/98hni1197985107.ps tmp/98hni1197985107.png") > > > proc.time() user system elapsed 2.263 1.445 2.569