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. Natural language support but running in an English locale 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(9,911,8,915,9,452,9,112,8,472,8,230,8,384,8,625,8,221,8,649,8,625,10,443,10,357,8,586,8,892,8,329,8,101,7,922,8,120,7,838,7,735,8,406,8,209,9,451,10,041,9,411,10,405,8,467,8,464,8,102,7,627,7,513,7,510,8,291,8,064,9,383,9,706,8,579,9,474,8,318,8,213,8,059,9,111,7,708,7,680,8,014,8,007,8,718,9,486,9,113,9,025,8,476,7,952,7,759,7,835,7,600,7,651,8,319,8,812,8,630),dim=c(2,60),dimnames=list(c('y',''),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('y',''),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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 9 911 1 0 0 0 0 0 0 0 0 0 0 1 2 8 915 0 1 0 0 0 0 0 0 0 0 0 2 3 9 452 0 0 1 0 0 0 0 0 0 0 0 3 4 9 112 0 0 0 1 0 0 0 0 0 0 0 4 5 8 472 0 0 0 0 1 0 0 0 0 0 0 5 6 8 230 0 0 0 0 0 1 0 0 0 0 0 6 7 8 384 0 0 0 0 0 0 1 0 0 0 0 7 8 8 625 0 0 0 0 0 0 0 1 0 0 0 8 9 8 221 0 0 0 0 0 0 0 0 1 0 0 9 10 8 649 0 0 0 0 0 0 0 0 0 1 0 10 11 8 625 0 0 0 0 0 0 0 0 0 0 1 11 12 10 443 0 0 0 0 0 0 0 0 0 0 0 12 13 10 357 1 0 0 0 0 0 0 0 0 0 0 13 14 8 586 0 1 0 0 0 0 0 0 0 0 0 14 15 8 892 0 0 1 0 0 0 0 0 0 0 0 15 16 8 329 0 0 0 1 0 0 0 0 0 0 0 16 17 8 101 0 0 0 0 1 0 0 0 0 0 0 17 18 7 922 0 0 0 0 0 1 0 0 0 0 0 18 19 8 120 0 0 0 0 0 0 1 0 0 0 0 19 20 7 838 0 0 0 0 0 0 0 1 0 0 0 20 21 7 735 0 0 0 0 0 0 0 0 1 0 0 21 22 8 406 0 0 0 0 0 0 0 0 0 1 0 22 23 8 209 0 0 0 0 0 0 0 0 0 0 1 23 24 9 451 0 0 0 0 0 0 0 0 0 0 0 24 25 10 41 1 0 0 0 0 0 0 0 0 0 0 25 26 9 411 0 1 0 0 0 0 0 0 0 0 0 26 27 10 405 0 0 1 0 0 0 0 0 0 0 0 27 28 8 467 0 0 0 1 0 0 0 0 0 0 0 28 29 8 464 0 0 0 0 1 0 0 0 0 0 0 29 30 8 102 0 0 0 0 0 1 0 0 0 0 0 30 31 7 627 0 0 0 0 0 0 1 0 0 0 0 31 32 7 513 0 0 0 0 0 0 0 1 0 0 0 32 33 7 510 0 0 0 0 0 0 0 0 1 0 0 33 34 8 291 0 0 0 0 0 0 0 0 0 1 0 34 35 8 64 0 0 0 0 0 0 0 0 0 0 1 35 36 9 383 0 0 0 0 0 0 0 0 0 0 0 36 37 9 706 1 0 0 0 0 0 0 0 0 0 0 37 38 8 579 0 1 0 0 0 0 0 0 0 0 0 38 39 9 474 0 0 1 0 0 0 0 0 0 0 0 39 40 8 318 0 0 0 1 0 0 0 0 0 0 0 40 41 8 213 0 0 0 0 1 0 0 0 0 0 0 41 42 8 59 0 0 0 0 0 1 0 0 0 0 0 42 43 9 111 0 0 0 0 0 0 1 0 0 0 0 43 44 7 708 0 0 0 0 0 0 0 1 0 0 0 44 45 7 680 0 0 0 0 0 0 0 0 1 0 0 45 46 8 14 0 0 0 0 0 0 0 0 0 1 0 46 47 8 7 0 0 0 0 0 0 0 0 0 0 1 47 48 8 718 0 0 0 0 0 0 0 0 0 0 0 48 49 9 486 1 0 0 0 0 0 0 0 0 0 0 49 50 9 113 0 1 0 0 0 0 0 0 0 0 0 50 51 9 25 0 0 1 0 0 0 0 0 0 0 0 51 52 8 476 0 0 0 1 0 0 0 0 0 0 0 52 53 7 952 0 0 0 0 1 0 0 0 0 0 0 53 54 7 759 0 0 0 0 0 1 0 0 0 0 0 54 55 7 835 0 0 0 0 0 0 1 0 0 0 0 55 56 7 600 0 0 0 0 0 0 0 1 0 0 0 56 57 7 651 0 0 0 0 0 0 0 0 1 0 0 57 58 8 319 0 0 0 0 0 0 0 0 0 1 0 58 59 8 812 0 0 0 0 0 0 0 0 0 0 1 59 60 8 630 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) V2 M1 M2 M3 M4 9.815647 -0.001308 0.467048 -0.496870 0.019139 -0.914555 M5 M6 M7 M8 M9 M10 -1.174619 -1.399489 -1.189043 -1.464159 -1.582419 -1.065745 M11 t -1.046667 -0.009138 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.53100 -0.22828 -0.02762 0.13973 0.94166 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.8156467 0.2236632 43.886 < 2e-16 *** V2 -0.0013080 0.0001955 -6.690 2.66e-08 *** M1 0.4670475 0.2414309 1.934 0.059216 . M2 -0.4968704 0.2410199 -2.062 0.044929 * M3 0.0191391 0.2411512 0.079 0.937086 M4 -0.9145548 0.2431122 -3.762 0.000476 *** M5 -1.1746190 0.2407167 -4.880 1.31e-05 *** M6 -1.3994888 0.2408968 -5.809 5.58e-07 *** M7 -1.1890431 0.2406886 -4.940 1.07e-05 *** M8 -1.4641588 0.2409448 -6.077 2.22e-07 *** M9 -1.5824185 0.2395419 -6.606 3.56e-08 *** M10 -1.0657454 0.2422089 -4.400 6.37e-05 *** M11 -1.0466670 0.2419324 -4.326 8.08e-05 *** t -0.0091377 0.0028783 -3.175 0.002676 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.3784 on 46 degrees of freedom Multiple R-squared: 0.8361, Adjusted R-squared: 0.7898 F-statistic: 18.05 on 13 and 46 DF, p-value: 7.375e-14 > postscript(file="/var/www/html/freestat/rcomp/tmp/1jf2c1291072399.ps",horizontal=F,onefile=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/2jf2c1291072399.ps",horizontal=F,onefile=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/3tojf1291072399.ps",horizontal=F,onefile=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/4tojf1291072399.ps",horizontal=F,onefile=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/5tojf1291072399.ps",horizontal=F,onefile=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.0819858412 -0.1036983254 -0.2161652740 0.2819527155 0.0220277707 6 7 8 9 10 -0.0604961213 -0.0603750311 0.5391017765 0.1380748076 0.1903552151 11 12 13 14 15 0.1490230161 0.8734411312 0.3030449093 -0.4243718542 -0.5310014280 16 17 18 19 20 -0.3245631973 -0.3535809592 -0.0457210680 -0.2960297961 -0.0726460603 21 22 23 24 25 -0.0799707538 -0.0178319493 -0.2854448581 -0.0064428068 -0.0006248667 26 27 28 29 30 0.4563836882 0.9416640482 -0.0344096078 0.2308683512 -0.0086132586 31 32 33 34 35 -0.5232312243 -0.3880876651 -0.2646142605 -0.0585975480 -0.3654498862 36 37 38 39 40 0.0142667006 -0.0211652999 -0.2142232927 0.1415669501 -0.1196465598 41 42 43 44 45 0.0122173390 0.0447957734 0.9115028034 -0.0233791596 0.0673947205 46 47 48 49 50 -0.3112560657 -0.3303525880 -0.4379074564 -0.1992689016 0.2859097841 51 52 53 54 55 -0.3360642964 0.1966666494 0.0884674984 0.0700346745 -0.0318667519 56 57 58 59 60 -0.0549888914 0.1391154862 0.1973303478 0.8322243162 -0.4433575686 > postscript(file="/var/www/html/freestat/rcomp/tmp/64gii1291072399.ps",horizontal=F,onefile=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.0819858412 NA 1 -0.1036983254 -0.0819858412 2 -0.2161652740 -0.1036983254 3 0.2819527155 -0.2161652740 4 0.0220277707 0.2819527155 5 -0.0604961213 0.0220277707 6 -0.0603750311 -0.0604961213 7 0.5391017765 -0.0603750311 8 0.1380748076 0.5391017765 9 0.1903552151 0.1380748076 10 0.1490230161 0.1903552151 11 0.8734411312 0.1490230161 12 0.3030449093 0.8734411312 13 -0.4243718542 0.3030449093 14 -0.5310014280 -0.4243718542 15 -0.3245631973 -0.5310014280 16 -0.3535809592 -0.3245631973 17 -0.0457210680 -0.3535809592 18 -0.2960297961 -0.0457210680 19 -0.0726460603 -0.2960297961 20 -0.0799707538 -0.0726460603 21 -0.0178319493 -0.0799707538 22 -0.2854448581 -0.0178319493 23 -0.0064428068 -0.2854448581 24 -0.0006248667 -0.0064428068 25 0.4563836882 -0.0006248667 26 0.9416640482 0.4563836882 27 -0.0344096078 0.9416640482 28 0.2308683512 -0.0344096078 29 -0.0086132586 0.2308683512 30 -0.5232312243 -0.0086132586 31 -0.3880876651 -0.5232312243 32 -0.2646142605 -0.3880876651 33 -0.0585975480 -0.2646142605 34 -0.3654498862 -0.0585975480 35 0.0142667006 -0.3654498862 36 -0.0211652999 0.0142667006 37 -0.2142232927 -0.0211652999 38 0.1415669501 -0.2142232927 39 -0.1196465598 0.1415669501 40 0.0122173390 -0.1196465598 41 0.0447957734 0.0122173390 42 0.9115028034 0.0447957734 43 -0.0233791596 0.9115028034 44 0.0673947205 -0.0233791596 45 -0.3112560657 0.0673947205 46 -0.3303525880 -0.3112560657 47 -0.4379074564 -0.3303525880 48 -0.1992689016 -0.4379074564 49 0.2859097841 -0.1992689016 50 -0.3360642964 0.2859097841 51 0.1966666494 -0.3360642964 52 0.0884674984 0.1966666494 53 0.0700346745 0.0884674984 54 -0.0318667519 0.0700346745 55 -0.0549888914 -0.0318667519 56 0.1391154862 -0.0549888914 57 0.1973303478 0.1391154862 58 0.8322243162 0.1973303478 59 -0.4433575686 0.8322243162 60 NA -0.4433575686 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.1036983254 -0.0819858412 [2,] -0.2161652740 -0.1036983254 [3,] 0.2819527155 -0.2161652740 [4,] 0.0220277707 0.2819527155 [5,] -0.0604961213 0.0220277707 [6,] -0.0603750311 -0.0604961213 [7,] 0.5391017765 -0.0603750311 [8,] 0.1380748076 0.5391017765 [9,] 0.1903552151 0.1380748076 [10,] 0.1490230161 0.1903552151 [11,] 0.8734411312 0.1490230161 [12,] 0.3030449093 0.8734411312 [13,] -0.4243718542 0.3030449093 [14,] -0.5310014280 -0.4243718542 [15,] -0.3245631973 -0.5310014280 [16,] -0.3535809592 -0.3245631973 [17,] -0.0457210680 -0.3535809592 [18,] -0.2960297961 -0.0457210680 [19,] -0.0726460603 -0.2960297961 [20,] -0.0799707538 -0.0726460603 [21,] -0.0178319493 -0.0799707538 [22,] -0.2854448581 -0.0178319493 [23,] -0.0064428068 -0.2854448581 [24,] -0.0006248667 -0.0064428068 [25,] 0.4563836882 -0.0006248667 [26,] 0.9416640482 0.4563836882 [27,] -0.0344096078 0.9416640482 [28,] 0.2308683512 -0.0344096078 [29,] -0.0086132586 0.2308683512 [30,] -0.5232312243 -0.0086132586 [31,] -0.3880876651 -0.5232312243 [32,] -0.2646142605 -0.3880876651 [33,] -0.0585975480 -0.2646142605 [34,] -0.3654498862 -0.0585975480 [35,] 0.0142667006 -0.3654498862 [36,] -0.0211652999 0.0142667006 [37,] -0.2142232927 -0.0211652999 [38,] 0.1415669501 -0.2142232927 [39,] -0.1196465598 0.1415669501 [40,] 0.0122173390 -0.1196465598 [41,] 0.0447957734 0.0122173390 [42,] 0.9115028034 0.0447957734 [43,] -0.0233791596 0.9115028034 [44,] 0.0673947205 -0.0233791596 [45,] -0.3112560657 0.0673947205 [46,] -0.3303525880 -0.3112560657 [47,] -0.4379074564 -0.3303525880 [48,] -0.1992689016 -0.4379074564 [49,] 0.2859097841 -0.1992689016 [50,] -0.3360642964 0.2859097841 [51,] 0.1966666494 -0.3360642964 [52,] 0.0884674984 0.1966666494 [53,] 0.0700346745 0.0884674984 [54,] -0.0318667519 0.0700346745 [55,] -0.0549888914 -0.0318667519 [56,] 0.1391154862 -0.0549888914 [57,] 0.1973303478 0.1391154862 [58,] 0.8322243162 0.1973303478 [59,] -0.4433575686 0.8322243162 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.1036983254 -0.0819858412 2 -0.2161652740 -0.1036983254 3 0.2819527155 -0.2161652740 4 0.0220277707 0.2819527155 5 -0.0604961213 0.0220277707 6 -0.0603750311 -0.0604961213 7 0.5391017765 -0.0603750311 8 0.1380748076 0.5391017765 9 0.1903552151 0.1380748076 10 0.1490230161 0.1903552151 11 0.8734411312 0.1490230161 12 0.3030449093 0.8734411312 13 -0.4243718542 0.3030449093 14 -0.5310014280 -0.4243718542 15 -0.3245631973 -0.5310014280 16 -0.3535809592 -0.3245631973 17 -0.0457210680 -0.3535809592 18 -0.2960297961 -0.0457210680 19 -0.0726460603 -0.2960297961 20 -0.0799707538 -0.0726460603 21 -0.0178319493 -0.0799707538 22 -0.2854448581 -0.0178319493 23 -0.0064428068 -0.2854448581 24 -0.0006248667 -0.0064428068 25 0.4563836882 -0.0006248667 26 0.9416640482 0.4563836882 27 -0.0344096078 0.9416640482 28 0.2308683512 -0.0344096078 29 -0.0086132586 0.2308683512 30 -0.5232312243 -0.0086132586 31 -0.3880876651 -0.5232312243 32 -0.2646142605 -0.3880876651 33 -0.0585975480 -0.2646142605 34 -0.3654498862 -0.0585975480 35 0.0142667006 -0.3654498862 36 -0.0211652999 0.0142667006 37 -0.2142232927 -0.0211652999 38 0.1415669501 -0.2142232927 39 -0.1196465598 0.1415669501 40 0.0122173390 -0.1196465598 41 0.0447957734 0.0122173390 42 0.9115028034 0.0447957734 43 -0.0233791596 0.9115028034 44 0.0673947205 -0.0233791596 45 -0.3112560657 0.0673947205 46 -0.3303525880 -0.3112560657 47 -0.4379074564 -0.3303525880 48 -0.1992689016 -0.4379074564 49 0.2859097841 -0.1992689016 50 -0.3360642964 0.2859097841 51 0.1966666494 -0.3360642964 52 0.0884674984 0.1966666494 53 0.0700346745 0.0884674984 54 -0.0318667519 0.0700346745 55 -0.0549888914 -0.0318667519 56 0.1391154862 -0.0549888914 57 0.1973303478 0.1391154862 58 0.8322243162 0.1973303478 59 -0.4433575686 0.8322243162 > 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/7f70l1291072399.ps",horizontal=F,onefile=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/8f70l1291072399.ps",horizontal=F,onefile=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/97gz61291072399.ps",horizontal=F,onefile=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/10thxt1291072399.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/11ezez1291072399.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/1231el1291072400.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/1362v91291072400.tab") > > try(system("convert tmp/1jf2c1291072399.ps tmp/1jf2c1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/2jf2c1291072399.ps tmp/2jf2c1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/3tojf1291072399.ps tmp/3tojf1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/4tojf1291072399.ps tmp/4tojf1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/5tojf1291072399.ps tmp/5tojf1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/64gii1291072399.ps tmp/64gii1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/7f70l1291072399.ps tmp/7f70l1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/8f70l1291072399.ps tmp/8f70l1291072399.png",intern=TRUE)) character(0) > try(system("convert tmp/97gz61291072399.ps tmp/97gz61291072399.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.072 2.203 3.907