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 = 'No 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 1 20.72463 0 1 0 0 0 0 0 0 0 0 0 0 2 21.44580 0 0 1 0 0 0 0 0 0 0 0 0 3 22.09413 0 0 0 1 0 0 0 0 0 0 0 0 4 21.53322 0 0 0 0 1 0 0 0 0 0 0 0 5 23.34708 0 0 0 0 0 1 0 0 0 0 0 0 6 23.56562 0 0 0 0 0 0 1 0 0 0 0 0 7 26.42117 0 0 0 0 0 0 0 1 0 0 0 0 8 25.21193 0 0 0 0 0 0 0 0 1 0 0 0 9 26.43574 0 0 0 0 0 0 0 0 0 1 0 0 10 29.33500 0 0 0 0 0 0 0 0 0 0 1 0 11 29.40056 0 0 0 0 0 0 0 0 0 0 0 1 12 33.05014 0 0 0 0 0 0 0 0 0 0 0 0 13 28.38072 0 1 0 0 0 0 0 0 0 0 0 0 14 26.00595 0 0 1 0 0 0 0 0 0 0 0 0 15 29.31315 0 0 0 1 0 0 0 0 0 0 0 0 16 30.36213 0 0 0 0 1 0 0 0 0 0 0 0 17 35.74543 0 0 0 0 0 1 0 0 0 0 0 0 18 36.15337 0 0 0 0 0 0 1 0 0 0 0 0 19 34.20839 0 0 0 0 0 0 0 1 0 0 0 0 20 37.90895 0 0 0 0 0 0 0 0 1 0 0 0 21 38.70297 0 0 0 0 0 0 0 0 0 1 0 0 22 42.11944 0 0 0 0 0 0 0 0 0 0 1 0 23 42.16315 0 0 0 0 0 0 0 0 0 0 0 1 24 39.79566 0 0 0 0 0 0 0 0 0 0 0 0 25 37.36261 0 1 0 0 0 0 0 0 0 0 0 0 26 38.35331 0 0 1 0 0 0 0 0 0 0 0 0 27 42.60022 0 0 0 1 0 0 0 0 0 0 0 0 28 41.24529 0 0 0 0 1 0 0 0 0 0 0 0 29 42.15586 0 0 0 0 0 1 0 0 0 0 0 0 30 46.94183 0 0 0 0 0 0 1 0 0 0 0 0 31 47.42990 0 0 0 0 0 0 0 1 0 0 0 0 32 47.05839 0 0 0 0 0 0 0 0 1 0 0 0 33 50.18347 0 0 0 0 0 0 0 0 0 1 0 0 34 50.12519 0 0 0 0 0 0 0 0 0 0 1 0 35 43.22670 0 0 0 0 0 0 0 0 0 0 0 1 36 40.04334 0 0 0 0 0 0 0 0 0 0 0 0 37 40.37114 0 1 0 0 0 0 0 0 0 0 0 0 38 42.21414 0 0 1 0 0 0 0 0 0 0 0 0 39 36.99838 0 0 0 1 0 0 0 0 0 0 0 0 40 39.74467 0 0 0 0 1 0 0 0 0 0 0 0 41 42.68035 0 0 0 0 0 1 0 0 0 0 0 0 42 46.29351 0 0 0 0 0 0 1 0 0 0 0 0 43 46.97097 0 0 0 0 0 0 0 1 0 0 0 0 44 48.72656 0 0 0 0 0 0 0 0 1 0 0 0 45 52.36885 1 0 0 0 0 0 0 0 0 1 0 0 46 50.05235 1 0 0 0 0 0 0 0 0 0 1 0 47 54.03701 1 0 0 0 0 0 0 0 0 0 0 1 48 57.78129 1 0 0 0 0 0 0 0 0 0 0 0 49 64.71621 1 1 0 0 0 0 0 0 0 0 0 0 50 63.41227 1 0 1 0 0 0 0 0 0 0 0 0 51 64.35926 1 0 0 1 0 0 0 0 0 0 0 0 52 66.02743 1 0 0 0 1 0 0 0 0 0 0 0 53 72.13920 1 0 0 0 0 1 0 0 0 0 0 0 54 76.60464 1 0 0 0 0 0 1 0 0 0 0 0 55 86.97060 1 0 0 0 0 0 0 1 0 0 0 0 56 93.48302 1 0 0 0 0 0 0 0 1 0 0 0 57 95.58826 1 0 0 0 0 0 0 0 0 1 0 0 58 81.88596 1 0 0 0 0 0 0 0 0 0 1 0 59 70.55116 1 0 0 0 0 0 0 0 0 0 0 1 60 50.38016 1 0 0 0 0 0 0 0 0 0 0 0 61 36.24807 0 1 0 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dumivariabele M1 M2 M3 31.1648 32.6132 1.3669 0.5988 1.3855 M4 M5 M6 M7 M8 2.0951 5.5261 8.2243 10.7127 12.7903 M9 M10 M11 8.4457 6.4935 3.6656 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -20.219 -6.046 2.835 6.904 23.364 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 31.1648 5.0119 6.218 1.16e-07 *** Dumivariabele 32.6132 3.2307 10.095 1.86e-13 *** M1 1.3669 6.5999 0.207 0.8368 M2 0.5988 6.8786 0.087 0.9310 M3 1.3855 6.8786 0.201 0.8412 M4 2.0951 6.8786 0.305 0.7620 M5 5.5261 6.8786 0.803 0.4257 M6 8.2243 6.8786 1.196 0.2377 M7 10.7127 6.8786 1.557 0.1259 M8 12.7903 6.8786 1.859 0.0691 . M9 8.4457 6.8482 1.233 0.2235 M10 6.4935 6.8482 0.948 0.3478 M11 3.6656 6.8482 0.535 0.5949 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.83 on 48 degrees of freedom Multiple R-squared: 0.7059, Adjusted R-squared: 0.6324 F-statistic: 9.6 on 12 and 48 DF, p-value: 3.979e-09 > postscript(file="/var/www/html/rcomp/tmp/1bqir1229874562.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/26bit1229874562.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/3n7fn1229874562.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/45l9l1229874562.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/5xn3e1229874562.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 -11.8070721 -10.3178575 -10.4562645 -11.7266953 -13.3438720 -15.8235431 7 8 9 10 11 12 -15.4564002 -18.7432027 -13.1748482 -8.3233179 -5.4298827 1.8852925 13 14 15 16 17 18 -4.1509785 -5.7577104 -3.2372457 -2.8977843 -0.9455169 -3.2357888 19 20 21 22 23 24 -7.6691842 -6.0461798 -0.9076154 4.4611200 7.3327015 8.6308136 25 26 27 28 29 30 4.8309086 6.5896527 10.0498282 7.9853782 5.4649135 7.5526742 31 32 33 34 35 36 5.5523285 3.1032527 10.5728826 12.4668734 8.3962501 8.8784893 37 38 39 40 41 42 7.8394402 10.4504801 4.4479862 6.4847547 5.9894033 6.9043465 43 44 45 46 47 48 5.0934000 4.7714215 -19.8549161 -20.2191451 -13.4066059 -5.9967311 49 50 51 52 53 54 -0.4286662 -0.9645649 -0.8043041 0.1543466 2.8350721 4.6023112 55 56 57 58 59 60 12.4798560 16.9147083 23.3644970 11.6144695 3.1075370 -13.3978644 61 3.7163679 > postscript(file="/var/www/html/rcomp/tmp/6ed7v1229874562.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 -11.8070721 NA 1 -10.3178575 -11.8070721 2 -10.4562645 -10.3178575 3 -11.7266953 -10.4562645 4 -13.3438720 -11.7266953 5 -15.8235431 -13.3438720 6 -15.4564002 -15.8235431 7 -18.7432027 -15.4564002 8 -13.1748482 -18.7432027 9 -8.3233179 -13.1748482 10 -5.4298827 -8.3233179 11 1.8852925 -5.4298827 12 -4.1509785 1.8852925 13 -5.7577104 -4.1509785 14 -3.2372457 -5.7577104 15 -2.8977843 -3.2372457 16 -0.9455169 -2.8977843 17 -3.2357888 -0.9455169 18 -7.6691842 -3.2357888 19 -6.0461798 -7.6691842 20 -0.9076154 -6.0461798 21 4.4611200 -0.9076154 22 7.3327015 4.4611200 23 8.6308136 7.3327015 24 4.8309086 8.6308136 25 6.5896527 4.8309086 26 10.0498282 6.5896527 27 7.9853782 10.0498282 28 5.4649135 7.9853782 29 7.5526742 5.4649135 30 5.5523285 7.5526742 31 3.1032527 5.5523285 32 10.5728826 3.1032527 33 12.4668734 10.5728826 34 8.3962501 12.4668734 35 8.8784893 8.3962501 36 7.8394402 8.8784893 37 10.4504801 7.8394402 38 4.4479862 10.4504801 39 6.4847547 4.4479862 40 5.9894033 6.4847547 41 6.9043465 5.9894033 42 5.0934000 6.9043465 43 4.7714215 5.0934000 44 -19.8549161 4.7714215 45 -20.2191451 -19.8549161 46 -13.4066059 -20.2191451 47 -5.9967311 -13.4066059 48 -0.4286662 -5.9967311 49 -0.9645649 -0.4286662 50 -0.8043041 -0.9645649 51 0.1543466 -0.8043041 52 2.8350721 0.1543466 53 4.6023112 2.8350721 54 12.4798560 4.6023112 55 16.9147083 12.4798560 56 23.3644970 16.9147083 57 11.6144695 23.3644970 58 3.1075370 11.6144695 59 -13.3978644 3.1075370 60 3.7163679 -13.3978644 61 NA 3.7163679 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -10.3178575 -11.8070721 [2,] -10.4562645 -10.3178575 [3,] -11.7266953 -10.4562645 [4,] -13.3438720 -11.7266953 [5,] -15.8235431 -13.3438720 [6,] -15.4564002 -15.8235431 [7,] -18.7432027 -15.4564002 [8,] -13.1748482 -18.7432027 [9,] -8.3233179 -13.1748482 [10,] -5.4298827 -8.3233179 [11,] 1.8852925 -5.4298827 [12,] -4.1509785 1.8852925 [13,] -5.7577104 -4.1509785 [14,] -3.2372457 -5.7577104 [15,] -2.8977843 -3.2372457 [16,] -0.9455169 -2.8977843 [17,] -3.2357888 -0.9455169 [18,] -7.6691842 -3.2357888 [19,] -6.0461798 -7.6691842 [20,] -0.9076154 -6.0461798 [21,] 4.4611200 -0.9076154 [22,] 7.3327015 4.4611200 [23,] 8.6308136 7.3327015 [24,] 4.8309086 8.6308136 [25,] 6.5896527 4.8309086 [26,] 10.0498282 6.5896527 [27,] 7.9853782 10.0498282 [28,] 5.4649135 7.9853782 [29,] 7.5526742 5.4649135 [30,] 5.5523285 7.5526742 [31,] 3.1032527 5.5523285 [32,] 10.5728826 3.1032527 [33,] 12.4668734 10.5728826 [34,] 8.3962501 12.4668734 [35,] 8.8784893 8.3962501 [36,] 7.8394402 8.8784893 [37,] 10.4504801 7.8394402 [38,] 4.4479862 10.4504801 [39,] 6.4847547 4.4479862 [40,] 5.9894033 6.4847547 [41,] 6.9043465 5.9894033 [42,] 5.0934000 6.9043465 [43,] 4.7714215 5.0934000 [44,] -19.8549161 4.7714215 [45,] -20.2191451 -19.8549161 [46,] -13.4066059 -20.2191451 [47,] -5.9967311 -13.4066059 [48,] -0.4286662 -5.9967311 [49,] -0.9645649 -0.4286662 [50,] -0.8043041 -0.9645649 [51,] 0.1543466 -0.8043041 [52,] 2.8350721 0.1543466 [53,] 4.6023112 2.8350721 [54,] 12.4798560 4.6023112 [55,] 16.9147083 12.4798560 [56,] 23.3644970 16.9147083 [57,] 11.6144695 23.3644970 [58,] 3.1075370 11.6144695 [59,] -13.3978644 3.1075370 [60,] 3.7163679 -13.3978644 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -10.3178575 -11.8070721 2 -10.4562645 -10.3178575 3 -11.7266953 -10.4562645 4 -13.3438720 -11.7266953 5 -15.8235431 -13.3438720 6 -15.4564002 -15.8235431 7 -18.7432027 -15.4564002 8 -13.1748482 -18.7432027 9 -8.3233179 -13.1748482 10 -5.4298827 -8.3233179 11 1.8852925 -5.4298827 12 -4.1509785 1.8852925 13 -5.7577104 -4.1509785 14 -3.2372457 -5.7577104 15 -2.8977843 -3.2372457 16 -0.9455169 -2.8977843 17 -3.2357888 -0.9455169 18 -7.6691842 -3.2357888 19 -6.0461798 -7.6691842 20 -0.9076154 -6.0461798 21 4.4611200 -0.9076154 22 7.3327015 4.4611200 23 8.6308136 7.3327015 24 4.8309086 8.6308136 25 6.5896527 4.8309086 26 10.0498282 6.5896527 27 7.9853782 10.0498282 28 5.4649135 7.9853782 29 7.5526742 5.4649135 30 5.5523285 7.5526742 31 3.1032527 5.5523285 32 10.5728826 3.1032527 33 12.4668734 10.5728826 34 8.3962501 12.4668734 35 8.8784893 8.3962501 36 7.8394402 8.8784893 37 10.4504801 7.8394402 38 4.4479862 10.4504801 39 6.4847547 4.4479862 40 5.9894033 6.4847547 41 6.9043465 5.9894033 42 5.0934000 6.9043465 43 4.7714215 5.0934000 44 -19.8549161 4.7714215 45 -20.2191451 -19.8549161 46 -13.4066059 -20.2191451 47 -5.9967311 -13.4066059 48 -0.4286662 -5.9967311 49 -0.9645649 -0.4286662 50 -0.8043041 -0.9645649 51 0.1543466 -0.8043041 52 2.8350721 0.1543466 53 4.6023112 2.8350721 54 12.4798560 4.6023112 55 16.9147083 12.4798560 56 23.3644970 16.9147083 57 11.6144695 23.3644970 58 3.1075370 11.6144695 59 -13.3978644 3.1075370 60 3.7163679 -13.3978644 > 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/7ep5g1229874562.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/832kv1229874562.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/9f0uc1229874562.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/10vngf1229874562.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/11csp51229874562.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/12k2re1229874562.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/13rnhr1229874562.tab") > > system("convert tmp/1bqir1229874562.ps tmp/1bqir1229874562.png") > system("convert tmp/26bit1229874562.ps tmp/26bit1229874562.png") > system("convert tmp/3n7fn1229874562.ps tmp/3n7fn1229874562.png") > system("convert tmp/45l9l1229874562.ps tmp/45l9l1229874562.png") > system("convert tmp/5xn3e1229874562.ps tmp/5xn3e1229874562.png") > system("convert tmp/6ed7v1229874562.ps tmp/6ed7v1229874562.png") > system("convert tmp/7ep5g1229874562.ps tmp/7ep5g1229874562.png") > system("convert tmp/832kv1229874562.ps tmp/832kv1229874562.png") > system("convert tmp/9f0uc1229874562.ps tmp/9f0uc1229874562.png") > > > proc.time() user system elapsed 1.923 1.444 2.496