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(20.7246301,0,21.44580352,0,22.09413114,0,21.53321848,0,23.3470789,0,23.5656163,0,26.42117166,0,25.21193138,0,26.43574082,0,29.33500366,0,29.40056488,0,33.05013946,0,28.38072368,0,26.0059506,0,29.31314992,0,30.36212944,0,35.74543406,0,36.15337054,0,34.20838768,0,37.90895432,0,38.70297354,0,42.11944156,0,42.16314904,0,39.79566054,0,37.36261082,0,38.3533137,0,42.60022384,0,41.24529196,0,42.15586446,0,46.94183352,0,47.42990038,0,47.0583868,0,50.18347162,0,50.12519498,0,43.22669772,0,40.04333626,0,40.37114236,0,42.2141411,0,36.99838182,0,39.74466848,0,42.68035422,0,46.2935059,0,46.97097184,0,48.72655562,0,52.36884562,1,50.05234918,1,54.03701444,1,57.78128856,1,64.71620872,1,63.4122689,1,64.3592643,1,66.02743312,1,72.13919574,1,76.60464328,1,86.97060062,1,93.48301514,1,95.58825876,1,81.88596378,1,70.5511573,1,50.38015528,1,36.24807008,0),dim=c(2,61),dimnames=list(c('Olie','Dumivariabele'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Olie','Dumivariabele'),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 Olie Dumivariabele M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 20.72463 0 1 0 0 0 0 0 0 0 0 0 0 1 2 21.44580 0 0 1 0 0 0 0 0 0 0 0 0 2 3 22.09413 0 0 0 1 0 0 0 0 0 0 0 0 3 4 21.53322 0 0 0 0 1 0 0 0 0 0 0 0 4 5 23.34708 0 0 0 0 0 1 0 0 0 0 0 0 5 6 23.56562 0 0 0 0 0 0 1 0 0 0 0 0 6 7 26.42117 0 0 0 0 0 0 0 1 0 0 0 0 7 8 25.21193 0 0 0 0 0 0 0 0 1 0 0 0 8 9 26.43574 0 0 0 0 0 0 0 0 0 1 0 0 9 10 29.33500 0 0 0 0 0 0 0 0 0 0 1 0 10 11 29.40056 0 0 0 0 0 0 0 0 0 0 0 1 11 12 33.05014 0 0 0 0 0 0 0 0 0 0 0 0 12 13 28.38072 0 1 0 0 0 0 0 0 0 0 0 0 13 14 26.00595 0 0 1 0 0 0 0 0 0 0 0 0 14 15 29.31315 0 0 0 1 0 0 0 0 0 0 0 0 15 16 30.36213 0 0 0 0 1 0 0 0 0 0 0 0 16 17 35.74543 0 0 0 0 0 1 0 0 0 0 0 0 17 18 36.15337 0 0 0 0 0 0 1 0 0 0 0 0 18 19 34.20839 0 0 0 0 0 0 0 1 0 0 0 0 19 20 37.90895 0 0 0 0 0 0 0 0 1 0 0 0 20 21 38.70297 0 0 0 0 0 0 0 0 0 1 0 0 21 22 42.11944 0 0 0 0 0 0 0 0 0 0 1 0 22 23 42.16315 0 0 0 0 0 0 0 0 0 0 0 1 23 24 39.79566 0 0 0 0 0 0 0 0 0 0 0 0 24 25 37.36261 0 1 0 0 0 0 0 0 0 0 0 0 25 26 38.35331 0 0 1 0 0 0 0 0 0 0 0 0 26 27 42.60022 0 0 0 1 0 0 0 0 0 0 0 0 27 28 41.24529 0 0 0 0 1 0 0 0 0 0 0 0 28 29 42.15586 0 0 0 0 0 1 0 0 0 0 0 0 29 30 46.94183 0 0 0 0 0 0 1 0 0 0 0 0 30 31 47.42990 0 0 0 0 0 0 0 1 0 0 0 0 31 32 47.05839 0 0 0 0 0 0 0 0 1 0 0 0 32 33 50.18347 0 0 0 0 0 0 0 0 0 1 0 0 33 34 50.12519 0 0 0 0 0 0 0 0 0 0 1 0 34 35 43.22670 0 0 0 0 0 0 0 0 0 0 0 1 35 36 40.04334 0 0 0 0 0 0 0 0 0 0 0 0 36 37 40.37114 0 1 0 0 0 0 0 0 0 0 0 0 37 38 42.21414 0 0 1 0 0 0 0 0 0 0 0 0 38 39 36.99838 0 0 0 1 0 0 0 0 0 0 0 0 39 40 39.74467 0 0 0 0 1 0 0 0 0 0 0 0 40 41 42.68035 0 0 0 0 0 1 0 0 0 0 0 0 41 42 46.29351 0 0 0 0 0 0 1 0 0 0 0 0 42 43 46.97097 0 0 0 0 0 0 0 1 0 0 0 0 43 44 48.72656 0 0 0 0 0 0 0 0 1 0 0 0 44 45 52.36885 1 0 0 0 0 0 0 0 0 1 0 0 45 46 50.05235 1 0 0 0 0 0 0 0 0 0 1 0 46 47 54.03701 1 0 0 0 0 0 0 0 0 0 0 1 47 48 57.78129 1 0 0 0 0 0 0 0 0 0 0 0 48 49 64.71621 1 1 0 0 0 0 0 0 0 0 0 0 49 50 63.41227 1 0 1 0 0 0 0 0 0 0 0 0 50 51 64.35926 1 0 0 1 0 0 0 0 0 0 0 0 51 52 66.02743 1 0 0 0 1 0 0 0 0 0 0 0 52 53 72.13920 1 0 0 0 0 1 0 0 0 0 0 0 53 54 76.60464 1 0 0 0 0 0 1 0 0 0 0 0 54 55 86.97060 1 0 0 0 0 0 0 1 0 0 0 0 55 56 93.48302 1 0 0 0 0 0 0 0 1 0 0 0 56 57 95.58826 1 0 0 0 0 0 0 0 0 1 0 0 57 58 81.88596 1 0 0 0 0 0 0 0 0 0 1 0 58 59 70.55116 1 0 0 0 0 0 0 0 0 0 0 1 59 60 50.38016 1 0 0 0 0 0 0 0 0 0 0 0 60 61 36.24807 0 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) Dumivariabele M1 M2 M3 17.6501 16.2406 0.3332 2.8976 3.1270 M4 M5 M6 M7 M8 3.2792 6.1529 8.2938 10.2249 11.7451 M9 M10 M11 t 10.1177 7.6081 4.2229 0.5573 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17.0836 -3.2425 0.1762 3.3151 19.8122 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 17.65007 4.19797 4.204 0.000116 *** Dumivariabele 16.24065 3.43257 4.731 2.07e-05 *** M1 0.33324 4.82010 0.069 0.945176 M2 2.89758 5.03322 0.576 0.567570 M3 3.12699 5.02802 0.622 0.537005 M4 3.27918 5.02426 0.653 0.517149 M5 6.15289 5.02193 1.225 0.226603 M6 8.29377 5.02103 1.652 0.105240 M7 10.22486 5.02157 2.036 0.047389 * M8 11.74509 5.02354 2.338 0.023694 * M9 10.11772 5.00530 2.021 0.048954 * M10 7.60813 5.00170 1.521 0.134932 M11 4.22293 4.99954 0.845 0.402578 t 0.55733 0.08491 6.564 3.75e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.904 on 47 degrees of freedom Multiple R-squared: 0.8466, Adjusted R-squared: 0.8041 F-statistic: 19.95 on 13 and 47 DF, p-value: 7.532e-15 > postscript(file="/var/www/html/freestat/rcomp/tmp/13lpt1229872143.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/freestat/rcomp/tmp/2rxeh1229872143.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/freestat/rcomp/tmp/3o1gd1229872143.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/freestat/rcomp/tmp/4ovyq1229872143.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/freestat/rcomp/tmp/56pso1229872143.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 6 2.1839947 -0.2165058 -0.3549128 -1.6253435 -3.2425203 -5.7221913 7 8 9 10 11 12 -5.3550485 -8.6418510 -6.3480014 -1.4964711 1.3969641 8.7121393 13 14 15 16 17 18 3.1521599 -2.3442870 0.1761776 0.5156391 2.4679065 0.1776346 19 20 21 22 23 24 -4.2557608 -2.6327564 -0.7686970 4.6000384 7.4716199 8.7697320 25 26 27 28 29 30 5.4461187 3.3151477 6.7753232 4.7108732 2.1904085 4.2781692 31 32 33 34 35 36 2.2778235 -0.1712523 4.0238727 5.9178635 1.8472402 2.3294794 37 38 39 40 41 42 1.7667219 0.4880467 -5.5144472 -3.4776786 -3.9730300 -3.0580868 43 44 45 46 47 48 -4.8690334 -5.1910118 -16.7193295 -17.0835585 -10.2710193 -2.8611445 49 50 51 52 53 54 3.1832120 -1.2424016 -1.0821409 -0.1234902 2.5572353 4.3244744 55 56 57 58 59 60 12.2020192 16.6368715 19.8121553 8.0621277 -0.4448048 -16.9502062 61 -15.7322071 > postscript(file="/var/www/html/freestat/rcomp/tmp/6w5t81229872143.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 2.1839947 NA 1 -0.2165058 2.1839947 2 -0.3549128 -0.2165058 3 -1.6253435 -0.3549128 4 -3.2425203 -1.6253435 5 -5.7221913 -3.2425203 6 -5.3550485 -5.7221913 7 -8.6418510 -5.3550485 8 -6.3480014 -8.6418510 9 -1.4964711 -6.3480014 10 1.3969641 -1.4964711 11 8.7121393 1.3969641 12 3.1521599 8.7121393 13 -2.3442870 3.1521599 14 0.1761776 -2.3442870 15 0.5156391 0.1761776 16 2.4679065 0.5156391 17 0.1776346 2.4679065 18 -4.2557608 0.1776346 19 -2.6327564 -4.2557608 20 -0.7686970 -2.6327564 21 4.6000384 -0.7686970 22 7.4716199 4.6000384 23 8.7697320 7.4716199 24 5.4461187 8.7697320 25 3.3151477 5.4461187 26 6.7753232 3.3151477 27 4.7108732 6.7753232 28 2.1904085 4.7108732 29 4.2781692 2.1904085 30 2.2778235 4.2781692 31 -0.1712523 2.2778235 32 4.0238727 -0.1712523 33 5.9178635 4.0238727 34 1.8472402 5.9178635 35 2.3294794 1.8472402 36 1.7667219 2.3294794 37 0.4880467 1.7667219 38 -5.5144472 0.4880467 39 -3.4776786 -5.5144472 40 -3.9730300 -3.4776786 41 -3.0580868 -3.9730300 42 -4.8690334 -3.0580868 43 -5.1910118 -4.8690334 44 -16.7193295 -5.1910118 45 -17.0835585 -16.7193295 46 -10.2710193 -17.0835585 47 -2.8611445 -10.2710193 48 3.1832120 -2.8611445 49 -1.2424016 3.1832120 50 -1.0821409 -1.2424016 51 -0.1234902 -1.0821409 52 2.5572353 -0.1234902 53 4.3244744 2.5572353 54 12.2020192 4.3244744 55 16.6368715 12.2020192 56 19.8121553 16.6368715 57 8.0621277 19.8121553 58 -0.4448048 8.0621277 59 -16.9502062 -0.4448048 60 -15.7322071 -16.9502062 61 NA -15.7322071 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.2165058 2.1839947 [2,] -0.3549128 -0.2165058 [3,] -1.6253435 -0.3549128 [4,] -3.2425203 -1.6253435 [5,] -5.7221913 -3.2425203 [6,] -5.3550485 -5.7221913 [7,] -8.6418510 -5.3550485 [8,] -6.3480014 -8.6418510 [9,] -1.4964711 -6.3480014 [10,] 1.3969641 -1.4964711 [11,] 8.7121393 1.3969641 [12,] 3.1521599 8.7121393 [13,] -2.3442870 3.1521599 [14,] 0.1761776 -2.3442870 [15,] 0.5156391 0.1761776 [16,] 2.4679065 0.5156391 [17,] 0.1776346 2.4679065 [18,] -4.2557608 0.1776346 [19,] -2.6327564 -4.2557608 [20,] -0.7686970 -2.6327564 [21,] 4.6000384 -0.7686970 [22,] 7.4716199 4.6000384 [23,] 8.7697320 7.4716199 [24,] 5.4461187 8.7697320 [25,] 3.3151477 5.4461187 [26,] 6.7753232 3.3151477 [27,] 4.7108732 6.7753232 [28,] 2.1904085 4.7108732 [29,] 4.2781692 2.1904085 [30,] 2.2778235 4.2781692 [31,] -0.1712523 2.2778235 [32,] 4.0238727 -0.1712523 [33,] 5.9178635 4.0238727 [34,] 1.8472402 5.9178635 [35,] 2.3294794 1.8472402 [36,] 1.7667219 2.3294794 [37,] 0.4880467 1.7667219 [38,] -5.5144472 0.4880467 [39,] -3.4776786 -5.5144472 [40,] -3.9730300 -3.4776786 [41,] -3.0580868 -3.9730300 [42,] -4.8690334 -3.0580868 [43,] -5.1910118 -4.8690334 [44,] -16.7193295 -5.1910118 [45,] -17.0835585 -16.7193295 [46,] -10.2710193 -17.0835585 [47,] -2.8611445 -10.2710193 [48,] 3.1832120 -2.8611445 [49,] -1.2424016 3.1832120 [50,] -1.0821409 -1.2424016 [51,] -0.1234902 -1.0821409 [52,] 2.5572353 -0.1234902 [53,] 4.3244744 2.5572353 [54,] 12.2020192 4.3244744 [55,] 16.6368715 12.2020192 [56,] 19.8121553 16.6368715 [57,] 8.0621277 19.8121553 [58,] -0.4448048 8.0621277 [59,] -16.9502062 -0.4448048 [60,] -15.7322071 -16.9502062 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.2165058 2.1839947 2 -0.3549128 -0.2165058 3 -1.6253435 -0.3549128 4 -3.2425203 -1.6253435 5 -5.7221913 -3.2425203 6 -5.3550485 -5.7221913 7 -8.6418510 -5.3550485 8 -6.3480014 -8.6418510 9 -1.4964711 -6.3480014 10 1.3969641 -1.4964711 11 8.7121393 1.3969641 12 3.1521599 8.7121393 13 -2.3442870 3.1521599 14 0.1761776 -2.3442870 15 0.5156391 0.1761776 16 2.4679065 0.5156391 17 0.1776346 2.4679065 18 -4.2557608 0.1776346 19 -2.6327564 -4.2557608 20 -0.7686970 -2.6327564 21 4.6000384 -0.7686970 22 7.4716199 4.6000384 23 8.7697320 7.4716199 24 5.4461187 8.7697320 25 3.3151477 5.4461187 26 6.7753232 3.3151477 27 4.7108732 6.7753232 28 2.1904085 4.7108732 29 4.2781692 2.1904085 30 2.2778235 4.2781692 31 -0.1712523 2.2778235 32 4.0238727 -0.1712523 33 5.9178635 4.0238727 34 1.8472402 5.9178635 35 2.3294794 1.8472402 36 1.7667219 2.3294794 37 0.4880467 1.7667219 38 -5.5144472 0.4880467 39 -3.4776786 -5.5144472 40 -3.9730300 -3.4776786 41 -3.0580868 -3.9730300 42 -4.8690334 -3.0580868 43 -5.1910118 -4.8690334 44 -16.7193295 -5.1910118 45 -17.0835585 -16.7193295 46 -10.2710193 -17.0835585 47 -2.8611445 -10.2710193 48 3.1832120 -2.8611445 49 -1.2424016 3.1832120 50 -1.0821409 -1.2424016 51 -0.1234902 -1.0821409 52 2.5572353 -0.1234902 53 4.3244744 2.5572353 54 12.2020192 4.3244744 55 16.6368715 12.2020192 56 19.8121553 16.6368715 57 8.0621277 19.8121553 58 -0.4448048 8.0621277 59 -16.9502062 -0.4448048 60 -15.7322071 -16.9502062 > 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/freestat/rcomp/tmp/7w6hx1229872143.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/freestat/rcomp/tmp/8uh941229872143.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/freestat/rcomp/tmp/97h2e1229872143.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/10gxdn1229872143.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/freestat/rcomp/tmp/11jhra1229872143.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/freestat/rcomp/tmp/12m3e51229872143.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/freestat/rcomp/tmp/136xx21229872143.tab") > > system("convert tmp/13lpt1229872143.ps tmp/13lpt1229872143.png") > system("convert tmp/2rxeh1229872143.ps tmp/2rxeh1229872143.png") > system("convert tmp/3o1gd1229872143.ps tmp/3o1gd1229872143.png") > system("convert tmp/4ovyq1229872143.ps tmp/4ovyq1229872143.png") > system("convert tmp/56pso1229872143.ps tmp/56pso1229872143.png") > system("convert tmp/6w5t81229872143.ps tmp/6w5t81229872143.png") > system("convert tmp/7w6hx1229872143.ps tmp/7w6hx1229872143.png") > system("convert tmp/8uh941229872143.ps tmp/8uh941229872143.png") > system("convert tmp/97h2e1229872143.ps tmp/97h2e1229872143.png") > > > proc.time() user system elapsed 2.943 2.187 3.384