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(3.4,1,3,1,3.1,1,2.5,0,2.2,0,2.3,0,2.1,0,2.8,0,3.1,1,2.9,0,2.6,0,2.7,0,2.3,0,2.3,0,2.1,0,2.2,0,2.9,0,2.6,0,2.7,0,1.8,0,1.3,0,0.9,0,1.3,0,1.3,0,1.3,0,1.3,0,1.1,0,1.4,0,1.2,0,1.7,0,1.8,0,1.5,0,1,0,1.6,0,1.5,0,1.8,0,1.8,0,1.6,0,1.9,0,1.7,0,1.6,0,1.3,0,1.1,0,1.9,0,2.6,0,2.3,0,2.4,0,2.2,0,2,0,2.9,0,2.6,0,2.3,0,2.3,0,2.6,0,3.1,1,2.8,0,2.5,0,2.9,0,3.1,1,3.1,1,3.2,1,2.5,0,2.6,0,2.9,0,2.6,0,2.4,0,1.7,0,2,0,2.2,0,1.9,0,1.6,0,1.6,0,1.2,0,1.2,0,1.5,0,1.6,0,1.7,0,1.8,0,1.8,0,1.8,0,1.3,0,1.3,0,1.4,0,1.1,0,1.5,0,2.2,0,2.9,0,3.1,1,3.5,1,3.6,1,4.4,1,4.2,1,5.2,1,5.8,1),dim=c(2,94),dimnames=list(c('Consumptieprijsindex','Dumivariabele'),1:94)) > y <- array(NA,dim=c(2,94),dimnames=list(c('Consumptieprijsindex','Dumivariabele'),1:94)) > 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 = 'Do not include Seasonal 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 Consumptieprijsindex Dumivariabele 1 3.4 1 2 3.0 1 3 3.1 1 4 2.5 0 5 2.2 0 6 2.3 0 7 2.1 0 8 2.8 0 9 3.1 1 10 2.9 0 11 2.6 0 12 2.7 0 13 2.3 0 14 2.3 0 15 2.1 0 16 2.2 0 17 2.9 0 18 2.6 0 19 2.7 0 20 1.8 0 21 1.3 0 22 0.9 0 23 1.3 0 24 1.3 0 25 1.3 0 26 1.3 0 27 1.1 0 28 1.4 0 29 1.2 0 30 1.7 0 31 1.8 0 32 1.5 0 33 1.0 0 34 1.6 0 35 1.5 0 36 1.8 0 37 1.8 0 38 1.6 0 39 1.9 0 40 1.7 0 41 1.6 0 42 1.3 0 43 1.1 0 44 1.9 0 45 2.6 0 46 2.3 0 47 2.4 0 48 2.2 0 49 2.0 0 50 2.9 0 51 2.6 0 52 2.3 0 53 2.3 0 54 2.6 0 55 3.1 1 56 2.8 0 57 2.5 0 58 2.9 0 59 3.1 1 60 3.1 1 61 3.2 1 62 2.5 0 63 2.6 0 64 2.9 0 65 2.6 0 66 2.4 0 67 1.7 0 68 2.0 0 69 2.2 0 70 1.9 0 71 1.6 0 72 1.6 0 73 1.2 0 74 1.2 0 75 1.5 0 76 1.6 0 77 1.7 0 78 1.8 0 79 1.8 0 80 1.8 0 81 1.3 0 82 1.3 0 83 1.4 0 84 1.1 0 85 1.5 0 86 2.2 0 87 2.9 0 88 3.1 1 89 3.5 1 90 3.6 1 91 4.4 1 92 4.2 1 93 5.2 1 94 5.8 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dumivariabele 1.957 1.703 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.0570 -0.5570 -0.1570 0.5158 2.1400 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.95696 0.06996 27.974 < 2e-16 *** Dumivariabele 1.70304 0.17513 9.725 8.66e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6218 on 92 degrees of freedom Multiple R-squared: 0.5069, Adjusted R-squared: 0.5015 F-statistic: 94.57 on 1 and 92 DF, p-value: 8.663e-16 > postscript(file="/var/www/html/rcomp/tmp/1dmdv1227103920.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/2abo41227103920.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/33m3z1227103920.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/42zs81227103920.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/5kpz21227103920.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 = 94 Frequency = 1 1 2 3 4 5 6 -0.26000000 -0.66000000 -0.56000000 0.54303797 0.24303797 0.34303797 7 8 9 10 11 12 0.14303797 0.84303797 -0.56000000 0.94303797 0.64303797 0.74303797 13 14 15 16 17 18 0.34303797 0.34303797 0.14303797 0.24303797 0.94303797 0.64303797 19 20 21 22 23 24 0.74303797 -0.15696203 -0.65696203 -1.05696203 -0.65696203 -0.65696203 25 26 27 28 29 30 -0.65696203 -0.65696203 -0.85696203 -0.55696203 -0.75696203 -0.25696203 31 32 33 34 35 36 -0.15696203 -0.45696203 -0.95696203 -0.35696203 -0.45696203 -0.15696203 37 38 39 40 41 42 -0.15696203 -0.35696203 -0.05696203 -0.25696203 -0.35696203 -0.65696203 43 44 45 46 47 48 -0.85696203 -0.05696203 0.64303797 0.34303797 0.44303797 0.24303797 49 50 51 52 53 54 0.04303797 0.94303797 0.64303797 0.34303797 0.34303797 0.64303797 55 56 57 58 59 60 -0.56000000 0.84303797 0.54303797 0.94303797 -0.56000000 -0.56000000 61 62 63 64 65 66 -0.46000000 0.54303797 0.64303797 0.94303797 0.64303797 0.44303797 67 68 69 70 71 72 -0.25696203 0.04303797 0.24303797 -0.05696203 -0.35696203 -0.35696203 73 74 75 76 77 78 -0.75696203 -0.75696203 -0.45696203 -0.35696203 -0.25696203 -0.15696203 79 80 81 82 83 84 -0.15696203 -0.15696203 -0.65696203 -0.65696203 -0.55696203 -0.85696203 85 86 87 88 89 90 -0.45696203 0.24303797 0.94303797 -0.56000000 -0.16000000 -0.06000000 91 92 93 94 0.74000000 0.54000000 1.54000000 2.14000000 > postscript(file="/var/www/html/rcomp/tmp/6ahd51227103920.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 = 94 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.26000000 NA 1 -0.66000000 -0.26000000 2 -0.56000000 -0.66000000 3 0.54303797 -0.56000000 4 0.24303797 0.54303797 5 0.34303797 0.24303797 6 0.14303797 0.34303797 7 0.84303797 0.14303797 8 -0.56000000 0.84303797 9 0.94303797 -0.56000000 10 0.64303797 0.94303797 11 0.74303797 0.64303797 12 0.34303797 0.74303797 13 0.34303797 0.34303797 14 0.14303797 0.34303797 15 0.24303797 0.14303797 16 0.94303797 0.24303797 17 0.64303797 0.94303797 18 0.74303797 0.64303797 19 -0.15696203 0.74303797 20 -0.65696203 -0.15696203 21 -1.05696203 -0.65696203 22 -0.65696203 -1.05696203 23 -0.65696203 -0.65696203 24 -0.65696203 -0.65696203 25 -0.65696203 -0.65696203 26 -0.85696203 -0.65696203 27 -0.55696203 -0.85696203 28 -0.75696203 -0.55696203 29 -0.25696203 -0.75696203 30 -0.15696203 -0.25696203 31 -0.45696203 -0.15696203 32 -0.95696203 -0.45696203 33 -0.35696203 -0.95696203 34 -0.45696203 -0.35696203 35 -0.15696203 -0.45696203 36 -0.15696203 -0.15696203 37 -0.35696203 -0.15696203 38 -0.05696203 -0.35696203 39 -0.25696203 -0.05696203 40 -0.35696203 -0.25696203 41 -0.65696203 -0.35696203 42 -0.85696203 -0.65696203 43 -0.05696203 -0.85696203 44 0.64303797 -0.05696203 45 0.34303797 0.64303797 46 0.44303797 0.34303797 47 0.24303797 0.44303797 48 0.04303797 0.24303797 49 0.94303797 0.04303797 50 0.64303797 0.94303797 51 0.34303797 0.64303797 52 0.34303797 0.34303797 53 0.64303797 0.34303797 54 -0.56000000 0.64303797 55 0.84303797 -0.56000000 56 0.54303797 0.84303797 57 0.94303797 0.54303797 58 -0.56000000 0.94303797 59 -0.56000000 -0.56000000 60 -0.46000000 -0.56000000 61 0.54303797 -0.46000000 62 0.64303797 0.54303797 63 0.94303797 0.64303797 64 0.64303797 0.94303797 65 0.44303797 0.64303797 66 -0.25696203 0.44303797 67 0.04303797 -0.25696203 68 0.24303797 0.04303797 69 -0.05696203 0.24303797 70 -0.35696203 -0.05696203 71 -0.35696203 -0.35696203 72 -0.75696203 -0.35696203 73 -0.75696203 -0.75696203 74 -0.45696203 -0.75696203 75 -0.35696203 -0.45696203 76 -0.25696203 -0.35696203 77 -0.15696203 -0.25696203 78 -0.15696203 -0.15696203 79 -0.15696203 -0.15696203 80 -0.65696203 -0.15696203 81 -0.65696203 -0.65696203 82 -0.55696203 -0.65696203 83 -0.85696203 -0.55696203 84 -0.45696203 -0.85696203 85 0.24303797 -0.45696203 86 0.94303797 0.24303797 87 -0.56000000 0.94303797 88 -0.16000000 -0.56000000 89 -0.06000000 -0.16000000 90 0.74000000 -0.06000000 91 0.54000000 0.74000000 92 1.54000000 0.54000000 93 2.14000000 1.54000000 94 NA 2.14000000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.66000000 -0.26000000 [2,] -0.56000000 -0.66000000 [3,] 0.54303797 -0.56000000 [4,] 0.24303797 0.54303797 [5,] 0.34303797 0.24303797 [6,] 0.14303797 0.34303797 [7,] 0.84303797 0.14303797 [8,] -0.56000000 0.84303797 [9,] 0.94303797 -0.56000000 [10,] 0.64303797 0.94303797 [11,] 0.74303797 0.64303797 [12,] 0.34303797 0.74303797 [13,] 0.34303797 0.34303797 [14,] 0.14303797 0.34303797 [15,] 0.24303797 0.14303797 [16,] 0.94303797 0.24303797 [17,] 0.64303797 0.94303797 [18,] 0.74303797 0.64303797 [19,] -0.15696203 0.74303797 [20,] -0.65696203 -0.15696203 [21,] -1.05696203 -0.65696203 [22,] -0.65696203 -1.05696203 [23,] -0.65696203 -0.65696203 [24,] -0.65696203 -0.65696203 [25,] -0.65696203 -0.65696203 [26,] -0.85696203 -0.65696203 [27,] -0.55696203 -0.85696203 [28,] -0.75696203 -0.55696203 [29,] -0.25696203 -0.75696203 [30,] -0.15696203 -0.25696203 [31,] -0.45696203 -0.15696203 [32,] -0.95696203 -0.45696203 [33,] -0.35696203 -0.95696203 [34,] -0.45696203 -0.35696203 [35,] -0.15696203 -0.45696203 [36,] -0.15696203 -0.15696203 [37,] -0.35696203 -0.15696203 [38,] -0.05696203 -0.35696203 [39,] -0.25696203 -0.05696203 [40,] -0.35696203 -0.25696203 [41,] -0.65696203 -0.35696203 [42,] -0.85696203 -0.65696203 [43,] -0.05696203 -0.85696203 [44,] 0.64303797 -0.05696203 [45,] 0.34303797 0.64303797 [46,] 0.44303797 0.34303797 [47,] 0.24303797 0.44303797 [48,] 0.04303797 0.24303797 [49,] 0.94303797 0.04303797 [50,] 0.64303797 0.94303797 [51,] 0.34303797 0.64303797 [52,] 0.34303797 0.34303797 [53,] 0.64303797 0.34303797 [54,] -0.56000000 0.64303797 [55,] 0.84303797 -0.56000000 [56,] 0.54303797 0.84303797 [57,] 0.94303797 0.54303797 [58,] -0.56000000 0.94303797 [59,] -0.56000000 -0.56000000 [60,] -0.46000000 -0.56000000 [61,] 0.54303797 -0.46000000 [62,] 0.64303797 0.54303797 [63,] 0.94303797 0.64303797 [64,] 0.64303797 0.94303797 [65,] 0.44303797 0.64303797 [66,] -0.25696203 0.44303797 [67,] 0.04303797 -0.25696203 [68,] 0.24303797 0.04303797 [69,] -0.05696203 0.24303797 [70,] -0.35696203 -0.05696203 [71,] -0.35696203 -0.35696203 [72,] -0.75696203 -0.35696203 [73,] -0.75696203 -0.75696203 [74,] -0.45696203 -0.75696203 [75,] -0.35696203 -0.45696203 [76,] -0.25696203 -0.35696203 [77,] -0.15696203 -0.25696203 [78,] -0.15696203 -0.15696203 [79,] -0.15696203 -0.15696203 [80,] -0.65696203 -0.15696203 [81,] -0.65696203 -0.65696203 [82,] -0.55696203 -0.65696203 [83,] -0.85696203 -0.55696203 [84,] -0.45696203 -0.85696203 [85,] 0.24303797 -0.45696203 [86,] 0.94303797 0.24303797 [87,] -0.56000000 0.94303797 [88,] -0.16000000 -0.56000000 [89,] -0.06000000 -0.16000000 [90,] 0.74000000 -0.06000000 [91,] 0.54000000 0.74000000 [92,] 1.54000000 0.54000000 [93,] 2.14000000 1.54000000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.66000000 -0.26000000 2 -0.56000000 -0.66000000 3 0.54303797 -0.56000000 4 0.24303797 0.54303797 5 0.34303797 0.24303797 6 0.14303797 0.34303797 7 0.84303797 0.14303797 8 -0.56000000 0.84303797 9 0.94303797 -0.56000000 10 0.64303797 0.94303797 11 0.74303797 0.64303797 12 0.34303797 0.74303797 13 0.34303797 0.34303797 14 0.14303797 0.34303797 15 0.24303797 0.14303797 16 0.94303797 0.24303797 17 0.64303797 0.94303797 18 0.74303797 0.64303797 19 -0.15696203 0.74303797 20 -0.65696203 -0.15696203 21 -1.05696203 -0.65696203 22 -0.65696203 -1.05696203 23 -0.65696203 -0.65696203 24 -0.65696203 -0.65696203 25 -0.65696203 -0.65696203 26 -0.85696203 -0.65696203 27 -0.55696203 -0.85696203 28 -0.75696203 -0.55696203 29 -0.25696203 -0.75696203 30 -0.15696203 -0.25696203 31 -0.45696203 -0.15696203 32 -0.95696203 -0.45696203 33 -0.35696203 -0.95696203 34 -0.45696203 -0.35696203 35 -0.15696203 -0.45696203 36 -0.15696203 -0.15696203 37 -0.35696203 -0.15696203 38 -0.05696203 -0.35696203 39 -0.25696203 -0.05696203 40 -0.35696203 -0.25696203 41 -0.65696203 -0.35696203 42 -0.85696203 -0.65696203 43 -0.05696203 -0.85696203 44 0.64303797 -0.05696203 45 0.34303797 0.64303797 46 0.44303797 0.34303797 47 0.24303797 0.44303797 48 0.04303797 0.24303797 49 0.94303797 0.04303797 50 0.64303797 0.94303797 51 0.34303797 0.64303797 52 0.34303797 0.34303797 53 0.64303797 0.34303797 54 -0.56000000 0.64303797 55 0.84303797 -0.56000000 56 0.54303797 0.84303797 57 0.94303797 0.54303797 58 -0.56000000 0.94303797 59 -0.56000000 -0.56000000 60 -0.46000000 -0.56000000 61 0.54303797 -0.46000000 62 0.64303797 0.54303797 63 0.94303797 0.64303797 64 0.64303797 0.94303797 65 0.44303797 0.64303797 66 -0.25696203 0.44303797 67 0.04303797 -0.25696203 68 0.24303797 0.04303797 69 -0.05696203 0.24303797 70 -0.35696203 -0.05696203 71 -0.35696203 -0.35696203 72 -0.75696203 -0.35696203 73 -0.75696203 -0.75696203 74 -0.45696203 -0.75696203 75 -0.35696203 -0.45696203 76 -0.25696203 -0.35696203 77 -0.15696203 -0.25696203 78 -0.15696203 -0.15696203 79 -0.15696203 -0.15696203 80 -0.65696203 -0.15696203 81 -0.65696203 -0.65696203 82 -0.55696203 -0.65696203 83 -0.85696203 -0.55696203 84 -0.45696203 -0.85696203 85 0.24303797 -0.45696203 86 0.94303797 0.24303797 87 -0.56000000 0.94303797 88 -0.16000000 -0.56000000 89 -0.06000000 -0.16000000 90 0.74000000 -0.06000000 91 0.54000000 0.74000000 92 1.54000000 0.54000000 93 2.14000000 1.54000000 > 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/717zz1227103920.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/81ja61227103920.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/9tefb1227103920.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/10thzp1227103920.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/11vss11227103921.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/123akk1227103921.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/13laco1227103921.tab") > > system("convert tmp/1dmdv1227103920.ps tmp/1dmdv1227103920.png") > system("convert tmp/2abo41227103920.ps tmp/2abo41227103920.png") > system("convert tmp/33m3z1227103920.ps tmp/33m3z1227103920.png") > system("convert tmp/42zs81227103920.ps tmp/42zs81227103920.png") > system("convert tmp/5kpz21227103920.ps tmp/5kpz21227103920.png") > system("convert tmp/6ahd51227103920.ps tmp/6ahd51227103920.png") > system("convert tmp/717zz1227103920.ps tmp/717zz1227103920.png") > system("convert tmp/81ja61227103920.ps tmp/81ja61227103920.png") > system("convert tmp/9tefb1227103920.ps tmp/9tefb1227103920.png") > > > proc.time() user system elapsed 2.012 1.443 2.418