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.1608,0,1.1208,0,1.0883,0,1.0704,0,1.0628,0,1.0378,0,1.0353,0,1.0604,0,1.0501,0,1.0706,0,1.0338,0,1.0110,0,1.0137,0,0.9834,0,0.9643,0,0.9470,0,0.9060,0,0.9492,0,0.9397,0,0.9041,0,0.8721,0,0.8552,0,0.8564,0,0.8973,0,0.9383,0,0.9217,0,0.9095,0,0.8920,0,0.8742,0,0.8532,0,0.8607,0,0.9005,0,0.9111,1,0.9059,1,0.8883,1,0.8924,1,0.8833,1,0.8700,1,0.8758,1,0.8858,1,0.9170,1,0.9554,1,0.9922,1,0.9778,1,0.9808,1,0.9811,1,1.0014,1,1.0183,1,1.0622,1,1.0773,1,1.0807,1,1.0848,1,1.1582,1,1.1663,1,1.1372,1,1.1139,1,1.1222,1,1.1692,1,1.1702,1,1.2286,1),dim=c(2,60),dimnames=list(c('y','x'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('y','x'),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' > #'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 1.1608 0 1 0 0 0 0 0 0 0 0 0 0 1 2 1.1208 0 0 1 0 0 0 0 0 0 0 0 0 2 3 1.0883 0 0 0 1 0 0 0 0 0 0 0 0 3 4 1.0704 0 0 0 0 1 0 0 0 0 0 0 0 4 5 1.0628 0 0 0 0 0 1 0 0 0 0 0 0 5 6 1.0378 0 0 0 0 0 0 1 0 0 0 0 0 6 7 1.0353 0 0 0 0 0 0 0 1 0 0 0 0 7 8 1.0604 0 0 0 0 0 0 0 0 1 0 0 0 8 9 1.0501 0 0 0 0 0 0 0 0 0 1 0 0 9 10 1.0706 0 0 0 0 0 0 0 0 0 0 1 0 10 11 1.0338 0 0 0 0 0 0 0 0 0 0 0 1 11 12 1.0110 0 0 0 0 0 0 0 0 0 0 0 0 12 13 1.0137 0 1 0 0 0 0 0 0 0 0 0 0 13 14 0.9834 0 0 1 0 0 0 0 0 0 0 0 0 14 15 0.9643 0 0 0 1 0 0 0 0 0 0 0 0 15 16 0.9470 0 0 0 0 1 0 0 0 0 0 0 0 16 17 0.9060 0 0 0 0 0 1 0 0 0 0 0 0 17 18 0.9492 0 0 0 0 0 0 1 0 0 0 0 0 18 19 0.9397 0 0 0 0 0 0 0 1 0 0 0 0 19 20 0.9041 0 0 0 0 0 0 0 0 1 0 0 0 20 21 0.8721 0 0 0 0 0 0 0 0 0 1 0 0 21 22 0.8552 0 0 0 0 0 0 0 0 0 0 1 0 22 23 0.8564 0 0 0 0 0 0 0 0 0 0 0 1 23 24 0.8973 0 0 0 0 0 0 0 0 0 0 0 0 24 25 0.9383 0 1 0 0 0 0 0 0 0 0 0 0 25 26 0.9217 0 0 1 0 0 0 0 0 0 0 0 0 26 27 0.9095 0 0 0 1 0 0 0 0 0 0 0 0 27 28 0.8920 0 0 0 0 1 0 0 0 0 0 0 0 28 29 0.8742 0 0 0 0 0 1 0 0 0 0 0 0 29 30 0.8532 0 0 0 0 0 0 1 0 0 0 0 0 30 31 0.8607 0 0 0 0 0 0 0 1 0 0 0 0 31 32 0.9005 0 0 0 0 0 0 0 0 1 0 0 0 32 33 0.9111 1 0 0 0 0 0 0 0 0 1 0 0 33 34 0.9059 1 0 0 0 0 0 0 0 0 0 1 0 34 35 0.8883 1 0 0 0 0 0 0 0 0 0 0 1 35 36 0.8924 1 0 0 0 0 0 0 0 0 0 0 0 36 37 0.8833 1 1 0 0 0 0 0 0 0 0 0 0 37 38 0.8700 1 0 1 0 0 0 0 0 0 0 0 0 38 39 0.8758 1 0 0 1 0 0 0 0 0 0 0 0 39 40 0.8858 1 0 0 0 1 0 0 0 0 0 0 0 40 41 0.9170 1 0 0 0 0 1 0 0 0 0 0 0 41 42 0.9554 1 0 0 0 0 0 1 0 0 0 0 0 42 43 0.9922 1 0 0 0 0 0 0 1 0 0 0 0 43 44 0.9778 1 0 0 0 0 0 0 0 1 0 0 0 44 45 0.9808 1 0 0 0 0 0 0 0 0 1 0 0 45 46 0.9811 1 0 0 0 0 0 0 0 0 0 1 0 46 47 1.0014 1 0 0 0 0 0 0 0 0 0 0 1 47 48 1.0183 1 0 0 0 0 0 0 0 0 0 0 0 48 49 1.0622 1 1 0 0 0 0 0 0 0 0 0 0 49 50 1.0773 1 0 1 0 0 0 0 0 0 0 0 0 50 51 1.0807 1 0 0 1 0 0 0 0 0 0 0 0 51 52 1.0848 1 0 0 0 1 0 0 0 0 0 0 0 52 53 1.1582 1 0 0 0 0 1 0 0 0 0 0 0 53 54 1.1663 1 0 0 0 0 0 1 0 0 0 0 0 54 55 1.1372 1 0 0 0 0 0 0 1 0 0 0 0 55 56 1.1139 1 0 0 0 0 0 0 0 1 0 0 0 56 57 1.1222 1 0 0 0 0 0 0 0 0 1 0 0 57 58 1.1692 1 0 0 0 0 0 0 0 0 0 1 0 58 59 1.1702 1 0 0 0 0 0 0 0 0 0 0 1 59 60 1.2286 1 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) x M1 M2 M3 M4 9.789e-01 4.684e-02 1.228e-02 -4.806e-03 -1.580e-02 -2.359e-02 M5 M6 M7 M8 M9 M10 -1.602e-02 -7.348e-03 -6.779e-03 -8.529e-03 -2.205e-02 -1.298e-02 M11 t -1.943e-02 7.056e-05 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.15731 -0.08400 -0.01720 0.09028 0.19865 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.789e-01 6.073e-02 16.119 <2e-16 *** x 4.684e-02 5.843e-02 0.802 0.427 M1 1.228e-02 7.087e-02 0.173 0.863 M2 -4.806e-03 7.069e-02 -0.068 0.946 M3 -1.580e-02 7.055e-02 -0.224 0.824 M4 -2.359e-02 7.045e-02 -0.335 0.739 M5 -1.602e-02 7.038e-02 -0.228 0.821 M6 -7.348e-03 7.036e-02 -0.104 0.917 M7 -6.779e-03 7.038e-02 -0.096 0.924 M8 -8.529e-03 7.045e-02 -0.121 0.904 M9 -2.205e-02 7.030e-02 -0.314 0.755 M10 -1.298e-02 7.020e-02 -0.185 0.854 M11 -1.943e-02 7.014e-02 -0.277 0.783 t 7.056e-05 1.687e-03 0.042 0.967 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1109 on 46 degrees of freedom Multiple R-Squared: 0.06643, Adjusted R-squared: -0.1974 F-statistic: 0.2518 on 13 and 46 DF, p-value: 0.9953 > postscript(file="/var/www/html/rcomp/tmp/1u0691197027688.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/2fs141197027688.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/3ibwu1197027688.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/4rqze1197027688.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/5vro91197027688.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 = 60 Frequency = 1 1 2 3 4 5 0.1695700000 0.1465900000 0.1250100000 0.1148300000 0.0995900000 6 7 8 9 10 0.0658500000 0.0627100000 0.0894900000 0.0926383333 0.1039983333 11 12 13 14 15 0.0735783333 0.0312783333 0.0216233333 0.0083433333 0.0001633333 16 17 18 19 20 -0.0094166667 -0.0580566667 -0.0235966667 -0.0337366667 -0.0676566667 21 22 23 24 25 -0.0862083333 -0.1122483333 -0.1046683333 -0.0832683333 -0.0546233333 26 27 28 29 30 -0.0542033333 -0.0554833333 -0.0652633333 -0.0907033333 -0.1204433333 31 32 33 34 35 -0.1135833333 -0.0721033333 -0.0948966667 -0.1092366667 -0.1204566667 36 37 38 39 40 -0.1358566667 -0.1573116667 -0.1535916667 -0.1368716667 -0.1191516667 41 42 43 44 45 -0.0955916667 -0.0659316667 -0.0297716667 -0.0424916667 -0.0260433333 46 47 48 49 50 -0.0348833333 -0.0082033333 -0.0108033333 0.0207416667 0.0528616667 51 52 53 54 55 0.0671816667 0.0790016667 0.1447616667 0.1441216667 0.1143816667 56 57 58 59 60 0.0927616667 0.1145100000 0.1523700000 0.1597500000 0.1986500000 > postscript(file="/var/www/html/rcomp/tmp/6czqp1197027689.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 0.1695700000 NA 1 0.1465900000 0.1695700000 2 0.1250100000 0.1465900000 3 0.1148300000 0.1250100000 4 0.0995900000 0.1148300000 5 0.0658500000 0.0995900000 6 0.0627100000 0.0658500000 7 0.0894900000 0.0627100000 8 0.0926383333 0.0894900000 9 0.1039983333 0.0926383333 10 0.0735783333 0.1039983333 11 0.0312783333 0.0735783333 12 0.0216233333 0.0312783333 13 0.0083433333 0.0216233333 14 0.0001633333 0.0083433333 15 -0.0094166667 0.0001633333 16 -0.0580566667 -0.0094166667 17 -0.0235966667 -0.0580566667 18 -0.0337366667 -0.0235966667 19 -0.0676566667 -0.0337366667 20 -0.0862083333 -0.0676566667 21 -0.1122483333 -0.0862083333 22 -0.1046683333 -0.1122483333 23 -0.0832683333 -0.1046683333 24 -0.0546233333 -0.0832683333 25 -0.0542033333 -0.0546233333 26 -0.0554833333 -0.0542033333 27 -0.0652633333 -0.0554833333 28 -0.0907033333 -0.0652633333 29 -0.1204433333 -0.0907033333 30 -0.1135833333 -0.1204433333 31 -0.0721033333 -0.1135833333 32 -0.0948966667 -0.0721033333 33 -0.1092366667 -0.0948966667 34 -0.1204566667 -0.1092366667 35 -0.1358566667 -0.1204566667 36 -0.1573116667 -0.1358566667 37 -0.1535916667 -0.1573116667 38 -0.1368716667 -0.1535916667 39 -0.1191516667 -0.1368716667 40 -0.0955916667 -0.1191516667 41 -0.0659316667 -0.0955916667 42 -0.0297716667 -0.0659316667 43 -0.0424916667 -0.0297716667 44 -0.0260433333 -0.0424916667 45 -0.0348833333 -0.0260433333 46 -0.0082033333 -0.0348833333 47 -0.0108033333 -0.0082033333 48 0.0207416667 -0.0108033333 49 0.0528616667 0.0207416667 50 0.0671816667 0.0528616667 51 0.0790016667 0.0671816667 52 0.1447616667 0.0790016667 53 0.1441216667 0.1447616667 54 0.1143816667 0.1441216667 55 0.0927616667 0.1143816667 56 0.1145100000 0.0927616667 57 0.1523700000 0.1145100000 58 0.1597500000 0.1523700000 59 0.1986500000 0.1597500000 60 NA 0.1986500000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.1465900000 0.1695700000 [2,] 0.1250100000 0.1465900000 [3,] 0.1148300000 0.1250100000 [4,] 0.0995900000 0.1148300000 [5,] 0.0658500000 0.0995900000 [6,] 0.0627100000 0.0658500000 [7,] 0.0894900000 0.0627100000 [8,] 0.0926383333 0.0894900000 [9,] 0.1039983333 0.0926383333 [10,] 0.0735783333 0.1039983333 [11,] 0.0312783333 0.0735783333 [12,] 0.0216233333 0.0312783333 [13,] 0.0083433333 0.0216233333 [14,] 0.0001633333 0.0083433333 [15,] -0.0094166667 0.0001633333 [16,] -0.0580566667 -0.0094166667 [17,] -0.0235966667 -0.0580566667 [18,] -0.0337366667 -0.0235966667 [19,] -0.0676566667 -0.0337366667 [20,] -0.0862083333 -0.0676566667 [21,] -0.1122483333 -0.0862083333 [22,] -0.1046683333 -0.1122483333 [23,] -0.0832683333 -0.1046683333 [24,] -0.0546233333 -0.0832683333 [25,] -0.0542033333 -0.0546233333 [26,] -0.0554833333 -0.0542033333 [27,] -0.0652633333 -0.0554833333 [28,] -0.0907033333 -0.0652633333 [29,] -0.1204433333 -0.0907033333 [30,] -0.1135833333 -0.1204433333 [31,] -0.0721033333 -0.1135833333 [32,] -0.0948966667 -0.0721033333 [33,] -0.1092366667 -0.0948966667 [34,] -0.1204566667 -0.1092366667 [35,] -0.1358566667 -0.1204566667 [36,] -0.1573116667 -0.1358566667 [37,] -0.1535916667 -0.1573116667 [38,] -0.1368716667 -0.1535916667 [39,] -0.1191516667 -0.1368716667 [40,] -0.0955916667 -0.1191516667 [41,] -0.0659316667 -0.0955916667 [42,] -0.0297716667 -0.0659316667 [43,] -0.0424916667 -0.0297716667 [44,] -0.0260433333 -0.0424916667 [45,] -0.0348833333 -0.0260433333 [46,] -0.0082033333 -0.0348833333 [47,] -0.0108033333 -0.0082033333 [48,] 0.0207416667 -0.0108033333 [49,] 0.0528616667 0.0207416667 [50,] 0.0671816667 0.0528616667 [51,] 0.0790016667 0.0671816667 [52,] 0.1447616667 0.0790016667 [53,] 0.1441216667 0.1447616667 [54,] 0.1143816667 0.1441216667 [55,] 0.0927616667 0.1143816667 [56,] 0.1145100000 0.0927616667 [57,] 0.1523700000 0.1145100000 [58,] 0.1597500000 0.1523700000 [59,] 0.1986500000 0.1597500000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.1465900000 0.1695700000 2 0.1250100000 0.1465900000 3 0.1148300000 0.1250100000 4 0.0995900000 0.1148300000 5 0.0658500000 0.0995900000 6 0.0627100000 0.0658500000 7 0.0894900000 0.0627100000 8 0.0926383333 0.0894900000 9 0.1039983333 0.0926383333 10 0.0735783333 0.1039983333 11 0.0312783333 0.0735783333 12 0.0216233333 0.0312783333 13 0.0083433333 0.0216233333 14 0.0001633333 0.0083433333 15 -0.0094166667 0.0001633333 16 -0.0580566667 -0.0094166667 17 -0.0235966667 -0.0580566667 18 -0.0337366667 -0.0235966667 19 -0.0676566667 -0.0337366667 20 -0.0862083333 -0.0676566667 21 -0.1122483333 -0.0862083333 22 -0.1046683333 -0.1122483333 23 -0.0832683333 -0.1046683333 24 -0.0546233333 -0.0832683333 25 -0.0542033333 -0.0546233333 26 -0.0554833333 -0.0542033333 27 -0.0652633333 -0.0554833333 28 -0.0907033333 -0.0652633333 29 -0.1204433333 -0.0907033333 30 -0.1135833333 -0.1204433333 31 -0.0721033333 -0.1135833333 32 -0.0948966667 -0.0721033333 33 -0.1092366667 -0.0948966667 34 -0.1204566667 -0.1092366667 35 -0.1358566667 -0.1204566667 36 -0.1573116667 -0.1358566667 37 -0.1535916667 -0.1573116667 38 -0.1368716667 -0.1535916667 39 -0.1191516667 -0.1368716667 40 -0.0955916667 -0.1191516667 41 -0.0659316667 -0.0955916667 42 -0.0297716667 -0.0659316667 43 -0.0424916667 -0.0297716667 44 -0.0260433333 -0.0424916667 45 -0.0348833333 -0.0260433333 46 -0.0082033333 -0.0348833333 47 -0.0108033333 -0.0082033333 48 0.0207416667 -0.0108033333 49 0.0528616667 0.0207416667 50 0.0671816667 0.0528616667 51 0.0790016667 0.0671816667 52 0.1447616667 0.0790016667 53 0.1441216667 0.1447616667 54 0.1143816667 0.1441216667 55 0.0927616667 0.1143816667 56 0.1145100000 0.0927616667 57 0.1523700000 0.1145100000 58 0.1597500000 0.1523700000 59 0.1986500000 0.1597500000 > 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/7jrc71197027689.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/8lsjt1197027689.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/9v4ap1197027689.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/10xkye1197027689.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/11esr61197027689.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/12g99d1197027689.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/13r3dn1197027689.tab") > > system("convert tmp/1u0691197027688.ps tmp/1u0691197027688.png") > system("convert tmp/2fs141197027688.ps tmp/2fs141197027688.png") > system("convert tmp/3ibwu1197027688.ps tmp/3ibwu1197027688.png") > system("convert tmp/4rqze1197027688.ps tmp/4rqze1197027688.png") > system("convert tmp/5vro91197027688.ps tmp/5vro91197027688.png") > system("convert tmp/6czqp1197027689.ps tmp/6czqp1197027689.png") > system("convert tmp/7jrc71197027689.ps tmp/7jrc71197027689.png") > system("convert tmp/8lsjt1197027689.ps tmp/8lsjt1197027689.png") > system("convert tmp/9v4ap1197027689.ps tmp/9v4ap1197027689.png") > > > proc.time() user system elapsed 2.303 1.465 2.679