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(274412,0,272433,0,268361,0,268586,0,264768,0,269974,0,304744,0,309365,0,308347,0,298427,0,289231,0,291975,0,294912,0,293488,0,290555,0,284736,0,281818,0,287854,0,316263,0,325412,0,326011,0,328282,0,317480,0,317539,0,313737,0,312276,0,309391,0,302950,0,300316,0,304035,0,333476,0,337698,0,335932,0,323931,0,313927,0,314485,0,313218,0,309664,0,302963,0,298989,0,298423,0,301631,0,329765,0,335083,0,327616,0,309119,0,295916,0,291413,0,291542,1,284678,1,276475,1,272566,1,264981,1,263290,1,296806,1,303598,1,286994,1,276427,1,266424,1,267153,1,268381,1,262522,1,255542,1,253158,1,243803,1,250741,1,280445,1,285257,1,270976,1,261076,1,255603,1),dim=c(2,71),dimnames=list(c('WerklozenVrouwen','Kredietcrisis'),1:71)) > y <- array(NA,dim=c(2,71),dimnames=list(c('WerklozenVrouwen','Kredietcrisis'),1:71)) > 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 WerklozenVrouwen Kredietcrisis M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 274412 0 1 0 0 0 0 0 0 0 0 0 0 1 2 272433 0 0 1 0 0 0 0 0 0 0 0 0 2 3 268361 0 0 0 1 0 0 0 0 0 0 0 0 3 4 268586 0 0 0 0 1 0 0 0 0 0 0 0 4 5 264768 0 0 0 0 0 1 0 0 0 0 0 0 5 6 269974 0 0 0 0 0 0 1 0 0 0 0 0 6 7 304744 0 0 0 0 0 0 0 1 0 0 0 0 7 8 309365 0 0 0 0 0 0 0 0 1 0 0 0 8 9 308347 0 0 0 0 0 0 0 0 0 1 0 0 9 10 298427 0 0 0 0 0 0 0 0 0 0 1 0 10 11 289231 0 0 0 0 0 0 0 0 0 0 0 1 11 12 291975 0 0 0 0 0 0 0 0 0 0 0 0 12 13 294912 0 1 0 0 0 0 0 0 0 0 0 0 13 14 293488 0 0 1 0 0 0 0 0 0 0 0 0 14 15 290555 0 0 0 1 0 0 0 0 0 0 0 0 15 16 284736 0 0 0 0 1 0 0 0 0 0 0 0 16 17 281818 0 0 0 0 0 1 0 0 0 0 0 0 17 18 287854 0 0 0 0 0 0 1 0 0 0 0 0 18 19 316263 0 0 0 0 0 0 0 1 0 0 0 0 19 20 325412 0 0 0 0 0 0 0 0 1 0 0 0 20 21 326011 0 0 0 0 0 0 0 0 0 1 0 0 21 22 328282 0 0 0 0 0 0 0 0 0 0 1 0 22 23 317480 0 0 0 0 0 0 0 0 0 0 0 1 23 24 317539 0 0 0 0 0 0 0 0 0 0 0 0 24 25 313737 0 1 0 0 0 0 0 0 0 0 0 0 25 26 312276 0 0 1 0 0 0 0 0 0 0 0 0 26 27 309391 0 0 0 1 0 0 0 0 0 0 0 0 27 28 302950 0 0 0 0 1 0 0 0 0 0 0 0 28 29 300316 0 0 0 0 0 1 0 0 0 0 0 0 29 30 304035 0 0 0 0 0 0 1 0 0 0 0 0 30 31 333476 0 0 0 0 0 0 0 1 0 0 0 0 31 32 337698 0 0 0 0 0 0 0 0 1 0 0 0 32 33 335932 0 0 0 0 0 0 0 0 0 1 0 0 33 34 323931 0 0 0 0 0 0 0 0 0 0 1 0 34 35 313927 0 0 0 0 0 0 0 0 0 0 0 1 35 36 314485 0 0 0 0 0 0 0 0 0 0 0 0 36 37 313218 0 1 0 0 0 0 0 0 0 0 0 0 37 38 309664 0 0 1 0 0 0 0 0 0 0 0 0 38 39 302963 0 0 0 1 0 0 0 0 0 0 0 0 39 40 298989 0 0 0 0 1 0 0 0 0 0 0 0 40 41 298423 0 0 0 0 0 1 0 0 0 0 0 0 41 42 301631 0 0 0 0 0 0 1 0 0 0 0 0 42 43 329765 0 0 0 0 0 0 0 1 0 0 0 0 43 44 335083 0 0 0 0 0 0 0 0 1 0 0 0 44 45 327616 0 0 0 0 0 0 0 0 0 1 0 0 45 46 309119 0 0 0 0 0 0 0 0 0 0 1 0 46 47 295916 0 0 0 0 0 0 0 0 0 0 0 1 47 48 291413 0 0 0 0 0 0 0 0 0 0 0 0 48 49 291542 1 1 0 0 0 0 0 0 0 0 0 0 49 50 284678 1 0 1 0 0 0 0 0 0 0 0 0 50 51 276475 1 0 0 1 0 0 0 0 0 0 0 0 51 52 272566 1 0 0 0 1 0 0 0 0 0 0 0 52 53 264981 1 0 0 0 0 1 0 0 0 0 0 0 53 54 263290 1 0 0 0 0 0 1 0 0 0 0 0 54 55 296806 1 0 0 0 0 0 0 1 0 0 0 0 55 56 303598 1 0 0 0 0 0 0 0 1 0 0 0 56 57 286994 1 0 0 0 0 0 0 0 0 1 0 0 57 58 276427 1 0 0 0 0 0 0 0 0 0 1 0 58 59 266424 1 0 0 0 0 0 0 0 0 0 0 1 59 60 267153 1 0 0 0 0 0 0 0 0 0 0 0 60 61 268381 1 1 0 0 0 0 0 0 0 0 0 0 61 62 262522 1 0 1 0 0 0 0 0 0 0 0 0 62 63 255542 1 0 0 1 0 0 0 0 0 0 0 0 63 64 253158 1 0 0 0 1 0 0 0 0 0 0 0 64 65 243803 1 0 0 0 0 1 0 0 0 0 0 0 65 66 250741 1 0 0 0 0 0 1 0 0 0 0 0 66 67 280445 1 0 0 0 0 0 0 1 0 0 0 0 67 68 285257 1 0 0 0 0 0 0 0 1 0 0 0 68 69 270976 1 0 0 0 0 0 0 0 0 1 0 0 69 70 261076 1 0 0 0 0 0 0 0 0 0 1 0 70 71 255603 1 0 0 0 0 0 0 0 0 0 0 1 71 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Kredietcrisis M1 M2 M3 288026.8 -51650.2 5687.4 1641.2 -4177.1 M4 M5 M6 M7 M8 -8416.8 -13418.8 -10038.8 20100.9 25397.2 M9 M10 M11 t 18118.3 7826.7 -2476.2 522.7 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -21702 -8247 -1135 8954 23867 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 288026.8 6698.4 42.999 < 2e-16 *** Kredietcrisis -51650.2 5546.9 -9.311 4.80e-13 *** M1 5687.4 7637.8 0.745 0.459548 M2 1641.2 7618.0 0.215 0.830192 M3 -4177.1 7600.2 -0.550 0.584739 M4 -8416.8 7584.6 -1.110 0.271782 M5 -13418.8 7571.2 -1.772 0.081680 . M6 -10038.8 7559.8 -1.328 0.189500 M7 20100.9 7550.6 2.662 0.010072 * M8 25397.2 7543.6 3.367 0.001368 ** M9 18118.3 7538.7 2.403 0.019520 * M10 7826.7 7536.0 1.039 0.303388 M11 -2476.2 7535.4 -0.329 0.743659 t 522.7 127.7 4.091 0.000136 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 12420 on 57 degrees of freedom Multiple R-squared: 0.7779, Adjusted R-squared: 0.7272 F-statistic: 15.35 on 13 and 57 DF, p-value: 3.971e-14 > postscript(file="/var/www/html/rcomp/tmp/1h54v1229866421.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/2vc6r1229866421.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/3n7yb1229866421.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/4hgn81229866421.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/5vwkf1229866421.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 = 71 Frequency = 1 1 2 3 4 5 6 -19824.8926 -18280.3926 -17056.7259 -13114.7259 -12453.3926 -11150.0592 7 8 9 10 11 12 -7042.3926 -8240.3926 -2502.2259 -2653.2259 -2069.0592 -2323.8975 13 14 15 16 17 18 -5596.9685 -3497.4685 -1134.8019 -3236.8019 -1675.4685 457.8648 19 20 21 22 23 24 -1795.4685 1534.5315 8889.6981 20929.6981 19907.8648 16968.0265 25 26 27 28 29 30 6955.9555 9018.4555 11429.1221 8705.1221 10550.4555 10366.7888 31 32 33 34 35 36 9145.4555 7548.4555 12538.6221 10306.6221 10082.7888 7641.9505 37 38 39 40 41 42 164.8795 134.3795 -1270.9538 -1527.9538 2385.3795 1690.7128 43 44 45 46 47 48 -837.6205 -1338.6205 -2049.4538 -10777.4538 -14200.2872 -21702.1255 49 50 51 52 53 54 23867.0510 20526.5510 17619.2177 17427.2177 14321.5510 8727.8844 55 56 57 58 59 60 11581.5510 12554.5510 2706.7177 1908.7177 1685.8844 -583.9539 61 62 63 64 65 66 -5566.0249 -7901.5249 -9585.8583 -8252.8583 -13128.5249 -10093.1916 67 68 69 70 71 -11051.5249 -12058.5249 -19583.3583 -19714.3583 -15407.1916 > postscript(file="/var/www/html/rcomp/tmp/6hw511229866421.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 = 71 Frequency = 1 lag(myerror, k = 1) myerror 0 -19824.8926 NA 1 -18280.3926 -19824.8926 2 -17056.7259 -18280.3926 3 -13114.7259 -17056.7259 4 -12453.3926 -13114.7259 5 -11150.0592 -12453.3926 6 -7042.3926 -11150.0592 7 -8240.3926 -7042.3926 8 -2502.2259 -8240.3926 9 -2653.2259 -2502.2259 10 -2069.0592 -2653.2259 11 -2323.8975 -2069.0592 12 -5596.9685 -2323.8975 13 -3497.4685 -5596.9685 14 -1134.8019 -3497.4685 15 -3236.8019 -1134.8019 16 -1675.4685 -3236.8019 17 457.8648 -1675.4685 18 -1795.4685 457.8648 19 1534.5315 -1795.4685 20 8889.6981 1534.5315 21 20929.6981 8889.6981 22 19907.8648 20929.6981 23 16968.0265 19907.8648 24 6955.9555 16968.0265 25 9018.4555 6955.9555 26 11429.1221 9018.4555 27 8705.1221 11429.1221 28 10550.4555 8705.1221 29 10366.7888 10550.4555 30 9145.4555 10366.7888 31 7548.4555 9145.4555 32 12538.6221 7548.4555 33 10306.6221 12538.6221 34 10082.7888 10306.6221 35 7641.9505 10082.7888 36 164.8795 7641.9505 37 134.3795 164.8795 38 -1270.9538 134.3795 39 -1527.9538 -1270.9538 40 2385.3795 -1527.9538 41 1690.7128 2385.3795 42 -837.6205 1690.7128 43 -1338.6205 -837.6205 44 -2049.4538 -1338.6205 45 -10777.4538 -2049.4538 46 -14200.2872 -10777.4538 47 -21702.1255 -14200.2872 48 23867.0510 -21702.1255 49 20526.5510 23867.0510 50 17619.2177 20526.5510 51 17427.2177 17619.2177 52 14321.5510 17427.2177 53 8727.8844 14321.5510 54 11581.5510 8727.8844 55 12554.5510 11581.5510 56 2706.7177 12554.5510 57 1908.7177 2706.7177 58 1685.8844 1908.7177 59 -583.9539 1685.8844 60 -5566.0249 -583.9539 61 -7901.5249 -5566.0249 62 -9585.8583 -7901.5249 63 -8252.8583 -9585.8583 64 -13128.5249 -8252.8583 65 -10093.1916 -13128.5249 66 -11051.5249 -10093.1916 67 -12058.5249 -11051.5249 68 -19583.3583 -12058.5249 69 -19714.3583 -19583.3583 70 -15407.1916 -19714.3583 71 NA -15407.1916 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -18280.3926 -19824.8926 [2,] -17056.7259 -18280.3926 [3,] -13114.7259 -17056.7259 [4,] -12453.3926 -13114.7259 [5,] -11150.0592 -12453.3926 [6,] -7042.3926 -11150.0592 [7,] -8240.3926 -7042.3926 [8,] -2502.2259 -8240.3926 [9,] -2653.2259 -2502.2259 [10,] -2069.0592 -2653.2259 [11,] -2323.8975 -2069.0592 [12,] -5596.9685 -2323.8975 [13,] -3497.4685 -5596.9685 [14,] -1134.8019 -3497.4685 [15,] -3236.8019 -1134.8019 [16,] -1675.4685 -3236.8019 [17,] 457.8648 -1675.4685 [18,] -1795.4685 457.8648 [19,] 1534.5315 -1795.4685 [20,] 8889.6981 1534.5315 [21,] 20929.6981 8889.6981 [22,] 19907.8648 20929.6981 [23,] 16968.0265 19907.8648 [24,] 6955.9555 16968.0265 [25,] 9018.4555 6955.9555 [26,] 11429.1221 9018.4555 [27,] 8705.1221 11429.1221 [28,] 10550.4555 8705.1221 [29,] 10366.7888 10550.4555 [30,] 9145.4555 10366.7888 [31,] 7548.4555 9145.4555 [32,] 12538.6221 7548.4555 [33,] 10306.6221 12538.6221 [34,] 10082.7888 10306.6221 [35,] 7641.9505 10082.7888 [36,] 164.8795 7641.9505 [37,] 134.3795 164.8795 [38,] -1270.9538 134.3795 [39,] -1527.9538 -1270.9538 [40,] 2385.3795 -1527.9538 [41,] 1690.7128 2385.3795 [42,] -837.6205 1690.7128 [43,] -1338.6205 -837.6205 [44,] -2049.4538 -1338.6205 [45,] -10777.4538 -2049.4538 [46,] -14200.2872 -10777.4538 [47,] -21702.1255 -14200.2872 [48,] 23867.0510 -21702.1255 [49,] 20526.5510 23867.0510 [50,] 17619.2177 20526.5510 [51,] 17427.2177 17619.2177 [52,] 14321.5510 17427.2177 [53,] 8727.8844 14321.5510 [54,] 11581.5510 8727.8844 [55,] 12554.5510 11581.5510 [56,] 2706.7177 12554.5510 [57,] 1908.7177 2706.7177 [58,] 1685.8844 1908.7177 [59,] -583.9539 1685.8844 [60,] -5566.0249 -583.9539 [61,] -7901.5249 -5566.0249 [62,] -9585.8583 -7901.5249 [63,] -8252.8583 -9585.8583 [64,] -13128.5249 -8252.8583 [65,] -10093.1916 -13128.5249 [66,] -11051.5249 -10093.1916 [67,] -12058.5249 -11051.5249 [68,] -19583.3583 -12058.5249 [69,] -19714.3583 -19583.3583 [70,] -15407.1916 -19714.3583 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -18280.3926 -19824.8926 2 -17056.7259 -18280.3926 3 -13114.7259 -17056.7259 4 -12453.3926 -13114.7259 5 -11150.0592 -12453.3926 6 -7042.3926 -11150.0592 7 -8240.3926 -7042.3926 8 -2502.2259 -8240.3926 9 -2653.2259 -2502.2259 10 -2069.0592 -2653.2259 11 -2323.8975 -2069.0592 12 -5596.9685 -2323.8975 13 -3497.4685 -5596.9685 14 -1134.8019 -3497.4685 15 -3236.8019 -1134.8019 16 -1675.4685 -3236.8019 17 457.8648 -1675.4685 18 -1795.4685 457.8648 19 1534.5315 -1795.4685 20 8889.6981 1534.5315 21 20929.6981 8889.6981 22 19907.8648 20929.6981 23 16968.0265 19907.8648 24 6955.9555 16968.0265 25 9018.4555 6955.9555 26 11429.1221 9018.4555 27 8705.1221 11429.1221 28 10550.4555 8705.1221 29 10366.7888 10550.4555 30 9145.4555 10366.7888 31 7548.4555 9145.4555 32 12538.6221 7548.4555 33 10306.6221 12538.6221 34 10082.7888 10306.6221 35 7641.9505 10082.7888 36 164.8795 7641.9505 37 134.3795 164.8795 38 -1270.9538 134.3795 39 -1527.9538 -1270.9538 40 2385.3795 -1527.9538 41 1690.7128 2385.3795 42 -837.6205 1690.7128 43 -1338.6205 -837.6205 44 -2049.4538 -1338.6205 45 -10777.4538 -2049.4538 46 -14200.2872 -10777.4538 47 -21702.1255 -14200.2872 48 23867.0510 -21702.1255 49 20526.5510 23867.0510 50 17619.2177 20526.5510 51 17427.2177 17619.2177 52 14321.5510 17427.2177 53 8727.8844 14321.5510 54 11581.5510 8727.8844 55 12554.5510 11581.5510 56 2706.7177 12554.5510 57 1908.7177 2706.7177 58 1685.8844 1908.7177 59 -583.9539 1685.8844 60 -5566.0249 -583.9539 61 -7901.5249 -5566.0249 62 -9585.8583 -7901.5249 63 -8252.8583 -9585.8583 64 -13128.5249 -8252.8583 65 -10093.1916 -13128.5249 66 -11051.5249 -10093.1916 67 -12058.5249 -11051.5249 68 -19583.3583 -12058.5249 69 -19714.3583 -19583.3583 70 -15407.1916 -19714.3583 > 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/71hir1229866421.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/8o78m1229866421.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/9jshi1229866421.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/105vfm1229866421.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/11y5ej1229866421.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/12r6fy1229866421.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/13u4771229866421.tab") > > system("convert tmp/1h54v1229866421.ps tmp/1h54v1229866421.png") > system("convert tmp/2vc6r1229866421.ps tmp/2vc6r1229866421.png") > system("convert tmp/3n7yb1229866421.ps tmp/3n7yb1229866421.png") > system("convert tmp/4hgn81229866421.ps tmp/4hgn81229866421.png") > system("convert tmp/5vwkf1229866421.ps tmp/5vwkf1229866421.png") > system("convert tmp/6hw511229866421.ps tmp/6hw511229866421.png") > system("convert tmp/71hir1229866421.ps tmp/71hir1229866421.png") > system("convert tmp/8o78m1229866421.ps tmp/8o78m1229866421.png") > system("convert tmp/9jshi1229866421.ps tmp/9jshi1229866421.png") > > > proc.time() user system elapsed 1.953 1.435 2.317