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(8638.7,0,11063.7,0,11855.7,0,10684.5,0,11337.4,0,10478,0,11123.9,0,12909.3,0,11339.9,0,10462.2,0,12733.5,0,10519.2,0,10414.9,0,12476.8,0,12384.6,0,12266.7,0,12919.9,0,11497.3,0,12142,0,13919.4,0,12656.8,0,12034.1,0,13199.7,0,10881.3,0,11301.2,0,13643.9,0,12517,0,13981.1,0,14275.7,0,13435,0,13565.7,0,16216.3,0,12970,0,14079.9,0,14235,0,12213.4,0,12581,0,14130.4,0,14210.8,0,14378.5,0,13142.8,0,13714.7,1,13621.9,1,15379.8,1,13306.3,1,14391.2,1,14909.9,1,14025.4,1,12951.2,1,14344.3,1,16213.3,1,15544.5,1,14750.6,1,17292.7,1,17568.5,1,17930.8,1,18644.7,1,16694.8,1,17242.8,1,16979.9,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 8638.7 0 1 0 0 0 0 0 0 0 0 0 0 1 2 11063.7 0 0 1 0 0 0 0 0 0 0 0 0 2 3 11855.7 0 0 0 1 0 0 0 0 0 0 0 0 3 4 10684.5 0 0 0 0 1 0 0 0 0 0 0 0 4 5 11337.4 0 0 0 0 0 1 0 0 0 0 0 0 5 6 10478.0 0 0 0 0 0 0 1 0 0 0 0 0 6 7 11123.9 0 0 0 0 0 0 0 1 0 0 0 0 7 8 12909.3 0 0 0 0 0 0 0 0 1 0 0 0 8 9 11339.9 0 0 0 0 0 0 0 0 0 1 0 0 9 10 10462.2 0 0 0 0 0 0 0 0 0 0 1 0 10 11 12733.5 0 0 0 0 0 0 0 0 0 0 0 1 11 12 10519.2 0 0 0 0 0 0 0 0 0 0 0 0 12 13 10414.9 0 1 0 0 0 0 0 0 0 0 0 0 13 14 12476.8 0 0 1 0 0 0 0 0 0 0 0 0 14 15 12384.6 0 0 0 1 0 0 0 0 0 0 0 0 15 16 12266.7 0 0 0 0 1 0 0 0 0 0 0 0 16 17 12919.9 0 0 0 0 0 1 0 0 0 0 0 0 17 18 11497.3 0 0 0 0 0 0 1 0 0 0 0 0 18 19 12142.0 0 0 0 0 0 0 0 1 0 0 0 0 19 20 13919.4 0 0 0 0 0 0 0 0 1 0 0 0 20 21 12656.8 0 0 0 0 0 0 0 0 0 1 0 0 21 22 12034.1 0 0 0 0 0 0 0 0 0 0 1 0 22 23 13199.7 0 0 0 0 0 0 0 0 0 0 0 1 23 24 10881.3 0 0 0 0 0 0 0 0 0 0 0 0 24 25 11301.2 0 1 0 0 0 0 0 0 0 0 0 0 25 26 13643.9 0 0 1 0 0 0 0 0 0 0 0 0 26 27 12517.0 0 0 0 1 0 0 0 0 0 0 0 0 27 28 13981.1 0 0 0 0 1 0 0 0 0 0 0 0 28 29 14275.7 0 0 0 0 0 1 0 0 0 0 0 0 29 30 13435.0 0 0 0 0 0 0 1 0 0 0 0 0 30 31 13565.7 0 0 0 0 0 0 0 1 0 0 0 0 31 32 16216.3 0 0 0 0 0 0 0 0 1 0 0 0 32 33 12970.0 0 0 0 0 0 0 0 0 0 1 0 0 33 34 14079.9 0 0 0 0 0 0 0 0 0 0 1 0 34 35 14235.0 0 0 0 0 0 0 0 0 0 0 0 1 35 36 12213.4 0 0 0 0 0 0 0 0 0 0 0 0 36 37 12581.0 0 1 0 0 0 0 0 0 0 0 0 0 37 38 14130.4 0 0 1 0 0 0 0 0 0 0 0 0 38 39 14210.8 0 0 0 1 0 0 0 0 0 0 0 0 39 40 14378.5 0 0 0 0 1 0 0 0 0 0 0 0 40 41 13142.8 0 0 0 0 0 1 0 0 0 0 0 0 41 42 13714.7 1 0 0 0 0 0 1 0 0 0 0 0 42 43 13621.9 1 0 0 0 0 0 0 1 0 0 0 0 43 44 15379.8 1 0 0 0 0 0 0 0 1 0 0 0 44 45 13306.3 1 0 0 0 0 0 0 0 0 1 0 0 45 46 14391.2 1 0 0 0 0 0 0 0 0 0 1 0 46 47 14909.9 1 0 0 0 0 0 0 0 0 0 0 1 47 48 14025.4 1 0 0 0 0 0 0 0 0 0 0 0 48 49 12951.2 1 1 0 0 0 0 0 0 0 0 0 0 49 50 14344.3 1 0 1 0 0 0 0 0 0 0 0 0 50 51 16213.3 1 0 0 1 0 0 0 0 0 0 0 0 51 52 15544.5 1 0 0 0 1 0 0 0 0 0 0 0 52 53 14750.6 1 0 0 0 0 1 0 0 0 0 0 0 53 54 17292.7 1 0 0 0 0 0 1 0 0 0 0 0 54 55 17568.5 1 0 0 0 0 0 0 1 0 0 0 0 55 56 17930.8 1 0 0 0 0 0 0 0 1 0 0 0 56 57 18644.7 1 0 0 0 0 0 0 0 0 1 0 0 57 58 16694.8 1 0 0 0 0 0 0 0 0 0 1 0 58 59 17242.8 1 0 0 0 0 0 0 0 0 0 0 1 59 60 16979.9 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 9196.9 -137.0 -618.3 1231.1 1430.5 1260.2 M5 M6 M7 M8 M9 M10 1069.4 990.0 1205.8 2767.5 1174.8 818.7 M11 t 1645.4 105.0 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1655.62 -530.22 -29.52 474.18 2422.19 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9196.88 487.87 18.851 < 2e-16 *** x -137.01 420.15 -0.326 0.74583 M1 -618.30 561.93 -1.100 0.27692 M2 1231.07 560.91 2.195 0.03327 * M3 1430.48 560.12 2.554 0.01403 * M4 1260.21 559.55 2.252 0.02913 * M5 1069.38 559.21 1.912 0.06208 . M6 989.99 560.94 1.765 0.08422 . M7 1205.81 559.70 2.154 0.03648 * M8 2767.48 558.68 4.954 1.03e-05 *** M9 1174.85 557.88 2.106 0.04070 * M10 818.70 557.32 1.469 0.14864 M11 1645.39 556.97 2.954 0.00493 ** t 105.05 11.25 9.334 3.48e-12 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 880.5 on 46 degrees of freedom Multiple R-squared: 0.8661, Adjusted R-squared: 0.8283 F-statistic: 22.89 on 13 and 46 DF, p-value: 8.51e-16 > postscript(file="/var/www/html/rcomp/tmp/1zszz1227524900.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/2mgbf1227524900.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/3jdo81227524900.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/4r2dr1227524900.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/5yf6s1227524900.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 6 -44.92330 425.65670 913.19670 -192.78330 545.89670 -339.16543 7 8 9 10 11 12 -14.12543 104.55457 22.73457 -603.86543 735.69457 61.73457 13 14 15 16 17 18 470.68729 578.16729 181.50729 128.82729 867.80729 -580.45484 19 20 21 22 23 24 -256.61484 -145.93484 79.04516 -292.55484 -58.69484 -836.75484 25 26 27 28 29 30 96.39787 484.67787 -946.68213 582.63787 963.01787 96.65575 31 32 33 34 35 36 -93.50425 890.37575 -868.34425 492.65575 -283.98425 -765.24425 37 38 39 40 41 42 115.60846 -289.41154 -513.47154 -280.55154 -1430.47154 -747.22304 43 44 45 46 47 48 -1160.88304 -1069.70304 -1655.62304 -319.62304 -732.66304 -76.82304 49 50 51 52 53 54 -637.77032 -1199.09032 365.44968 -238.13032 -946.25032 1570.18755 55 56 57 58 59 60 1525.12755 220.70755 2422.18755 723.38755 339.64755 1617.08755 > postscript(file="/var/www/html/rcomp/tmp/68tsn1227524900.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 -44.92330 NA 1 425.65670 -44.92330 2 913.19670 425.65670 3 -192.78330 913.19670 4 545.89670 -192.78330 5 -339.16543 545.89670 6 -14.12543 -339.16543 7 104.55457 -14.12543 8 22.73457 104.55457 9 -603.86543 22.73457 10 735.69457 -603.86543 11 61.73457 735.69457 12 470.68729 61.73457 13 578.16729 470.68729 14 181.50729 578.16729 15 128.82729 181.50729 16 867.80729 128.82729 17 -580.45484 867.80729 18 -256.61484 -580.45484 19 -145.93484 -256.61484 20 79.04516 -145.93484 21 -292.55484 79.04516 22 -58.69484 -292.55484 23 -836.75484 -58.69484 24 96.39787 -836.75484 25 484.67787 96.39787 26 -946.68213 484.67787 27 582.63787 -946.68213 28 963.01787 582.63787 29 96.65575 963.01787 30 -93.50425 96.65575 31 890.37575 -93.50425 32 -868.34425 890.37575 33 492.65575 -868.34425 34 -283.98425 492.65575 35 -765.24425 -283.98425 36 115.60846 -765.24425 37 -289.41154 115.60846 38 -513.47154 -289.41154 39 -280.55154 -513.47154 40 -1430.47154 -280.55154 41 -747.22304 -1430.47154 42 -1160.88304 -747.22304 43 -1069.70304 -1160.88304 44 -1655.62304 -1069.70304 45 -319.62304 -1655.62304 46 -732.66304 -319.62304 47 -76.82304 -732.66304 48 -637.77032 -76.82304 49 -1199.09032 -637.77032 50 365.44968 -1199.09032 51 -238.13032 365.44968 52 -946.25032 -238.13032 53 1570.18755 -946.25032 54 1525.12755 1570.18755 55 220.70755 1525.12755 56 2422.18755 220.70755 57 723.38755 2422.18755 58 339.64755 723.38755 59 1617.08755 339.64755 60 NA 1617.08755 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 425.65670 -44.92330 [2,] 913.19670 425.65670 [3,] -192.78330 913.19670 [4,] 545.89670 -192.78330 [5,] -339.16543 545.89670 [6,] -14.12543 -339.16543 [7,] 104.55457 -14.12543 [8,] 22.73457 104.55457 [9,] -603.86543 22.73457 [10,] 735.69457 -603.86543 [11,] 61.73457 735.69457 [12,] 470.68729 61.73457 [13,] 578.16729 470.68729 [14,] 181.50729 578.16729 [15,] 128.82729 181.50729 [16,] 867.80729 128.82729 [17,] -580.45484 867.80729 [18,] -256.61484 -580.45484 [19,] -145.93484 -256.61484 [20,] 79.04516 -145.93484 [21,] -292.55484 79.04516 [22,] -58.69484 -292.55484 [23,] -836.75484 -58.69484 [24,] 96.39787 -836.75484 [25,] 484.67787 96.39787 [26,] -946.68213 484.67787 [27,] 582.63787 -946.68213 [28,] 963.01787 582.63787 [29,] 96.65575 963.01787 [30,] -93.50425 96.65575 [31,] 890.37575 -93.50425 [32,] -868.34425 890.37575 [33,] 492.65575 -868.34425 [34,] -283.98425 492.65575 [35,] -765.24425 -283.98425 [36,] 115.60846 -765.24425 [37,] -289.41154 115.60846 [38,] -513.47154 -289.41154 [39,] -280.55154 -513.47154 [40,] -1430.47154 -280.55154 [41,] -747.22304 -1430.47154 [42,] -1160.88304 -747.22304 [43,] -1069.70304 -1160.88304 [44,] -1655.62304 -1069.70304 [45,] -319.62304 -1655.62304 [46,] -732.66304 -319.62304 [47,] -76.82304 -732.66304 [48,] -637.77032 -76.82304 [49,] -1199.09032 -637.77032 [50,] 365.44968 -1199.09032 [51,] -238.13032 365.44968 [52,] -946.25032 -238.13032 [53,] 1570.18755 -946.25032 [54,] 1525.12755 1570.18755 [55,] 220.70755 1525.12755 [56,] 2422.18755 220.70755 [57,] 723.38755 2422.18755 [58,] 339.64755 723.38755 [59,] 1617.08755 339.64755 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 425.65670 -44.92330 2 913.19670 425.65670 3 -192.78330 913.19670 4 545.89670 -192.78330 5 -339.16543 545.89670 6 -14.12543 -339.16543 7 104.55457 -14.12543 8 22.73457 104.55457 9 -603.86543 22.73457 10 735.69457 -603.86543 11 61.73457 735.69457 12 470.68729 61.73457 13 578.16729 470.68729 14 181.50729 578.16729 15 128.82729 181.50729 16 867.80729 128.82729 17 -580.45484 867.80729 18 -256.61484 -580.45484 19 -145.93484 -256.61484 20 79.04516 -145.93484 21 -292.55484 79.04516 22 -58.69484 -292.55484 23 -836.75484 -58.69484 24 96.39787 -836.75484 25 484.67787 96.39787 26 -946.68213 484.67787 27 582.63787 -946.68213 28 963.01787 582.63787 29 96.65575 963.01787 30 -93.50425 96.65575 31 890.37575 -93.50425 32 -868.34425 890.37575 33 492.65575 -868.34425 34 -283.98425 492.65575 35 -765.24425 -283.98425 36 115.60846 -765.24425 37 -289.41154 115.60846 38 -513.47154 -289.41154 39 -280.55154 -513.47154 40 -1430.47154 -280.55154 41 -747.22304 -1430.47154 42 -1160.88304 -747.22304 43 -1069.70304 -1160.88304 44 -1655.62304 -1069.70304 45 -319.62304 -1655.62304 46 -732.66304 -319.62304 47 -76.82304 -732.66304 48 -637.77032 -76.82304 49 -1199.09032 -637.77032 50 365.44968 -1199.09032 51 -238.13032 365.44968 52 -946.25032 -238.13032 53 1570.18755 -946.25032 54 1525.12755 1570.18755 55 220.70755 1525.12755 56 2422.18755 220.70755 57 723.38755 2422.18755 58 339.64755 723.38755 59 1617.08755 339.64755 > 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/74rya1227524900.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/87cha1227524900.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/9ghbv1227524900.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/10spqq1227524900.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/11xsl71227524900.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/121yw01227524900.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/13ye8j1227524901.tab") > > system("convert tmp/1zszz1227524900.ps tmp/1zszz1227524900.png") > system("convert tmp/2mgbf1227524900.ps tmp/2mgbf1227524900.png") > system("convert tmp/3jdo81227524900.ps tmp/3jdo81227524900.png") > system("convert tmp/4r2dr1227524900.ps tmp/4r2dr1227524900.png") > system("convert tmp/5yf6s1227524900.ps tmp/5yf6s1227524900.png") > system("convert tmp/68tsn1227524900.ps tmp/68tsn1227524900.png") > system("convert tmp/74rya1227524900.ps tmp/74rya1227524900.png") > system("convert tmp/87cha1227524900.ps tmp/87cha1227524900.png") > system("convert tmp/9ghbv1227524900.ps tmp/9ghbv1227524900.png") > > > proc.time() user system elapsed 3.984 2.455 4.348