R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(3804,0,3491,0,4151,0,4254,1,4717,1,4866,1,4001,1,3758,1,4780,1,5016,1,4296,0,4467,0,3891,0,3872,0,3867,0,3973,1,4640,1,4538,1,3836,1,3770,1,4374,1,4497,1,3945,0,3862,0,3608,0,3301,0,3882,0,3605,0,4305,1,4216,1,3971,1,3988,1,4317,1,4484,1,4247,0,3520,0,3686,0,3403,0,3990,0,4053,0,4548,1,4559,1,3922,1,4209,1,4517,1,4386,1,3221,0,3127,0,3777,0,3322,0,3899,0,4033,1,4463,1,4819,1,4246,1,4255,1,4760,1,4581,0,4309,0,4016,0,3601,0,3257,0,3823,0,3940,1,4534,1,4575,1,3953,1,4206,1,4649,1,4353,1,3835,0,3944,0),dim=c(2,72),dimnames=list(c('Ong','d'),1:72)) > y <- array(NA,dim=c(2,72),dimnames=list(c('Ong','d'),1:72)) > 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 Ong d M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 3804 0 1 0 0 0 0 0 0 0 0 0 0 2 3491 0 0 1 0 0 0 0 0 0 0 0 0 3 4151 0 0 0 1 0 0 0 0 0 0 0 0 4 4254 1 0 0 0 1 0 0 0 0 0 0 0 5 4717 1 0 0 0 0 1 0 0 0 0 0 0 6 4866 1 0 0 0 0 0 1 0 0 0 0 0 7 4001 1 0 0 0 0 0 0 1 0 0 0 0 8 3758 1 0 0 0 0 0 0 0 1 0 0 0 9 4780 1 0 0 0 0 0 0 0 0 1 0 0 10 5016 1 0 0 0 0 0 0 0 0 0 1 0 11 4296 0 0 0 0 0 0 0 0 0 0 0 1 12 4467 0 0 0 0 0 0 0 0 0 0 0 0 13 3891 0 1 0 0 0 0 0 0 0 0 0 0 14 3872 0 0 1 0 0 0 0 0 0 0 0 0 15 3867 0 0 0 1 0 0 0 0 0 0 0 0 16 3973 1 0 0 0 1 0 0 0 0 0 0 0 17 4640 1 0 0 0 0 1 0 0 0 0 0 0 18 4538 1 0 0 0 0 0 1 0 0 0 0 0 19 3836 1 0 0 0 0 0 0 1 0 0 0 0 20 3770 1 0 0 0 0 0 0 0 1 0 0 0 21 4374 1 0 0 0 0 0 0 0 0 1 0 0 22 4497 1 0 0 0 0 0 0 0 0 0 1 0 23 3945 0 0 0 0 0 0 0 0 0 0 0 1 24 3862 0 0 0 0 0 0 0 0 0 0 0 0 25 3608 0 1 0 0 0 0 0 0 0 0 0 0 26 3301 0 0 1 0 0 0 0 0 0 0 0 0 27 3882 0 0 0 1 0 0 0 0 0 0 0 0 28 3605 0 0 0 0 1 0 0 0 0 0 0 0 29 4305 1 0 0 0 0 1 0 0 0 0 0 0 30 4216 1 0 0 0 0 0 1 0 0 0 0 0 31 3971 1 0 0 0 0 0 0 1 0 0 0 0 32 3988 1 0 0 0 0 0 0 0 1 0 0 0 33 4317 1 0 0 0 0 0 0 0 0 1 0 0 34 4484 1 0 0 0 0 0 0 0 0 0 1 0 35 4247 0 0 0 0 0 0 0 0 0 0 0 1 36 3520 0 0 0 0 0 0 0 0 0 0 0 0 37 3686 0 1 0 0 0 0 0 0 0 0 0 0 38 3403 0 0 1 0 0 0 0 0 0 0 0 0 39 3990 0 0 0 1 0 0 0 0 0 0 0 0 40 4053 0 0 0 0 1 0 0 0 0 0 0 0 41 4548 1 0 0 0 0 1 0 0 0 0 0 0 42 4559 1 0 0 0 0 0 1 0 0 0 0 0 43 3922 1 0 0 0 0 0 0 1 0 0 0 0 44 4209 1 0 0 0 0 0 0 0 1 0 0 0 45 4517 1 0 0 0 0 0 0 0 0 1 0 0 46 4386 1 0 0 0 0 0 0 0 0 0 1 0 47 3221 0 0 0 0 0 0 0 0 0 0 0 1 48 3127 0 0 0 0 0 0 0 0 0 0 0 0 49 3777 0 1 0 0 0 0 0 0 0 0 0 0 50 3322 0 0 1 0 0 0 0 0 0 0 0 0 51 3899 0 0 0 1 0 0 0 0 0 0 0 0 52 4033 1 0 0 0 1 0 0 0 0 0 0 0 53 4463 1 0 0 0 0 1 0 0 0 0 0 0 54 4819 1 0 0 0 0 0 1 0 0 0 0 0 55 4246 1 0 0 0 0 0 0 1 0 0 0 0 56 4255 1 0 0 0 0 0 0 0 1 0 0 0 57 4760 1 0 0 0 0 0 0 0 0 1 0 0 58 4581 0 0 0 0 0 0 0 0 0 0 1 0 59 4309 0 0 0 0 0 0 0 0 0 0 0 1 60 4016 0 0 0 0 0 0 0 0 0 0 0 0 61 3601 0 1 0 0 0 0 0 0 0 0 0 0 62 3257 0 0 1 0 0 0 0 0 0 0 0 0 63 3823 0 0 0 1 0 0 0 0 0 0 0 0 64 3940 1 0 0 0 1 0 0 0 0 0 0 0 65 4534 1 0 0 0 0 1 0 0 0 0 0 0 66 4575 1 0 0 0 0 0 1 0 0 0 0 0 67 3953 1 0 0 0 0 0 0 1 0 0 0 0 68 4206 1 0 0 0 0 0 0 0 1 0 0 0 69 4649 1 0 0 0 0 0 0 0 0 1 0 0 70 4353 1 0 0 0 0 0 0 0 0 0 1 0 71 3835 0 0 0 0 0 0 0 0 0 0 0 1 72 3944 0 0 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) d M1 M2 M3 M4 3822.67 123.00 -94.83 -381.67 112.67 71.67 M5 M6 M7 M8 M9 M10 588.83 649.83 42.50 85.33 620.50 627.67 M11 152.83 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -754.50 -119.21 -32.83 166.12 644.33 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3822.67 102.51 37.292 < 2e-16 *** d 123.00 170.58 0.721 0.47372 M1 -94.83 144.97 -0.654 0.51554 M2 -381.67 144.97 -2.633 0.01079 * M3 112.67 144.97 0.777 0.44015 M4 71.67 184.25 0.389 0.69870 M5 588.83 223.86 2.630 0.01086 * M6 649.83 223.86 2.903 0.00519 ** M7 42.50 223.86 0.190 0.85008 M8 85.33 223.86 0.381 0.70443 M9 620.50 223.86 2.772 0.00745 ** M10 627.67 203.03 3.091 0.00304 ** M11 152.83 144.97 1.054 0.29606 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 251.1 on 59 degrees of freedom Multiple R-Squared: 0.7191, Adjusted R-squared: 0.6619 F-statistic: 12.58 on 12 and 59 DF, p-value: 3.344e-12 > postscript(file="/var/www/html/rcomp/tmp/12xpd1195654013.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/208wz1195654013.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/37g1h1195654013.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/46bq51195654013.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/57etg1195654013.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 = 72 Frequency = 1 1 2 3 4 5 6 7 76.16667 50.00000 215.66667 236.66667 182.50000 270.50000 12.83333 8 9 10 11 12 13 14 -273.00000 213.83333 442.66667 320.50000 644.33333 163.16667 431.00000 15 16 17 18 19 20 21 -68.33333 -44.33333 105.50000 -57.50000 -152.16667 -261.00000 -192.16667 22 23 24 25 26 27 28 -76.33333 -30.50000 39.33333 -119.83333 -140.00000 -53.33333 -289.33333 29 30 31 32 33 34 35 -229.50000 -379.50000 -17.16667 -43.00000 -249.16667 -89.33333 271.50000 36 37 38 39 40 41 42 -302.66667 -41.83333 -38.00000 54.66667 158.66667 13.50000 -36.50000 43 44 45 46 47 48 49 -66.16667 178.00000 -49.16667 -187.33333 -754.50000 -695.66667 49.16667 50 51 52 53 54 55 56 -119.00000 -36.33333 15.66667 -71.50000 223.50000 257.83333 224.00000 57 58 59 60 61 62 63 193.83333 130.66667 333.50000 193.33333 -126.83333 -184.00000 -112.33333 64 65 66 67 68 69 70 -77.33333 -0.50000 -20.50000 -35.16667 175.00000 82.83333 -220.33333 71 72 -140.50000 121.33333 > postscript(file="/var/www/html/rcomp/tmp/6agml1195654013.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 = 72 Frequency = 1 lag(myerror, k = 1) myerror 0 76.16667 NA 1 50.00000 76.16667 2 215.66667 50.00000 3 236.66667 215.66667 4 182.50000 236.66667 5 270.50000 182.50000 6 12.83333 270.50000 7 -273.00000 12.83333 8 213.83333 -273.00000 9 442.66667 213.83333 10 320.50000 442.66667 11 644.33333 320.50000 12 163.16667 644.33333 13 431.00000 163.16667 14 -68.33333 431.00000 15 -44.33333 -68.33333 16 105.50000 -44.33333 17 -57.50000 105.50000 18 -152.16667 -57.50000 19 -261.00000 -152.16667 20 -192.16667 -261.00000 21 -76.33333 -192.16667 22 -30.50000 -76.33333 23 39.33333 -30.50000 24 -119.83333 39.33333 25 -140.00000 -119.83333 26 -53.33333 -140.00000 27 -289.33333 -53.33333 28 -229.50000 -289.33333 29 -379.50000 -229.50000 30 -17.16667 -379.50000 31 -43.00000 -17.16667 32 -249.16667 -43.00000 33 -89.33333 -249.16667 34 271.50000 -89.33333 35 -302.66667 271.50000 36 -41.83333 -302.66667 37 -38.00000 -41.83333 38 54.66667 -38.00000 39 158.66667 54.66667 40 13.50000 158.66667 41 -36.50000 13.50000 42 -66.16667 -36.50000 43 178.00000 -66.16667 44 -49.16667 178.00000 45 -187.33333 -49.16667 46 -754.50000 -187.33333 47 -695.66667 -754.50000 48 49.16667 -695.66667 49 -119.00000 49.16667 50 -36.33333 -119.00000 51 15.66667 -36.33333 52 -71.50000 15.66667 53 223.50000 -71.50000 54 257.83333 223.50000 55 224.00000 257.83333 56 193.83333 224.00000 57 130.66667 193.83333 58 333.50000 130.66667 59 193.33333 333.50000 60 -126.83333 193.33333 61 -184.00000 -126.83333 62 -112.33333 -184.00000 63 -77.33333 -112.33333 64 -0.50000 -77.33333 65 -20.50000 -0.50000 66 -35.16667 -20.50000 67 175.00000 -35.16667 68 82.83333 175.00000 69 -220.33333 82.83333 70 -140.50000 -220.33333 71 121.33333 -140.50000 72 NA 121.33333 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 50.00000 76.16667 [2,] 215.66667 50.00000 [3,] 236.66667 215.66667 [4,] 182.50000 236.66667 [5,] 270.50000 182.50000 [6,] 12.83333 270.50000 [7,] -273.00000 12.83333 [8,] 213.83333 -273.00000 [9,] 442.66667 213.83333 [10,] 320.50000 442.66667 [11,] 644.33333 320.50000 [12,] 163.16667 644.33333 [13,] 431.00000 163.16667 [14,] -68.33333 431.00000 [15,] -44.33333 -68.33333 [16,] 105.50000 -44.33333 [17,] -57.50000 105.50000 [18,] -152.16667 -57.50000 [19,] -261.00000 -152.16667 [20,] -192.16667 -261.00000 [21,] -76.33333 -192.16667 [22,] -30.50000 -76.33333 [23,] 39.33333 -30.50000 [24,] -119.83333 39.33333 [25,] -140.00000 -119.83333 [26,] -53.33333 -140.00000 [27,] -289.33333 -53.33333 [28,] -229.50000 -289.33333 [29,] -379.50000 -229.50000 [30,] -17.16667 -379.50000 [31,] -43.00000 -17.16667 [32,] -249.16667 -43.00000 [33,] -89.33333 -249.16667 [34,] 271.50000 -89.33333 [35,] -302.66667 271.50000 [36,] -41.83333 -302.66667 [37,] -38.00000 -41.83333 [38,] 54.66667 -38.00000 [39,] 158.66667 54.66667 [40,] 13.50000 158.66667 [41,] -36.50000 13.50000 [42,] -66.16667 -36.50000 [43,] 178.00000 -66.16667 [44,] -49.16667 178.00000 [45,] -187.33333 -49.16667 [46,] -754.50000 -187.33333 [47,] -695.66667 -754.50000 [48,] 49.16667 -695.66667 [49,] -119.00000 49.16667 [50,] -36.33333 -119.00000 [51,] 15.66667 -36.33333 [52,] -71.50000 15.66667 [53,] 223.50000 -71.50000 [54,] 257.83333 223.50000 [55,] 224.00000 257.83333 [56,] 193.83333 224.00000 [57,] 130.66667 193.83333 [58,] 333.50000 130.66667 [59,] 193.33333 333.50000 [60,] -126.83333 193.33333 [61,] -184.00000 -126.83333 [62,] -112.33333 -184.00000 [63,] -77.33333 -112.33333 [64,] -0.50000 -77.33333 [65,] -20.50000 -0.50000 [66,] -35.16667 -20.50000 [67,] 175.00000 -35.16667 [68,] 82.83333 175.00000 [69,] -220.33333 82.83333 [70,] -140.50000 -220.33333 [71,] 121.33333 -140.50000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 50.00000 76.16667 2 215.66667 50.00000 3 236.66667 215.66667 4 182.50000 236.66667 5 270.50000 182.50000 6 12.83333 270.50000 7 -273.00000 12.83333 8 213.83333 -273.00000 9 442.66667 213.83333 10 320.50000 442.66667 11 644.33333 320.50000 12 163.16667 644.33333 13 431.00000 163.16667 14 -68.33333 431.00000 15 -44.33333 -68.33333 16 105.50000 -44.33333 17 -57.50000 105.50000 18 -152.16667 -57.50000 19 -261.00000 -152.16667 20 -192.16667 -261.00000 21 -76.33333 -192.16667 22 -30.50000 -76.33333 23 39.33333 -30.50000 24 -119.83333 39.33333 25 -140.00000 -119.83333 26 -53.33333 -140.00000 27 -289.33333 -53.33333 28 -229.50000 -289.33333 29 -379.50000 -229.50000 30 -17.16667 -379.50000 31 -43.00000 -17.16667 32 -249.16667 -43.00000 33 -89.33333 -249.16667 34 271.50000 -89.33333 35 -302.66667 271.50000 36 -41.83333 -302.66667 37 -38.00000 -41.83333 38 54.66667 -38.00000 39 158.66667 54.66667 40 13.50000 158.66667 41 -36.50000 13.50000 42 -66.16667 -36.50000 43 178.00000 -66.16667 44 -49.16667 178.00000 45 -187.33333 -49.16667 46 -754.50000 -187.33333 47 -695.66667 -754.50000 48 49.16667 -695.66667 49 -119.00000 49.16667 50 -36.33333 -119.00000 51 15.66667 -36.33333 52 -71.50000 15.66667 53 223.50000 -71.50000 54 257.83333 223.50000 55 224.00000 257.83333 56 193.83333 224.00000 57 130.66667 193.83333 58 333.50000 130.66667 59 193.33333 333.50000 60 -126.83333 193.33333 61 -184.00000 -126.83333 62 -112.33333 -184.00000 63 -77.33333 -112.33333 64 -0.50000 -77.33333 65 -20.50000 -0.50000 66 -35.16667 -20.50000 67 175.00000 -35.16667 68 82.83333 175.00000 69 -220.33333 82.83333 70 -140.50000 -220.33333 71 121.33333 -140.50000 > 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/7fykn1195654013.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/8m1ku1195654013.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/9fhk91195654013.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 > 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/105gt21195654013.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/119r8k1195654013.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/12hwk41195654014.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/13j0nc1195654014.tab") > > system("convert tmp/12xpd1195654013.ps tmp/12xpd1195654013.png") > system("convert tmp/208wz1195654013.ps tmp/208wz1195654013.png") > system("convert tmp/37g1h1195654013.ps tmp/37g1h1195654013.png") > system("convert tmp/46bq51195654013.ps tmp/46bq51195654013.png") > system("convert tmp/57etg1195654013.ps tmp/57etg1195654013.png") > system("convert tmp/6agml1195654013.ps tmp/6agml1195654013.png") > system("convert tmp/7fykn1195654013.ps tmp/7fykn1195654013.png") > system("convert tmp/8m1ku1195654013.ps tmp/8m1ku1195654013.png") > system("convert tmp/9fhk91195654013.ps tmp/9fhk91195654013.png") > > > proc.time() user system elapsed 2.304 1.476 2.701