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. 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(0.84,0,0.76,0,0.77,0,0.76,0,0.77,0,0.78,0,0.79,0,0.78,0,0.76,0,0.78,1,0.76,1,0.74,1,0.73,1,0.72,1,0.71,1,0.73,1,0.75,1,0.75,1,0.72,1,0.72,1,0.72,1,0.74,1,0.78,1,0.74,1,0.74,1,0.75,1,0.78,1,0.81,1,0.75,1,0.7,1,0.71,1,0.71,1,0.73,1,0.74,1,0.74,1,0.75,1,0.74,1,0.74,1,0.73,1,0.76,1,0.8,1,0.83,1,0.81,1,0.83,1,0.88,1,0.89,1,0.93,1,0.91,1,0.9,1,0.86,1,0.88,1,0.93,1,0.98,1,0.97,1,1.03,1,1.06,1,1.06,1,1.09,1,1.04,1,1,1,1.04,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 0.84 0 1 0 0 0 0 0 0 0 0 0 0 1 2 0.76 0 0 1 0 0 0 0 0 0 0 0 0 2 3 0.77 0 0 0 1 0 0 0 0 0 0 0 0 3 4 0.76 0 0 0 0 1 0 0 0 0 0 0 0 4 5 0.77 0 0 0 0 0 1 0 0 0 0 0 0 5 6 0.78 0 0 0 0 0 0 1 0 0 0 0 0 6 7 0.79 0 0 0 0 0 0 0 1 0 0 0 0 7 8 0.78 0 0 0 0 0 0 0 0 1 0 0 0 8 9 0.76 0 0 0 0 0 0 0 0 0 1 0 0 9 10 0.78 1 0 0 0 0 0 0 0 0 0 1 0 10 11 0.76 1 0 0 0 0 0 0 0 0 0 0 1 11 12 0.74 1 0 0 0 0 0 0 0 0 0 0 0 12 13 0.73 1 1 0 0 0 0 0 0 0 0 0 0 13 14 0.72 1 0 1 0 0 0 0 0 0 0 0 0 14 15 0.71 1 0 0 1 0 0 0 0 0 0 0 0 15 16 0.73 1 0 0 0 1 0 0 0 0 0 0 0 16 17 0.75 1 0 0 0 0 1 0 0 0 0 0 0 17 18 0.75 1 0 0 0 0 0 1 0 0 0 0 0 18 19 0.72 1 0 0 0 0 0 0 1 0 0 0 0 19 20 0.72 1 0 0 0 0 0 0 0 1 0 0 0 20 21 0.72 1 0 0 0 0 0 0 0 0 1 0 0 21 22 0.74 1 0 0 0 0 0 0 0 0 0 1 0 22 23 0.78 1 0 0 0 0 0 0 0 0 0 0 1 23 24 0.74 1 0 0 0 0 0 0 0 0 0 0 0 24 25 0.74 1 1 0 0 0 0 0 0 0 0 0 0 25 26 0.75 1 0 1 0 0 0 0 0 0 0 0 0 26 27 0.78 1 0 0 1 0 0 0 0 0 0 0 0 27 28 0.81 1 0 0 0 1 0 0 0 0 0 0 0 28 29 0.75 1 0 0 0 0 1 0 0 0 0 0 0 29 30 0.70 1 0 0 0 0 0 1 0 0 0 0 0 30 31 0.71 1 0 0 0 0 0 0 1 0 0 0 0 31 32 0.71 1 0 0 0 0 0 0 0 1 0 0 0 32 33 0.73 1 0 0 0 0 0 0 0 0 1 0 0 33 34 0.74 1 0 0 0 0 0 0 0 0 0 1 0 34 35 0.74 1 0 0 0 0 0 0 0 0 0 0 1 35 36 0.75 1 0 0 0 0 0 0 0 0 0 0 0 36 37 0.74 1 1 0 0 0 0 0 0 0 0 0 0 37 38 0.74 1 0 1 0 0 0 0 0 0 0 0 0 38 39 0.73 1 0 0 1 0 0 0 0 0 0 0 0 39 40 0.76 1 0 0 0 1 0 0 0 0 0 0 0 40 41 0.80 1 0 0 0 0 1 0 0 0 0 0 0 41 42 0.83 1 0 0 0 0 0 1 0 0 0 0 0 42 43 0.81 1 0 0 0 0 0 0 1 0 0 0 0 43 44 0.83 1 0 0 0 0 0 0 0 1 0 0 0 44 45 0.88 1 0 0 0 0 0 0 0 0 1 0 0 45 46 0.89 1 0 0 0 0 0 0 0 0 0 1 0 46 47 0.93 1 0 0 0 0 0 0 0 0 0 0 1 47 48 0.91 1 0 0 0 0 0 0 0 0 0 0 0 48 49 0.90 1 1 0 0 0 0 0 0 0 0 0 0 49 50 0.86 1 0 1 0 0 0 0 0 0 0 0 0 50 51 0.88 1 0 0 1 0 0 0 0 0 0 0 0 51 52 0.93 1 0 0 0 1 0 0 0 0 0 0 0 52 53 0.98 1 0 0 0 0 1 0 0 0 0 0 0 53 54 0.97 1 0 0 0 0 0 1 0 0 0 0 0 54 55 1.03 1 0 0 0 0 0 0 1 0 0 0 0 55 56 1.06 1 0 0 0 0 0 0 0 1 0 0 0 56 57 1.06 1 0 0 0 0 0 0 0 0 1 0 0 57 58 1.09 1 0 0 0 0 0 0 0 0 0 1 0 58 59 1.04 1 0 0 0 0 0 0 0 0 0 0 1 59 60 1.00 1 0 0 0 0 0 0 0 0 0 0 0 60 61 1.04 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 0.761614 -0.160983 0.008415 -0.031039 -0.029354 -0.011670 M5 M6 M7 M8 M9 M10 -0.005986 -0.016302 -0.016618 -0.014933 -0.011249 0.032632 M11 t 0.028316 0.006316 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.11000 -0.03359 0.00421 0.04399 0.12062 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.7616138 0.0367157 20.744 < 2e-16 *** x -0.1609828 0.0294926 -5.458 1.76e-06 *** M1 0.0084152 0.0382887 0.220 0.827 M2 -0.0310385 0.0401212 -0.774 0.443 M3 -0.0293543 0.0400925 -0.732 0.468 M4 -0.0116701 0.0400723 -0.291 0.772 M5 -0.0059859 0.0400607 -0.149 0.882 M6 -0.0163017 0.0400576 -0.407 0.686 M7 -0.0166175 0.0400630 -0.415 0.680 M8 -0.0149333 0.0400770 -0.373 0.711 M9 -0.0112491 0.0400996 -0.281 0.780 M10 0.0326316 0.0398007 0.820 0.416 M11 0.0283158 0.0397877 0.712 0.480 t 0.0063158 0.0005854 10.789 2.61e-14 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.0629 on 47 degrees of freedom Multiple R-squared: 0.7313, Adjusted R-squared: 0.657 F-statistic: 9.84 on 13 and 47 DF, p-value: 1.836e-09 > postscript(file="/var/www/html/rcomp/tmp/15m1u1227470864.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/2zbss1227470864.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/3btl21227470864.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/4qrgx1227470864.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/5arct1227470864.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 0.0636551724 0.0167931034 0.0187931034 -0.0152068966 -0.0172068966 6 7 8 9 10 -0.0032068966 0.0007931034 -0.0172068966 -0.0472068966 0.0835793103 11 12 13 14 15 0.0615793103 0.0635793103 0.0388482759 0.0619862069 0.0439862069 16 17 18 19 20 0.0399862069 0.0479862069 0.0519862069 0.0159862069 0.0079862069 21 22 23 24 25 -0.0020137931 -0.0322103448 0.0057896552 -0.0122103448 -0.0269413793 26 27 28 29 30 0.0161965517 0.0381965517 0.0441965517 -0.0278034483 -0.0738034483 31 32 33 34 35 -0.0698034483 -0.0778034483 -0.0678034483 -0.1080000000 -0.1100000000 36 37 38 39 40 -0.0780000000 -0.1027310345 -0.0695931034 -0.0875931034 -0.0815931034 41 42 43 44 45 -0.0535931034 -0.0195931034 -0.0455931034 -0.0335931034 0.0064068966 46 47 48 49 50 -0.0337896552 0.0042103448 0.0062103448 -0.0185206897 -0.0253827586 51 52 53 54 55 -0.0133827586 0.0126172414 0.0506172414 0.0446172414 0.0986172414 56 57 58 59 60 0.1206172414 0.1106172414 0.0904206897 0.0384206897 0.0204206897 61 0.0456896552 > postscript(file="/var/www/html/rcomp/tmp/6ucs61227470864.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 0.0636551724 NA 1 0.0167931034 0.0636551724 2 0.0187931034 0.0167931034 3 -0.0152068966 0.0187931034 4 -0.0172068966 -0.0152068966 5 -0.0032068966 -0.0172068966 6 0.0007931034 -0.0032068966 7 -0.0172068966 0.0007931034 8 -0.0472068966 -0.0172068966 9 0.0835793103 -0.0472068966 10 0.0615793103 0.0835793103 11 0.0635793103 0.0615793103 12 0.0388482759 0.0635793103 13 0.0619862069 0.0388482759 14 0.0439862069 0.0619862069 15 0.0399862069 0.0439862069 16 0.0479862069 0.0399862069 17 0.0519862069 0.0479862069 18 0.0159862069 0.0519862069 19 0.0079862069 0.0159862069 20 -0.0020137931 0.0079862069 21 -0.0322103448 -0.0020137931 22 0.0057896552 -0.0322103448 23 -0.0122103448 0.0057896552 24 -0.0269413793 -0.0122103448 25 0.0161965517 -0.0269413793 26 0.0381965517 0.0161965517 27 0.0441965517 0.0381965517 28 -0.0278034483 0.0441965517 29 -0.0738034483 -0.0278034483 30 -0.0698034483 -0.0738034483 31 -0.0778034483 -0.0698034483 32 -0.0678034483 -0.0778034483 33 -0.1080000000 -0.0678034483 34 -0.1100000000 -0.1080000000 35 -0.0780000000 -0.1100000000 36 -0.1027310345 -0.0780000000 37 -0.0695931034 -0.1027310345 38 -0.0875931034 -0.0695931034 39 -0.0815931034 -0.0875931034 40 -0.0535931034 -0.0815931034 41 -0.0195931034 -0.0535931034 42 -0.0455931034 -0.0195931034 43 -0.0335931034 -0.0455931034 44 0.0064068966 -0.0335931034 45 -0.0337896552 0.0064068966 46 0.0042103448 -0.0337896552 47 0.0062103448 0.0042103448 48 -0.0185206897 0.0062103448 49 -0.0253827586 -0.0185206897 50 -0.0133827586 -0.0253827586 51 0.0126172414 -0.0133827586 52 0.0506172414 0.0126172414 53 0.0446172414 0.0506172414 54 0.0986172414 0.0446172414 55 0.1206172414 0.0986172414 56 0.1106172414 0.1206172414 57 0.0904206897 0.1106172414 58 0.0384206897 0.0904206897 59 0.0204206897 0.0384206897 60 0.0456896552 0.0204206897 61 NA 0.0456896552 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.0167931034 0.0636551724 [2,] 0.0187931034 0.0167931034 [3,] -0.0152068966 0.0187931034 [4,] -0.0172068966 -0.0152068966 [5,] -0.0032068966 -0.0172068966 [6,] 0.0007931034 -0.0032068966 [7,] -0.0172068966 0.0007931034 [8,] -0.0472068966 -0.0172068966 [9,] 0.0835793103 -0.0472068966 [10,] 0.0615793103 0.0835793103 [11,] 0.0635793103 0.0615793103 [12,] 0.0388482759 0.0635793103 [13,] 0.0619862069 0.0388482759 [14,] 0.0439862069 0.0619862069 [15,] 0.0399862069 0.0439862069 [16,] 0.0479862069 0.0399862069 [17,] 0.0519862069 0.0479862069 [18,] 0.0159862069 0.0519862069 [19,] 0.0079862069 0.0159862069 [20,] -0.0020137931 0.0079862069 [21,] -0.0322103448 -0.0020137931 [22,] 0.0057896552 -0.0322103448 [23,] -0.0122103448 0.0057896552 [24,] -0.0269413793 -0.0122103448 [25,] 0.0161965517 -0.0269413793 [26,] 0.0381965517 0.0161965517 [27,] 0.0441965517 0.0381965517 [28,] -0.0278034483 0.0441965517 [29,] -0.0738034483 -0.0278034483 [30,] -0.0698034483 -0.0738034483 [31,] -0.0778034483 -0.0698034483 [32,] -0.0678034483 -0.0778034483 [33,] -0.1080000000 -0.0678034483 [34,] -0.1100000000 -0.1080000000 [35,] -0.0780000000 -0.1100000000 [36,] -0.1027310345 -0.0780000000 [37,] -0.0695931034 -0.1027310345 [38,] -0.0875931034 -0.0695931034 [39,] -0.0815931034 -0.0875931034 [40,] -0.0535931034 -0.0815931034 [41,] -0.0195931034 -0.0535931034 [42,] -0.0455931034 -0.0195931034 [43,] -0.0335931034 -0.0455931034 [44,] 0.0064068966 -0.0335931034 [45,] -0.0337896552 0.0064068966 [46,] 0.0042103448 -0.0337896552 [47,] 0.0062103448 0.0042103448 [48,] -0.0185206897 0.0062103448 [49,] -0.0253827586 -0.0185206897 [50,] -0.0133827586 -0.0253827586 [51,] 0.0126172414 -0.0133827586 [52,] 0.0506172414 0.0126172414 [53,] 0.0446172414 0.0506172414 [54,] 0.0986172414 0.0446172414 [55,] 0.1206172414 0.0986172414 [56,] 0.1106172414 0.1206172414 [57,] 0.0904206897 0.1106172414 [58,] 0.0384206897 0.0904206897 [59,] 0.0204206897 0.0384206897 [60,] 0.0456896552 0.0204206897 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.0167931034 0.0636551724 2 0.0187931034 0.0167931034 3 -0.0152068966 0.0187931034 4 -0.0172068966 -0.0152068966 5 -0.0032068966 -0.0172068966 6 0.0007931034 -0.0032068966 7 -0.0172068966 0.0007931034 8 -0.0472068966 -0.0172068966 9 0.0835793103 -0.0472068966 10 0.0615793103 0.0835793103 11 0.0635793103 0.0615793103 12 0.0388482759 0.0635793103 13 0.0619862069 0.0388482759 14 0.0439862069 0.0619862069 15 0.0399862069 0.0439862069 16 0.0479862069 0.0399862069 17 0.0519862069 0.0479862069 18 0.0159862069 0.0519862069 19 0.0079862069 0.0159862069 20 -0.0020137931 0.0079862069 21 -0.0322103448 -0.0020137931 22 0.0057896552 -0.0322103448 23 -0.0122103448 0.0057896552 24 -0.0269413793 -0.0122103448 25 0.0161965517 -0.0269413793 26 0.0381965517 0.0161965517 27 0.0441965517 0.0381965517 28 -0.0278034483 0.0441965517 29 -0.0738034483 -0.0278034483 30 -0.0698034483 -0.0738034483 31 -0.0778034483 -0.0698034483 32 -0.0678034483 -0.0778034483 33 -0.1080000000 -0.0678034483 34 -0.1100000000 -0.1080000000 35 -0.0780000000 -0.1100000000 36 -0.1027310345 -0.0780000000 37 -0.0695931034 -0.1027310345 38 -0.0875931034 -0.0695931034 39 -0.0815931034 -0.0875931034 40 -0.0535931034 -0.0815931034 41 -0.0195931034 -0.0535931034 42 -0.0455931034 -0.0195931034 43 -0.0335931034 -0.0455931034 44 0.0064068966 -0.0335931034 45 -0.0337896552 0.0064068966 46 0.0042103448 -0.0337896552 47 0.0062103448 0.0042103448 48 -0.0185206897 0.0062103448 49 -0.0253827586 -0.0185206897 50 -0.0133827586 -0.0253827586 51 0.0126172414 -0.0133827586 52 0.0506172414 0.0126172414 53 0.0446172414 0.0506172414 54 0.0986172414 0.0446172414 55 0.1206172414 0.0986172414 56 0.1106172414 0.1206172414 57 0.0904206897 0.1106172414 58 0.0384206897 0.0904206897 59 0.0204206897 0.0384206897 60 0.0456896552 0.0204206897 > 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/7ginh1227470864.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/832gu1227470864.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/97bbb1227470864.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/10vdr71227470864.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/1148tn1227470864.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/12nh0o1227470864.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/13v9nc1227470864.tab") > > system("convert tmp/15m1u1227470864.ps tmp/15m1u1227470864.png") > system("convert tmp/2zbss1227470864.ps tmp/2zbss1227470864.png") > system("convert tmp/3btl21227470864.ps tmp/3btl21227470864.png") > system("convert tmp/4qrgx1227470864.ps tmp/4qrgx1227470864.png") > system("convert tmp/5arct1227470864.ps tmp/5arct1227470864.png") > system("convert tmp/6ucs61227470864.ps tmp/6ucs61227470864.png") > system("convert tmp/7ginh1227470864.ps tmp/7ginh1227470864.png") > system("convert tmp/832gu1227470864.ps tmp/832gu1227470864.png") > system("convert tmp/97bbb1227470864.ps tmp/97bbb1227470864.png") > > > proc.time() user system elapsed 1.956 1.421 2.302