R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(19,0,18,0,19,0,19,0,22,0,23,0,20,0,14,0,14,0,14,0,15,0,11,0,17,0,16,0,20,0,24,0,23,0,20,0,21,0,19,0,23,0,23,0,23,0,23,0,27,0,26,0,17,0,24,0,26,0,24,0,27,0,27,0,26,0,24,0,23,0,23,0,24,1,17,1,21,1,19,1,22,1,22,1,18,1,16,1,14,1,12,1,14,1,16,1,8,1,3,1,0,1,5,1,1,1,1,1,3,1,6,1,7,1,8,1,14,1,14,1,13,1,15,1),dim=c(2,62),dimnames=list(c('consumentenvertrouwen','financiële_crisis'),1:62)) > y <- array(NA,dim=c(2,62),dimnames=list(c('consumentenvertrouwen','financiële_crisis'),1:62)) > 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 consumentenvertrouwen financi\353le_crisis M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 1 19 0 1 0 0 0 0 0 0 0 0 0 2 18 0 0 1 0 0 0 0 0 0 0 0 3 19 0 0 0 1 0 0 0 0 0 0 0 4 19 0 0 0 0 1 0 0 0 0 0 0 5 22 0 0 0 0 0 1 0 0 0 0 0 6 23 0 0 0 0 0 0 1 0 0 0 0 7 20 0 0 0 0 0 0 0 1 0 0 0 8 14 0 0 0 0 0 0 0 0 1 0 0 9 14 0 0 0 0 0 0 0 0 0 1 0 10 14 0 0 0 0 0 0 0 0 0 0 1 11 15 0 0 0 0 0 0 0 0 0 0 0 12 11 0 0 0 0 0 0 0 0 0 0 0 13 17 0 1 0 0 0 0 0 0 0 0 0 14 16 0 0 1 0 0 0 0 0 0 0 0 15 20 0 0 0 1 0 0 0 0 0 0 0 16 24 0 0 0 0 1 0 0 0 0 0 0 17 23 0 0 0 0 0 1 0 0 0 0 0 18 20 0 0 0 0 0 0 1 0 0 0 0 19 21 0 0 0 0 0 0 0 1 0 0 0 20 19 0 0 0 0 0 0 0 0 1 0 0 21 23 0 0 0 0 0 0 0 0 0 1 0 22 23 0 0 0 0 0 0 0 0 0 0 1 23 23 0 0 0 0 0 0 0 0 0 0 0 24 23 0 0 0 0 0 0 0 0 0 0 0 25 27 0 1 0 0 0 0 0 0 0 0 0 26 26 0 0 1 0 0 0 0 0 0 0 0 27 17 0 0 0 1 0 0 0 0 0 0 0 28 24 0 0 0 0 1 0 0 0 0 0 0 29 26 0 0 0 0 0 1 0 0 0 0 0 30 24 0 0 0 0 0 0 1 0 0 0 0 31 27 0 0 0 0 0 0 0 1 0 0 0 32 27 0 0 0 0 0 0 0 0 1 0 0 33 26 0 0 0 0 0 0 0 0 0 1 0 34 24 0 0 0 0 0 0 0 0 0 0 1 35 23 0 0 0 0 0 0 0 0 0 0 0 36 23 0 0 0 0 0 0 0 0 0 0 0 37 24 1 1 0 0 0 0 0 0 0 0 0 38 17 1 0 1 0 0 0 0 0 0 0 0 39 21 1 0 0 1 0 0 0 0 0 0 0 40 19 1 0 0 0 1 0 0 0 0 0 0 41 22 1 0 0 0 0 1 0 0 0 0 0 42 22 1 0 0 0 0 0 1 0 0 0 0 43 18 1 0 0 0 0 0 0 1 0 0 0 44 16 1 0 0 0 0 0 0 0 1 0 0 45 14 1 0 0 0 0 0 0 0 0 1 0 46 12 1 0 0 0 0 0 0 0 0 0 1 47 14 1 0 0 0 0 0 0 0 0 0 0 48 16 1 0 0 0 0 0 0 0 0 0 0 49 8 1 1 0 0 0 0 0 0 0 0 0 50 3 1 0 1 0 0 0 0 0 0 0 0 51 0 1 0 0 1 0 0 0 0 0 0 0 52 5 1 0 0 0 1 0 0 0 0 0 0 53 1 1 0 0 0 0 1 0 0 0 0 0 54 1 1 0 0 0 0 0 1 0 0 0 0 55 3 1 0 0 0 0 0 0 1 0 0 0 56 6 1 0 0 0 0 0 0 0 1 0 0 57 7 1 0 0 0 0 0 0 0 0 1 0 58 8 1 0 0 0 0 0 0 0 0 0 1 59 14 1 0 0 0 0 0 0 0 0 0 0 60 14 1 0 0 0 0 0 0 0 0 0 0 61 13 1 1 0 0 0 0 0 0 0 0 0 62 15 1 0 1 0 0 0 0 0 0 0 0 M11 t 1 0 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 0 10 11 1 11 12 0 12 13 0 13 14 0 14 15 0 15 16 0 16 17 0 17 18 0 18 19 0 19 20 0 20 21 0 21 22 0 22 23 1 23 24 0 24 25 0 25 26 0 26 27 0 27 28 0 28 29 0 29 30 0 30 31 0 31 32 0 32 33 0 33 34 0 34 35 1 35 36 0 36 37 0 37 38 0 38 39 0 39 40 0 40 41 0 41 42 0 42 43 0 43 44 0 44 45 0 45 46 0 46 47 1 47 48 0 48 49 0 49 50 0 50 51 0 51 52 0 52 53 0 53 54 0 54 55 0 55 56 0 56 57 0 57 58 0 58 59 1 59 60 0 60 61 0 61 62 0 62 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `financi\353le_crisis` M1 19.91667 -10.34524 1.85972 M2 M3 M4 -0.35198 -1.59464 1.16032 M5 M6 M7 1.71528 0.87024 0.62520 M8 M9 M10 -0.81984 -0.46488 -1.10992 M11 t 0.44504 0.04504 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -12.674 -3.915 1.194 3.167 11.267 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 19.91667 3.51673 5.663 8.16e-07 *** `financi\353le_crisis` -10.34524 3.19263 -3.240 0.00217 ** M1 1.85972 3.80747 0.488 0.62746 M2 -0.35198 3.79170 -0.093 0.92642 M3 -1.59464 3.98226 -0.400 0.69061 M4 1.16032 3.96544 0.293 0.77108 M5 1.71528 3.95054 0.434 0.66610 M6 0.87024 3.93758 0.221 0.82602 M7 0.62520 3.92657 0.159 0.87416 M8 -0.81984 3.91755 -0.209 0.83512 M9 -0.46488 3.91052 -0.119 0.90587 M10 -1.10992 3.90549 -0.284 0.77748 M11 0.44504 3.90247 0.114 0.90968 t 0.04504 0.08868 0.508 0.61387 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 6.169 on 48 degrees of freedom Multiple R-squared: 0.4108, Adjusted R-squared: 0.2513 F-statistic: 2.575 on 13 and 48 DF, p-value: 0.00874 > postscript(file="/var/www/html/rcomp/tmp/1j29x1260983523.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/28twy1260983523.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/3iyx41260983523.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/45o5a1260983523.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/5q5pe1260983523.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 = 62 Frequency = 1 1 2 3 4 5 6 -2.8214286 -1.6547619 0.5428571 -2.2571429 0.1428571 1.9428571 7 8 9 10 11 12 -0.8571429 -5.4571429 -5.8571429 -5.2571429 -5.8571429 -9.4571429 13 14 15 16 17 18 -5.3619048 -4.1952381 1.0023810 2.2023810 0.6023810 -1.5976190 19 20 21 22 23 24 -0.3976190 -0.9976190 2.6023810 3.2023810 1.6023810 2.0023810 25 26 27 28 29 30 4.0976190 5.2642857 -2.5380952 1.6619048 3.0619048 1.8619048 31 32 33 34 35 36 5.0619048 6.4619048 5.0619048 3.6619048 1.0619048 1.4619048 37 38 39 40 41 42 10.9023810 6.0690476 11.2666667 6.4666667 8.8666667 9.6666667 43 44 45 46 47 48 5.8666667 5.2666667 2.8666667 1.4666667 1.8666667 4.2666667 49 50 51 52 53 54 -5.6380952 -8.4714286 -10.2738095 -8.0738095 -12.6738095 -11.8738095 55 56 57 58 59 60 -9.6738095 -5.2738095 -4.6738095 -3.0738095 1.3261905 1.7261905 61 62 -1.1785714 2.9880952 > postscript(file="/var/www/html/rcomp/tmp/6e46b1260983523.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 = 62 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.8214286 NA 1 -1.6547619 -2.8214286 2 0.5428571 -1.6547619 3 -2.2571429 0.5428571 4 0.1428571 -2.2571429 5 1.9428571 0.1428571 6 -0.8571429 1.9428571 7 -5.4571429 -0.8571429 8 -5.8571429 -5.4571429 9 -5.2571429 -5.8571429 10 -5.8571429 -5.2571429 11 -9.4571429 -5.8571429 12 -5.3619048 -9.4571429 13 -4.1952381 -5.3619048 14 1.0023810 -4.1952381 15 2.2023810 1.0023810 16 0.6023810 2.2023810 17 -1.5976190 0.6023810 18 -0.3976190 -1.5976190 19 -0.9976190 -0.3976190 20 2.6023810 -0.9976190 21 3.2023810 2.6023810 22 1.6023810 3.2023810 23 2.0023810 1.6023810 24 4.0976190 2.0023810 25 5.2642857 4.0976190 26 -2.5380952 5.2642857 27 1.6619048 -2.5380952 28 3.0619048 1.6619048 29 1.8619048 3.0619048 30 5.0619048 1.8619048 31 6.4619048 5.0619048 32 5.0619048 6.4619048 33 3.6619048 5.0619048 34 1.0619048 3.6619048 35 1.4619048 1.0619048 36 10.9023810 1.4619048 37 6.0690476 10.9023810 38 11.2666667 6.0690476 39 6.4666667 11.2666667 40 8.8666667 6.4666667 41 9.6666667 8.8666667 42 5.8666667 9.6666667 43 5.2666667 5.8666667 44 2.8666667 5.2666667 45 1.4666667 2.8666667 46 1.8666667 1.4666667 47 4.2666667 1.8666667 48 -5.6380952 4.2666667 49 -8.4714286 -5.6380952 50 -10.2738095 -8.4714286 51 -8.0738095 -10.2738095 52 -12.6738095 -8.0738095 53 -11.8738095 -12.6738095 54 -9.6738095 -11.8738095 55 -5.2738095 -9.6738095 56 -4.6738095 -5.2738095 57 -3.0738095 -4.6738095 58 1.3261905 -3.0738095 59 1.7261905 1.3261905 60 -1.1785714 1.7261905 61 2.9880952 -1.1785714 62 NA 2.9880952 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.6547619 -2.8214286 [2,] 0.5428571 -1.6547619 [3,] -2.2571429 0.5428571 [4,] 0.1428571 -2.2571429 [5,] 1.9428571 0.1428571 [6,] -0.8571429 1.9428571 [7,] -5.4571429 -0.8571429 [8,] -5.8571429 -5.4571429 [9,] -5.2571429 -5.8571429 [10,] -5.8571429 -5.2571429 [11,] -9.4571429 -5.8571429 [12,] -5.3619048 -9.4571429 [13,] -4.1952381 -5.3619048 [14,] 1.0023810 -4.1952381 [15,] 2.2023810 1.0023810 [16,] 0.6023810 2.2023810 [17,] -1.5976190 0.6023810 [18,] -0.3976190 -1.5976190 [19,] -0.9976190 -0.3976190 [20,] 2.6023810 -0.9976190 [21,] 3.2023810 2.6023810 [22,] 1.6023810 3.2023810 [23,] 2.0023810 1.6023810 [24,] 4.0976190 2.0023810 [25,] 5.2642857 4.0976190 [26,] -2.5380952 5.2642857 [27,] 1.6619048 -2.5380952 [28,] 3.0619048 1.6619048 [29,] 1.8619048 3.0619048 [30,] 5.0619048 1.8619048 [31,] 6.4619048 5.0619048 [32,] 5.0619048 6.4619048 [33,] 3.6619048 5.0619048 [34,] 1.0619048 3.6619048 [35,] 1.4619048 1.0619048 [36,] 10.9023810 1.4619048 [37,] 6.0690476 10.9023810 [38,] 11.2666667 6.0690476 [39,] 6.4666667 11.2666667 [40,] 8.8666667 6.4666667 [41,] 9.6666667 8.8666667 [42,] 5.8666667 9.6666667 [43,] 5.2666667 5.8666667 [44,] 2.8666667 5.2666667 [45,] 1.4666667 2.8666667 [46,] 1.8666667 1.4666667 [47,] 4.2666667 1.8666667 [48,] -5.6380952 4.2666667 [49,] -8.4714286 -5.6380952 [50,] -10.2738095 -8.4714286 [51,] -8.0738095 -10.2738095 [52,] -12.6738095 -8.0738095 [53,] -11.8738095 -12.6738095 [54,] -9.6738095 -11.8738095 [55,] -5.2738095 -9.6738095 [56,] -4.6738095 -5.2738095 [57,] -3.0738095 -4.6738095 [58,] 1.3261905 -3.0738095 [59,] 1.7261905 1.3261905 [60,] -1.1785714 1.7261905 [61,] 2.9880952 -1.1785714 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.6547619 -2.8214286 2 0.5428571 -1.6547619 3 -2.2571429 0.5428571 4 0.1428571 -2.2571429 5 1.9428571 0.1428571 6 -0.8571429 1.9428571 7 -5.4571429 -0.8571429 8 -5.8571429 -5.4571429 9 -5.2571429 -5.8571429 10 -5.8571429 -5.2571429 11 -9.4571429 -5.8571429 12 -5.3619048 -9.4571429 13 -4.1952381 -5.3619048 14 1.0023810 -4.1952381 15 2.2023810 1.0023810 16 0.6023810 2.2023810 17 -1.5976190 0.6023810 18 -0.3976190 -1.5976190 19 -0.9976190 -0.3976190 20 2.6023810 -0.9976190 21 3.2023810 2.6023810 22 1.6023810 3.2023810 23 2.0023810 1.6023810 24 4.0976190 2.0023810 25 5.2642857 4.0976190 26 -2.5380952 5.2642857 27 1.6619048 -2.5380952 28 3.0619048 1.6619048 29 1.8619048 3.0619048 30 5.0619048 1.8619048 31 6.4619048 5.0619048 32 5.0619048 6.4619048 33 3.6619048 5.0619048 34 1.0619048 3.6619048 35 1.4619048 1.0619048 36 10.9023810 1.4619048 37 6.0690476 10.9023810 38 11.2666667 6.0690476 39 6.4666667 11.2666667 40 8.8666667 6.4666667 41 9.6666667 8.8666667 42 5.8666667 9.6666667 43 5.2666667 5.8666667 44 2.8666667 5.2666667 45 1.4666667 2.8666667 46 1.8666667 1.4666667 47 4.2666667 1.8666667 48 -5.6380952 4.2666667 49 -8.4714286 -5.6380952 50 -10.2738095 -8.4714286 51 -8.0738095 -10.2738095 52 -12.6738095 -8.0738095 53 -11.8738095 -12.6738095 54 -9.6738095 -11.8738095 55 -5.2738095 -9.6738095 56 -4.6738095 -5.2738095 57 -3.0738095 -4.6738095 58 1.3261905 -3.0738095 59 1.7261905 1.3261905 60 -1.1785714 1.7261905 61 2.9880952 -1.1785714 > 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/7nycx1260983523.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/8ij841260983523.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/95xdw1260983523.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/10x5hf1260983523.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/11783f1260983523.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/127yge1260983523.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/134go81260983523.tab") > try(system("convert tmp/1j29x1260983523.ps tmp/1j29x1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/28twy1260983523.ps tmp/28twy1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/3iyx41260983523.ps tmp/3iyx41260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/45o5a1260983523.ps tmp/45o5a1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/5q5pe1260983523.ps tmp/5q5pe1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/6e46b1260983523.ps tmp/6e46b1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/7nycx1260983523.ps tmp/7nycx1260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/8ij841260983523.ps tmp/8ij841260983523.png",intern=TRUE)) character(0) > try(system("convert tmp/95xdw1260983523.ps tmp/95xdw1260983523.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.980 1.433 3.621