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(513,0,503,0,471,0,471,0,476,0,475,0,470,0,461,0,455,0,456,0,517,0,525,0,523,1,519,1,509,1,512,1,519,1,517,1,510,1,509,1,501,1,507,1,569,1,580,1,578,1,565,1,547,1,555,1,562,1,561,1,555,1,544,1,537,1,543,1,594,1,611,1,613,1,611,1,594,1,595,1,591,1,589,1,584,1,573,1,567,1,569,1,621,1,629,1,628,1,612,1,595,1,597,1,593,1,590,1,580,1,574,1,573,1,573,1,620,1,626,1,620,1,588,1,566,1,557,1,561,1,549,1,532,1,526,1,511,1,499,1,555,1,565,1,542,1),dim=c(2,73),dimnames=list(c('werk','actbel'),1:73)) > y <- array(NA,dim=c(2,73),dimnames=list(c('werk','actbel'),1:73)) > 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 werk actbel M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 513 0 1 0 0 0 0 0 0 0 0 0 0 1 2 503 0 0 1 0 0 0 0 0 0 0 0 0 2 3 471 0 0 0 1 0 0 0 0 0 0 0 0 3 4 471 0 0 0 0 1 0 0 0 0 0 0 0 4 5 476 0 0 0 0 0 1 0 0 0 0 0 0 5 6 475 0 0 0 0 0 0 1 0 0 0 0 0 6 7 470 0 0 0 0 0 0 0 1 0 0 0 0 7 8 461 0 0 0 0 0 0 0 0 1 0 0 0 8 9 455 0 0 0 0 0 0 0 0 0 1 0 0 9 10 456 0 0 0 0 0 0 0 0 0 0 1 0 10 11 517 0 0 0 0 0 0 0 0 0 0 0 1 11 12 525 0 0 0 0 0 0 0 0 0 0 0 0 12 13 523 1 1 0 0 0 0 0 0 0 0 0 0 13 14 519 1 0 1 0 0 0 0 0 0 0 0 0 14 15 509 1 0 0 1 0 0 0 0 0 0 0 0 15 16 512 1 0 0 0 1 0 0 0 0 0 0 0 16 17 519 1 0 0 0 0 1 0 0 0 0 0 0 17 18 517 1 0 0 0 0 0 1 0 0 0 0 0 18 19 510 1 0 0 0 0 0 0 1 0 0 0 0 19 20 509 1 0 0 0 0 0 0 0 1 0 0 0 20 21 501 1 0 0 0 0 0 0 0 0 1 0 0 21 22 507 1 0 0 0 0 0 0 0 0 0 1 0 22 23 569 1 0 0 0 0 0 0 0 0 0 0 1 23 24 580 1 0 0 0 0 0 0 0 0 0 0 0 24 25 578 1 1 0 0 0 0 0 0 0 0 0 0 25 26 565 1 0 1 0 0 0 0 0 0 0 0 0 26 27 547 1 0 0 1 0 0 0 0 0 0 0 0 27 28 555 1 0 0 0 1 0 0 0 0 0 0 0 28 29 562 1 0 0 0 0 1 0 0 0 0 0 0 29 30 561 1 0 0 0 0 0 1 0 0 0 0 0 30 31 555 1 0 0 0 0 0 0 1 0 0 0 0 31 32 544 1 0 0 0 0 0 0 0 1 0 0 0 32 33 537 1 0 0 0 0 0 0 0 0 1 0 0 33 34 543 1 0 0 0 0 0 0 0 0 0 1 0 34 35 594 1 0 0 0 0 0 0 0 0 0 0 1 35 36 611 1 0 0 0 0 0 0 0 0 0 0 0 36 37 613 1 1 0 0 0 0 0 0 0 0 0 0 37 38 611 1 0 1 0 0 0 0 0 0 0 0 0 38 39 594 1 0 0 1 0 0 0 0 0 0 0 0 39 40 595 1 0 0 0 1 0 0 0 0 0 0 0 40 41 591 1 0 0 0 0 1 0 0 0 0 0 0 41 42 589 1 0 0 0 0 0 1 0 0 0 0 0 42 43 584 1 0 0 0 0 0 0 1 0 0 0 0 43 44 573 1 0 0 0 0 0 0 0 1 0 0 0 44 45 567 1 0 0 0 0 0 0 0 0 1 0 0 45 46 569 1 0 0 0 0 0 0 0 0 0 1 0 46 47 621 1 0 0 0 0 0 0 0 0 0 0 1 47 48 629 1 0 0 0 0 0 0 0 0 0 0 0 48 49 628 1 1 0 0 0 0 0 0 0 0 0 0 49 50 612 1 0 1 0 0 0 0 0 0 0 0 0 50 51 595 1 0 0 1 0 0 0 0 0 0 0 0 51 52 597 1 0 0 0 1 0 0 0 0 0 0 0 52 53 593 1 0 0 0 0 1 0 0 0 0 0 0 53 54 590 1 0 0 0 0 0 1 0 0 0 0 0 54 55 580 1 0 0 0 0 0 0 1 0 0 0 0 55 56 574 1 0 0 0 0 0 0 0 1 0 0 0 56 57 573 1 0 0 0 0 0 0 0 0 1 0 0 57 58 573 1 0 0 0 0 0 0 0 0 0 1 0 58 59 620 1 0 0 0 0 0 0 0 0 0 0 1 59 60 626 1 0 0 0 0 0 0 0 0 0 0 0 60 61 620 1 1 0 0 0 0 0 0 0 0 0 0 61 62 588 1 0 1 0 0 0 0 0 0 0 0 0 62 63 566 1 0 0 1 0 0 0 0 0 0 0 0 63 64 557 1 0 0 0 1 0 0 0 0 0 0 0 64 65 561 1 0 0 0 0 1 0 0 0 0 0 0 65 66 549 1 0 0 0 0 0 1 0 0 0 0 0 66 67 532 1 0 0 0 0 0 0 1 0 0 0 0 67 68 526 1 0 0 0 0 0 0 0 1 0 0 0 68 69 511 1 0 0 0 0 0 0 0 0 1 0 0 69 70 499 1 0 0 0 0 0 0 0 0 0 1 0 70 71 555 1 0 0 0 0 0 0 0 0 0 0 1 71 72 565 1 0 0 0 0 0 0 0 0 0 0 0 72 73 542 1 1 0 0 0 0 0 0 0 0 0 0 73 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) actbel M1 M2 M3 M4 513.2143 58.9090 -13.6611 -16.5647 -36.5416 -36.3518 M5 M6 M7 M8 M9 M10 -34.4953 -38.6388 -47.6157 -55.5926 -63.4027 -63.5463 M11 t -9.3565 0.6435 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -63.440 -18.457 4.063 22.283 38.005 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 513.2143 14.1575 36.250 < 2e-16 *** actbel 58.9090 11.9145 4.944 6.67e-06 *** M1 -13.6611 16.0204 -0.853 0.39726 M2 -16.5647 16.7083 -0.991 0.32553 M3 -36.5416 16.6828 -2.190 0.03246 * M4 -36.3518 16.6599 -2.182 0.03310 * M5 -34.4953 16.6397 -2.073 0.04254 * M6 -38.6388 16.6222 -2.325 0.02356 * M7 -47.6157 16.6074 -2.867 0.00573 ** M8 -55.5926 16.5952 -3.350 0.00141 ** M9 -63.4027 16.5858 -3.823 0.00032 *** M10 -63.5463 16.5790 -3.833 0.00031 *** M11 -9.3565 16.5750 -0.564 0.57456 t 0.6435 0.2117 3.040 0.00353 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.71 on 59 degrees of freedom Multiple R-Squared: 0.6865, Adjusted R-squared: 0.6174 F-statistic: 9.939 on 13 and 59 DF, p-value: 1.406e-10 > postscript(file="/var/www/html/rcomp/tmp/1zasd1195124106.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/2lx7g1195124106.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/3rhys1195124106.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/4xu9s1195124106.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/5bmic1195124106.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 = 73 Frequency = 1 1 2 3 4 5 6 12.8032924 5.0633371 -7.6033296 -8.4366629 -5.9366629 -3.4366629 7 8 9 10 11 12 -0.1033296 -1.7699963 -0.6033296 -0.1033296 6.0633371 4.0633371 13 14 15 16 17 18 -43.8280320 -45.5679874 -36.2346540 -34.0679874 -29.5679874 -28.0679874 19 20 21 22 23 24 -26.7346540 -20.4013207 -21.2346540 -15.7346540 -8.5679874 -7.5679874 25 26 27 28 29 30 3.4496280 -7.2903274 -5.9569940 1.2096726 5.7096726 8.2096726 31 32 33 34 35 36 10.5430060 6.8763393 7.0430060 12.5430060 8.7096726 15.7096726 37 38 39 40 41 42 30.7272879 30.9873326 33.3206659 33.4873326 26.9873326 28.4873326 43 44 45 46 47 48 31.8206659 28.1539993 29.3206659 30.8206659 27.9873326 25.9873326 49 50 51 52 53 54 38.0049479 24.2649926 26.5983259 27.7649926 21.2649926 21.7649926 55 56 57 58 59 60 20.0983259 21.4316592 27.5983259 27.0983259 19.2649926 15.2649926 61 62 63 64 65 66 22.2826079 -7.4573475 -10.1240141 -19.9573475 -18.4573475 -26.9573475 67 68 69 70 71 72 -35.6240141 -34.2906808 -42.1240141 -54.6240141 -53.4573475 -53.4573475 73 -63.4397321 > postscript(file="/var/www/html/rcomp/tmp/69rwb1195124106.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 = 73 Frequency = 1 lag(myerror, k = 1) myerror 0 12.8032924 NA 1 5.0633371 12.8032924 2 -7.6033296 5.0633371 3 -8.4366629 -7.6033296 4 -5.9366629 -8.4366629 5 -3.4366629 -5.9366629 6 -0.1033296 -3.4366629 7 -1.7699963 -0.1033296 8 -0.6033296 -1.7699963 9 -0.1033296 -0.6033296 10 6.0633371 -0.1033296 11 4.0633371 6.0633371 12 -43.8280320 4.0633371 13 -45.5679874 -43.8280320 14 -36.2346540 -45.5679874 15 -34.0679874 -36.2346540 16 -29.5679874 -34.0679874 17 -28.0679874 -29.5679874 18 -26.7346540 -28.0679874 19 -20.4013207 -26.7346540 20 -21.2346540 -20.4013207 21 -15.7346540 -21.2346540 22 -8.5679874 -15.7346540 23 -7.5679874 -8.5679874 24 3.4496280 -7.5679874 25 -7.2903274 3.4496280 26 -5.9569940 -7.2903274 27 1.2096726 -5.9569940 28 5.7096726 1.2096726 29 8.2096726 5.7096726 30 10.5430060 8.2096726 31 6.8763393 10.5430060 32 7.0430060 6.8763393 33 12.5430060 7.0430060 34 8.7096726 12.5430060 35 15.7096726 8.7096726 36 30.7272879 15.7096726 37 30.9873326 30.7272879 38 33.3206659 30.9873326 39 33.4873326 33.3206659 40 26.9873326 33.4873326 41 28.4873326 26.9873326 42 31.8206659 28.4873326 43 28.1539993 31.8206659 44 29.3206659 28.1539993 45 30.8206659 29.3206659 46 27.9873326 30.8206659 47 25.9873326 27.9873326 48 38.0049479 25.9873326 49 24.2649926 38.0049479 50 26.5983259 24.2649926 51 27.7649926 26.5983259 52 21.2649926 27.7649926 53 21.7649926 21.2649926 54 20.0983259 21.7649926 55 21.4316592 20.0983259 56 27.5983259 21.4316592 57 27.0983259 27.5983259 58 19.2649926 27.0983259 59 15.2649926 19.2649926 60 22.2826079 15.2649926 61 -7.4573475 22.2826079 62 -10.1240141 -7.4573475 63 -19.9573475 -10.1240141 64 -18.4573475 -19.9573475 65 -26.9573475 -18.4573475 66 -35.6240141 -26.9573475 67 -34.2906808 -35.6240141 68 -42.1240141 -34.2906808 69 -54.6240141 -42.1240141 70 -53.4573475 -54.6240141 71 -53.4573475 -53.4573475 72 -63.4397321 -53.4573475 73 NA -63.4397321 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 5.0633371 12.8032924 [2,] -7.6033296 5.0633371 [3,] -8.4366629 -7.6033296 [4,] -5.9366629 -8.4366629 [5,] -3.4366629 -5.9366629 [6,] -0.1033296 -3.4366629 [7,] -1.7699963 -0.1033296 [8,] -0.6033296 -1.7699963 [9,] -0.1033296 -0.6033296 [10,] 6.0633371 -0.1033296 [11,] 4.0633371 6.0633371 [12,] -43.8280320 4.0633371 [13,] -45.5679874 -43.8280320 [14,] -36.2346540 -45.5679874 [15,] -34.0679874 -36.2346540 [16,] -29.5679874 -34.0679874 [17,] -28.0679874 -29.5679874 [18,] -26.7346540 -28.0679874 [19,] -20.4013207 -26.7346540 [20,] -21.2346540 -20.4013207 [21,] -15.7346540 -21.2346540 [22,] -8.5679874 -15.7346540 [23,] -7.5679874 -8.5679874 [24,] 3.4496280 -7.5679874 [25,] -7.2903274 3.4496280 [26,] -5.9569940 -7.2903274 [27,] 1.2096726 -5.9569940 [28,] 5.7096726 1.2096726 [29,] 8.2096726 5.7096726 [30,] 10.5430060 8.2096726 [31,] 6.8763393 10.5430060 [32,] 7.0430060 6.8763393 [33,] 12.5430060 7.0430060 [34,] 8.7096726 12.5430060 [35,] 15.7096726 8.7096726 [36,] 30.7272879 15.7096726 [37,] 30.9873326 30.7272879 [38,] 33.3206659 30.9873326 [39,] 33.4873326 33.3206659 [40,] 26.9873326 33.4873326 [41,] 28.4873326 26.9873326 [42,] 31.8206659 28.4873326 [43,] 28.1539993 31.8206659 [44,] 29.3206659 28.1539993 [45,] 30.8206659 29.3206659 [46,] 27.9873326 30.8206659 [47,] 25.9873326 27.9873326 [48,] 38.0049479 25.9873326 [49,] 24.2649926 38.0049479 [50,] 26.5983259 24.2649926 [51,] 27.7649926 26.5983259 [52,] 21.2649926 27.7649926 [53,] 21.7649926 21.2649926 [54,] 20.0983259 21.7649926 [55,] 21.4316592 20.0983259 [56,] 27.5983259 21.4316592 [57,] 27.0983259 27.5983259 [58,] 19.2649926 27.0983259 [59,] 15.2649926 19.2649926 [60,] 22.2826079 15.2649926 [61,] -7.4573475 22.2826079 [62,] -10.1240141 -7.4573475 [63,] -19.9573475 -10.1240141 [64,] -18.4573475 -19.9573475 [65,] -26.9573475 -18.4573475 [66,] -35.6240141 -26.9573475 [67,] -34.2906808 -35.6240141 [68,] -42.1240141 -34.2906808 [69,] -54.6240141 -42.1240141 [70,] -53.4573475 -54.6240141 [71,] -53.4573475 -53.4573475 [72,] -63.4397321 -53.4573475 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 5.0633371 12.8032924 2 -7.6033296 5.0633371 3 -8.4366629 -7.6033296 4 -5.9366629 -8.4366629 5 -3.4366629 -5.9366629 6 -0.1033296 -3.4366629 7 -1.7699963 -0.1033296 8 -0.6033296 -1.7699963 9 -0.1033296 -0.6033296 10 6.0633371 -0.1033296 11 4.0633371 6.0633371 12 -43.8280320 4.0633371 13 -45.5679874 -43.8280320 14 -36.2346540 -45.5679874 15 -34.0679874 -36.2346540 16 -29.5679874 -34.0679874 17 -28.0679874 -29.5679874 18 -26.7346540 -28.0679874 19 -20.4013207 -26.7346540 20 -21.2346540 -20.4013207 21 -15.7346540 -21.2346540 22 -8.5679874 -15.7346540 23 -7.5679874 -8.5679874 24 3.4496280 -7.5679874 25 -7.2903274 3.4496280 26 -5.9569940 -7.2903274 27 1.2096726 -5.9569940 28 5.7096726 1.2096726 29 8.2096726 5.7096726 30 10.5430060 8.2096726 31 6.8763393 10.5430060 32 7.0430060 6.8763393 33 12.5430060 7.0430060 34 8.7096726 12.5430060 35 15.7096726 8.7096726 36 30.7272879 15.7096726 37 30.9873326 30.7272879 38 33.3206659 30.9873326 39 33.4873326 33.3206659 40 26.9873326 33.4873326 41 28.4873326 26.9873326 42 31.8206659 28.4873326 43 28.1539993 31.8206659 44 29.3206659 28.1539993 45 30.8206659 29.3206659 46 27.9873326 30.8206659 47 25.9873326 27.9873326 48 38.0049479 25.9873326 49 24.2649926 38.0049479 50 26.5983259 24.2649926 51 27.7649926 26.5983259 52 21.2649926 27.7649926 53 21.7649926 21.2649926 54 20.0983259 21.7649926 55 21.4316592 20.0983259 56 27.5983259 21.4316592 57 27.0983259 27.5983259 58 19.2649926 27.0983259 59 15.2649926 19.2649926 60 22.2826079 15.2649926 61 -7.4573475 22.2826079 62 -10.1240141 -7.4573475 63 -19.9573475 -10.1240141 64 -18.4573475 -19.9573475 65 -26.9573475 -18.4573475 66 -35.6240141 -26.9573475 67 -34.2906808 -35.6240141 68 -42.1240141 -34.2906808 69 -54.6240141 -42.1240141 70 -53.4573475 -54.6240141 71 -53.4573475 -53.4573475 72 -63.4397321 -53.4573475 > 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/7zgnt1195124106.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/8sgxj1195124106.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/9p8bf1195124106.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/10s6g01195124106.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/11h84n1195124106.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/12luay1195124106.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/13cqfz1195124106.tab") > > system("convert tmp/1zasd1195124106.ps tmp/1zasd1195124106.png") > system("convert tmp/2lx7g1195124106.ps tmp/2lx7g1195124106.png") > system("convert tmp/3rhys1195124106.ps tmp/3rhys1195124106.png") > system("convert tmp/4xu9s1195124106.ps tmp/4xu9s1195124106.png") > system("convert tmp/5bmic1195124106.ps tmp/5bmic1195124106.png") > system("convert tmp/69rwb1195124106.ps tmp/69rwb1195124106.png") > system("convert tmp/7zgnt1195124106.ps tmp/7zgnt1195124106.png") > system("convert tmp/8sgxj1195124106.ps tmp/8sgxj1195124106.png") > system("convert tmp/9p8bf1195124106.ps tmp/9p8bf1195124106.png") > > > proc.time() user system elapsed 2.452 1.513 2.957