R version 2.7.0 (2008-04-22) 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. 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(11857.9,0,14616,0,15643.4,0,14077.2,0,14887.5,0,14159.9,0,14643,0,17192.5,0,15386.1,0,14287.1,0,17526.6,0,14497,0,14398.3,0,16629.6,0,16670.7,0,16614.8,0,16869.2,0,15663.9,0,16359.9,0,18447.7,0,16889,0,16505,0,18320.9,0,15052.1,0,15699.8,0,18135.3,0,16768.7,0,18883,0,19021,0,18101.9,0,17776.1,0,21489.9,0,17065.3,0,18690,0,18953.1,0,16398.9,0,16895.7,0,18553,0,19270,0,19422.1,0,17579.4,0,18637.3,0,18076.7,0,20438.6,0,18075.2,0,19563,0,19899.2,0,19227.5,0,17789.6,0,19220.8,0,21968.9,0,21131.5,1,19484.6,1,22404.1,1,21099,1,22486.5,1,23707.5,1,21897.5,1,23326.4,1,23765.4,1,20444,1),dim=c(2,61),dimnames=list(c('y','x'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('y','x'),1:61)) > 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' > #'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 x M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 11857.9 0 1 0 0 0 0 0 0 0 0 0 0 1 2 14616.0 0 0 1 0 0 0 0 0 0 0 0 0 2 3 15643.4 0 0 0 1 0 0 0 0 0 0 0 0 3 4 14077.2 0 0 0 0 1 0 0 0 0 0 0 0 4 5 14887.5 0 0 0 0 0 1 0 0 0 0 0 0 5 6 14159.9 0 0 0 0 0 0 1 0 0 0 0 0 6 7 14643.0 0 0 0 0 0 0 0 1 0 0 0 0 7 8 17192.5 0 0 0 0 0 0 0 0 1 0 0 0 8 9 15386.1 0 0 0 0 0 0 0 0 0 1 0 0 9 10 14287.1 0 0 0 0 0 0 0 0 0 0 1 0 10 11 17526.6 0 0 0 0 0 0 0 0 0 0 0 1 11 12 14497.0 0 0 0 0 0 0 0 0 0 0 0 0 12 13 14398.3 0 1 0 0 0 0 0 0 0 0 0 0 13 14 16629.6 0 0 1 0 0 0 0 0 0 0 0 0 14 15 16670.7 0 0 0 1 0 0 0 0 0 0 0 0 15 16 16614.8 0 0 0 0 1 0 0 0 0 0 0 0 16 17 16869.2 0 0 0 0 0 1 0 0 0 0 0 0 17 18 15663.9 0 0 0 0 0 0 1 0 0 0 0 0 18 19 16359.9 0 0 0 0 0 0 0 1 0 0 0 0 19 20 18447.7 0 0 0 0 0 0 0 0 1 0 0 0 20 21 16889.0 0 0 0 0 0 0 0 0 0 1 0 0 21 22 16505.0 0 0 0 0 0 0 0 0 0 0 1 0 22 23 18320.9 0 0 0 0 0 0 0 0 0 0 0 1 23 24 15052.1 0 0 0 0 0 0 0 0 0 0 0 0 24 25 15699.8 0 1 0 0 0 0 0 0 0 0 0 0 25 26 18135.3 0 0 1 0 0 0 0 0 0 0 0 0 26 27 16768.7 0 0 0 1 0 0 0 0 0 0 0 0 27 28 18883.0 0 0 0 0 1 0 0 0 0 0 0 0 28 29 19021.0 0 0 0 0 0 1 0 0 0 0 0 0 29 30 18101.9 0 0 0 0 0 0 1 0 0 0 0 0 30 31 17776.1 0 0 0 0 0 0 0 1 0 0 0 0 31 32 21489.9 0 0 0 0 0 0 0 0 1 0 0 0 32 33 17065.3 0 0 0 0 0 0 0 0 0 1 0 0 33 34 18690.0 0 0 0 0 0 0 0 0 0 0 1 0 34 35 18953.1 0 0 0 0 0 0 0 0 0 0 0 1 35 36 16398.9 0 0 0 0 0 0 0 0 0 0 0 0 36 37 16895.7 0 1 0 0 0 0 0 0 0 0 0 0 37 38 18553.0 0 0 1 0 0 0 0 0 0 0 0 0 38 39 19270.0 0 0 0 1 0 0 0 0 0 0 0 0 39 40 19422.1 0 0 0 0 1 0 0 0 0 0 0 0 40 41 17579.4 0 0 0 0 0 1 0 0 0 0 0 0 41 42 18637.3 0 0 0 0 0 0 1 0 0 0 0 0 42 43 18076.7 0 0 0 0 0 0 0 1 0 0 0 0 43 44 20438.6 0 0 0 0 0 0 0 0 1 0 0 0 44 45 18075.2 0 0 0 0 0 0 0 0 0 1 0 0 45 46 19563.0 0 0 0 0 0 0 0 0 0 0 1 0 46 47 19899.2 0 0 0 0 0 0 0 0 0 0 0 1 47 48 19227.5 0 0 0 0 0 0 0 0 0 0 0 0 48 49 17789.6 0 1 0 0 0 0 0 0 0 0 0 0 49 50 19220.8 0 0 1 0 0 0 0 0 0 0 0 0 50 51 21968.9 0 0 0 1 0 0 0 0 0 0 0 0 51 52 21131.5 1 0 0 0 1 0 0 0 0 0 0 0 52 53 19484.6 1 0 0 0 0 1 0 0 0 0 0 0 53 54 22404.1 1 0 0 0 0 0 1 0 0 0 0 0 54 55 21099.0 1 0 0 0 0 0 0 1 0 0 0 0 55 56 22486.5 1 0 0 0 0 0 0 0 1 0 0 0 56 57 23707.5 1 0 0 0 0 0 0 0 0 1 0 0 57 58 21897.5 1 0 0 0 0 0 0 0 0 0 1 0 58 59 23326.4 1 0 0 0 0 0 0 0 0 0 0 1 59 60 23765.4 1 0 0 0 0 0 0 0 0 0 0 0 60 61 20444.0 1 1 0 0 0 0 0 0 0 0 0 0 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x M1 M2 M3 M4 13508.8 1429.1 -1005.0 1037.9 1560.4 1125.0 M5 M6 M7 M8 M9 M10 556.7 670.8 357.4 2666.6 769.2 622.2 M11 t 1928.0 110.9 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1889.38 -617.79 -62.47 422.69 2171.58 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13508.846 501.813 26.920 < 2e-16 *** x 1429.123 430.053 3.323 0.00173 ** M1 -1005.005 568.024 -1.769 0.08333 . M2 1037.893 596.684 1.739 0.08850 . M3 1560.362 596.226 2.617 0.01189 * M4 1124.986 596.349 1.886 0.06542 . M5 556.676 595.331 0.935 0.35453 M6 670.825 594.447 1.128 0.26484 M7 357.414 593.698 0.602 0.55006 M8 2666.583 593.084 4.496 4.51e-05 *** M9 769.232 592.606 1.298 0.20060 M10 622.202 592.265 1.051 0.29884 M11 1927.991 592.060 3.256 0.00210 ** t 110.931 8.996 12.332 2.44e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 936 on 47 degrees of freedom Multiple R-squared: 0.9017, Adjusted R-squared: 0.8745 F-statistic: 33.15 on 13 and 47 DF, p-value: < 2.2e-16 > postscript(file="/var/www/html/rcomp/tmp/1u59x1229257640.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/29utw1229257640.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/3opfe1229257640.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/4pwy51229257640.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/5fwvu1229257640.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 = 61 Frequency = 1 1 2 3 4 5 -756.8719647 -152.6005740 241.3994260 -1000.3560706 267.3239294 6 7 8 9 10 -685.3560706 0.2239294 129.6239294 109.6439294 -953.2560706 11 12 13 14 15 869.5239294 -343.0160706 452.3583223 529.8297130 -62.4702870 16 17 18 19 20 206.0742163 917.8542163 -512.5257837 385.9542163 53.6542163 21 22 23 24 25 281.3742163 -66.5257837 332.6542163 -1119.0857837 422.6886093 26 27 28 29 30 704.3600000 -1295.6400000 1143.1045033 1738.4845033 594.3045033 31 32 33 34 35 470.9845033 1764.6845033 -873.4954967 787.3045033 -366.3154967 36 37 38 39 40 -1103.4554967 287.4188962 -209.1097130 -125.5097130 351.0347903 41 42 43 44 45 -1034.2852097 -201.4652097 -559.5852097 -617.7852097 -1194.7652097 46 47 48 49 50 329.1347903 -751.3852097 393.9747903 -149.8508168 -872.4794260 51 52 53 54 55 1242.2205740 -699.8574393 -1889.3774393 805.0425607 -297.5774393 56 57 58 59 60 -1330.1774393 1677.2425607 -96.6574393 -84.4774393 2171.5825607 61 -255.7430464 > postscript(file="/var/www/html/rcomp/tmp/6nh0k1229257640.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 -756.8719647 NA 1 -152.6005740 -756.8719647 2 241.3994260 -152.6005740 3 -1000.3560706 241.3994260 4 267.3239294 -1000.3560706 5 -685.3560706 267.3239294 6 0.2239294 -685.3560706 7 129.6239294 0.2239294 8 109.6439294 129.6239294 9 -953.2560706 109.6439294 10 869.5239294 -953.2560706 11 -343.0160706 869.5239294 12 452.3583223 -343.0160706 13 529.8297130 452.3583223 14 -62.4702870 529.8297130 15 206.0742163 -62.4702870 16 917.8542163 206.0742163 17 -512.5257837 917.8542163 18 385.9542163 -512.5257837 19 53.6542163 385.9542163 20 281.3742163 53.6542163 21 -66.5257837 281.3742163 22 332.6542163 -66.5257837 23 -1119.0857837 332.6542163 24 422.6886093 -1119.0857837 25 704.3600000 422.6886093 26 -1295.6400000 704.3600000 27 1143.1045033 -1295.6400000 28 1738.4845033 1143.1045033 29 594.3045033 1738.4845033 30 470.9845033 594.3045033 31 1764.6845033 470.9845033 32 -873.4954967 1764.6845033 33 787.3045033 -873.4954967 34 -366.3154967 787.3045033 35 -1103.4554967 -366.3154967 36 287.4188962 -1103.4554967 37 -209.1097130 287.4188962 38 -125.5097130 -209.1097130 39 351.0347903 -125.5097130 40 -1034.2852097 351.0347903 41 -201.4652097 -1034.2852097 42 -559.5852097 -201.4652097 43 -617.7852097 -559.5852097 44 -1194.7652097 -617.7852097 45 329.1347903 -1194.7652097 46 -751.3852097 329.1347903 47 393.9747903 -751.3852097 48 -149.8508168 393.9747903 49 -872.4794260 -149.8508168 50 1242.2205740 -872.4794260 51 -699.8574393 1242.2205740 52 -1889.3774393 -699.8574393 53 805.0425607 -1889.3774393 54 -297.5774393 805.0425607 55 -1330.1774393 -297.5774393 56 1677.2425607 -1330.1774393 57 -96.6574393 1677.2425607 58 -84.4774393 -96.6574393 59 2171.5825607 -84.4774393 60 -255.7430464 2171.5825607 61 NA -255.7430464 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -152.6005740 -756.8719647 [2,] 241.3994260 -152.6005740 [3,] -1000.3560706 241.3994260 [4,] 267.3239294 -1000.3560706 [5,] -685.3560706 267.3239294 [6,] 0.2239294 -685.3560706 [7,] 129.6239294 0.2239294 [8,] 109.6439294 129.6239294 [9,] -953.2560706 109.6439294 [10,] 869.5239294 -953.2560706 [11,] -343.0160706 869.5239294 [12,] 452.3583223 -343.0160706 [13,] 529.8297130 452.3583223 [14,] -62.4702870 529.8297130 [15,] 206.0742163 -62.4702870 [16,] 917.8542163 206.0742163 [17,] -512.5257837 917.8542163 [18,] 385.9542163 -512.5257837 [19,] 53.6542163 385.9542163 [20,] 281.3742163 53.6542163 [21,] -66.5257837 281.3742163 [22,] 332.6542163 -66.5257837 [23,] -1119.0857837 332.6542163 [24,] 422.6886093 -1119.0857837 [25,] 704.3600000 422.6886093 [26,] -1295.6400000 704.3600000 [27,] 1143.1045033 -1295.6400000 [28,] 1738.4845033 1143.1045033 [29,] 594.3045033 1738.4845033 [30,] 470.9845033 594.3045033 [31,] 1764.6845033 470.9845033 [32,] -873.4954967 1764.6845033 [33,] 787.3045033 -873.4954967 [34,] -366.3154967 787.3045033 [35,] -1103.4554967 -366.3154967 [36,] 287.4188962 -1103.4554967 [37,] -209.1097130 287.4188962 [38,] -125.5097130 -209.1097130 [39,] 351.0347903 -125.5097130 [40,] -1034.2852097 351.0347903 [41,] -201.4652097 -1034.2852097 [42,] -559.5852097 -201.4652097 [43,] -617.7852097 -559.5852097 [44,] -1194.7652097 -617.7852097 [45,] 329.1347903 -1194.7652097 [46,] -751.3852097 329.1347903 [47,] 393.9747903 -751.3852097 [48,] -149.8508168 393.9747903 [49,] -872.4794260 -149.8508168 [50,] 1242.2205740 -872.4794260 [51,] -699.8574393 1242.2205740 [52,] -1889.3774393 -699.8574393 [53,] 805.0425607 -1889.3774393 [54,] -297.5774393 805.0425607 [55,] -1330.1774393 -297.5774393 [56,] 1677.2425607 -1330.1774393 [57,] -96.6574393 1677.2425607 [58,] -84.4774393 -96.6574393 [59,] 2171.5825607 -84.4774393 [60,] -255.7430464 2171.5825607 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -152.6005740 -756.8719647 2 241.3994260 -152.6005740 3 -1000.3560706 241.3994260 4 267.3239294 -1000.3560706 5 -685.3560706 267.3239294 6 0.2239294 -685.3560706 7 129.6239294 0.2239294 8 109.6439294 129.6239294 9 -953.2560706 109.6439294 10 869.5239294 -953.2560706 11 -343.0160706 869.5239294 12 452.3583223 -343.0160706 13 529.8297130 452.3583223 14 -62.4702870 529.8297130 15 206.0742163 -62.4702870 16 917.8542163 206.0742163 17 -512.5257837 917.8542163 18 385.9542163 -512.5257837 19 53.6542163 385.9542163 20 281.3742163 53.6542163 21 -66.5257837 281.3742163 22 332.6542163 -66.5257837 23 -1119.0857837 332.6542163 24 422.6886093 -1119.0857837 25 704.3600000 422.6886093 26 -1295.6400000 704.3600000 27 1143.1045033 -1295.6400000 28 1738.4845033 1143.1045033 29 594.3045033 1738.4845033 30 470.9845033 594.3045033 31 1764.6845033 470.9845033 32 -873.4954967 1764.6845033 33 787.3045033 -873.4954967 34 -366.3154967 787.3045033 35 -1103.4554967 -366.3154967 36 287.4188962 -1103.4554967 37 -209.1097130 287.4188962 38 -125.5097130 -209.1097130 39 351.0347903 -125.5097130 40 -1034.2852097 351.0347903 41 -201.4652097 -1034.2852097 42 -559.5852097 -201.4652097 43 -617.7852097 -559.5852097 44 -1194.7652097 -617.7852097 45 329.1347903 -1194.7652097 46 -751.3852097 329.1347903 47 393.9747903 -751.3852097 48 -149.8508168 393.9747903 49 -872.4794260 -149.8508168 50 1242.2205740 -872.4794260 51 -699.8574393 1242.2205740 52 -1889.3774393 -699.8574393 53 805.0425607 -1889.3774393 54 -297.5774393 805.0425607 55 -1330.1774393 -297.5774393 56 1677.2425607 -1330.1774393 57 -96.6574393 1677.2425607 58 -84.4774393 -96.6574393 59 2171.5825607 -84.4774393 60 -255.7430464 2171.5825607 > 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/7rm5w1229257640.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/80x1a1229257640.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/9nl651229257640.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 > > #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/107vtr1229257640.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/112d431229257640.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/127m431229257640.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/132ioj1229257640.tab") > > system("convert tmp/1u59x1229257640.ps tmp/1u59x1229257640.png") > system("convert tmp/29utw1229257640.ps tmp/29utw1229257640.png") > system("convert tmp/3opfe1229257640.ps tmp/3opfe1229257640.png") > system("convert tmp/4pwy51229257640.ps tmp/4pwy51229257640.png") > system("convert tmp/5fwvu1229257640.ps tmp/5fwvu1229257640.png") > system("convert tmp/6nh0k1229257640.ps tmp/6nh0k1229257640.png") > system("convert tmp/7rm5w1229257640.ps tmp/7rm5w1229257640.png") > system("convert tmp/80x1a1229257640.ps tmp/80x1a1229257640.png") > system("convert tmp/9nl651229257640.ps tmp/9nl651229257640.png") > > > proc.time() user system elapsed 4.551 3.012 4.934