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(244752,0,244576,0,241572,0,240541,0,236089,0,236997,0,264579,0,270349,0,269645,0,267037,0,258113,0,262813,0,267413,0,267366,0,264777,0,258863,0,254844,0,254868,0,277267,0,285351,0,286602,0,283042,0,276687,0,277915,0,277128,0,277103,0,275037,0,270150,0,267140,0,264993,0,287259,0,291186,0,292300,0,288186,0,281477,0,282656,0,280190,0,280408,0,276836,0,275216,0,274352,0,271311,0,289802,0,290726,0,292300,0,278506,0,269826,0,265861,0,269034,1,264176,1,255198,1,253353,1,246057,1,235372,1,258556,1,260993,1,254663,1,250643,1,243422,1,247105,1,248541,1,245039,1,237080,1,237085,1,225554,1,226839,1,247934,1,248333,1,246969,1,245098,1,246263,1),dim=c(2,71),dimnames=list(c('WerklozenMannen','Kredietcrisis'),1:71)) > y <- array(NA,dim=c(2,71),dimnames=list(c('WerklozenMannen','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 WerklozenMannen Kredietcrisis M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 244752 0 1 0 0 0 0 0 0 0 0 0 0 1 2 244576 0 0 1 0 0 0 0 0 0 0 0 0 2 3 241572 0 0 0 1 0 0 0 0 0 0 0 0 3 4 240541 0 0 0 0 1 0 0 0 0 0 0 0 4 5 236089 0 0 0 0 0 1 0 0 0 0 0 0 5 6 236997 0 0 0 0 0 0 1 0 0 0 0 0 6 7 264579 0 0 0 0 0 0 0 1 0 0 0 0 7 8 270349 0 0 0 0 0 0 0 0 1 0 0 0 8 9 269645 0 0 0 0 0 0 0 0 0 1 0 0 9 10 267037 0 0 0 0 0 0 0 0 0 0 1 0 10 11 258113 0 0 0 0 0 0 0 0 0 0 0 1 11 12 262813 0 0 0 0 0 0 0 0 0 0 0 0 12 13 267413 0 1 0 0 0 0 0 0 0 0 0 0 13 14 267366 0 0 1 0 0 0 0 0 0 0 0 0 14 15 264777 0 0 0 1 0 0 0 0 0 0 0 0 15 16 258863 0 0 0 0 1 0 0 0 0 0 0 0 16 17 254844 0 0 0 0 0 1 0 0 0 0 0 0 17 18 254868 0 0 0 0 0 0 1 0 0 0 0 0 18 19 277267 0 0 0 0 0 0 0 1 0 0 0 0 19 20 285351 0 0 0 0 0 0 0 0 1 0 0 0 20 21 286602 0 0 0 0 0 0 0 0 0 1 0 0 21 22 283042 0 0 0 0 0 0 0 0 0 0 1 0 22 23 276687 0 0 0 0 0 0 0 0 0 0 0 1 23 24 277915 0 0 0 0 0 0 0 0 0 0 0 0 24 25 277128 0 1 0 0 0 0 0 0 0 0 0 0 25 26 277103 0 0 1 0 0 0 0 0 0 0 0 0 26 27 275037 0 0 0 1 0 0 0 0 0 0 0 0 27 28 270150 0 0 0 0 1 0 0 0 0 0 0 0 28 29 267140 0 0 0 0 0 1 0 0 0 0 0 0 29 30 264993 0 0 0 0 0 0 1 0 0 0 0 0 30 31 287259 0 0 0 0 0 0 0 1 0 0 0 0 31 32 291186 0 0 0 0 0 0 0 0 1 0 0 0 32 33 292300 0 0 0 0 0 0 0 0 0 1 0 0 33 34 288186 0 0 0 0 0 0 0 0 0 0 1 0 34 35 281477 0 0 0 0 0 0 0 0 0 0 0 1 35 36 282656 0 0 0 0 0 0 0 0 0 0 0 0 36 37 280190 0 1 0 0 0 0 0 0 0 0 0 0 37 38 280408 0 0 1 0 0 0 0 0 0 0 0 0 38 39 276836 0 0 0 1 0 0 0 0 0 0 0 0 39 40 275216 0 0 0 0 1 0 0 0 0 0 0 0 40 41 274352 0 0 0 0 0 1 0 0 0 0 0 0 41 42 271311 0 0 0 0 0 0 1 0 0 0 0 0 42 43 289802 0 0 0 0 0 0 0 1 0 0 0 0 43 44 290726 0 0 0 0 0 0 0 0 1 0 0 0 44 45 292300 0 0 0 0 0 0 0 0 0 1 0 0 45 46 278506 0 0 0 0 0 0 0 0 0 0 1 0 46 47 269826 0 0 0 0 0 0 0 0 0 0 0 1 47 48 265861 0 0 0 0 0 0 0 0 0 0 0 0 48 49 269034 1 1 0 0 0 0 0 0 0 0 0 0 49 50 264176 1 0 1 0 0 0 0 0 0 0 0 0 50 51 255198 1 0 0 1 0 0 0 0 0 0 0 0 51 52 253353 1 0 0 0 1 0 0 0 0 0 0 0 52 53 246057 1 0 0 0 0 1 0 0 0 0 0 0 53 54 235372 1 0 0 0 0 0 1 0 0 0 0 0 54 55 258556 1 0 0 0 0 0 0 1 0 0 0 0 55 56 260993 1 0 0 0 0 0 0 0 1 0 0 0 56 57 254663 1 0 0 0 0 0 0 0 0 1 0 0 57 58 250643 1 0 0 0 0 0 0 0 0 0 1 0 58 59 243422 1 0 0 0 0 0 0 0 0 0 0 1 59 60 247105 1 0 0 0 0 0 0 0 0 0 0 0 60 61 248541 1 1 0 0 0 0 0 0 0 0 0 0 61 62 245039 1 0 1 0 0 0 0 0 0 0 0 0 62 63 237080 1 0 0 1 0 0 0 0 0 0 0 0 63 64 237085 1 0 0 0 1 0 0 0 0 0 0 0 64 65 225554 1 0 0 0 0 1 0 0 0 0 0 0 65 66 226839 1 0 0 0 0 0 1 0 0 0 0 0 66 67 247934 1 0 0 0 0 0 0 1 0 0 0 0 67 68 248333 1 0 0 0 0 0 0 0 1 0 0 0 68 69 246969 1 0 0 0 0 0 0 0 0 1 0 0 69 70 245098 1 0 0 0 0 0 0 0 0 0 1 0 70 71 246263 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 255603.4 -43212.9 5822.1 3859.6 -1399.2 M4 M5 M6 M7 M8 -4512.0 -10271.5 -13111.6 8827.1 11853.1 M9 M10 M11 t 10545.8 4987.1 -1697.7 564.1 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -17237.6 -5336.1 630.2 5615.1 23178.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 255603.4 5252.9 48.659 < 2e-16 *** Kredietcrisis -43212.9 4349.9 -9.934 4.79e-14 *** M1 5822.1 5989.6 0.972 0.3351 M2 3859.6 5974.0 0.646 0.5208 M3 -1399.2 5960.1 -0.235 0.8152 M4 -4512.0 5947.9 -0.759 0.4512 M5 -10271.5 5937.3 -1.730 0.0890 . M6 -13111.6 5928.4 -2.212 0.0310 * M7 8827.1 5921.2 1.491 0.1415 M8 11853.1 5915.7 2.004 0.0499 * M9 10545.8 5911.9 1.784 0.0798 . M10 4987.1 5909.7 0.844 0.4023 M11 -1697.7 5909.3 -0.287 0.7749 t 564.1 100.2 5.631 5.73e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 9744 on 57 degrees of freedom Multiple R-squared: 0.7477, Adjusted R-squared: 0.6901 F-statistic: 12.99 on 13 and 57 DF, p-value: 1.224e-12 > postscript(file="/var/www/html/rcomp/tmp/1wwfa1229866146.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/2xvwm1229866146.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/3xrh01229866146.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/46dop1229866146.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/5npcl1229866146.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 -17237.614993 -16015.281660 -14324.614993 -12806.948327 -12063.614993 6 7 8 9 10 -8879.614993 -3800.448327 -1620.614993 -1581.448327 805.051673 11 12 13 14 15 -1998.281660 439.898130 -1346.349245 4.984088 2110.650755 16 17 18 19 20 -1254.682579 -78.349245 2221.650755 2117.817421 6611.650755 21 22 23 24 25 8605.817421 10040.317421 9805.984088 8772.163878 1598.916503 26 27 28 29 30 2972.249836 5600.916503 3262.583169 5447.916503 5576.916503 31 32 33 34 35 5340.083169 5676.916503 7534.083169 8414.583169 7826.249836 36 37 38 39 40 6743.429626 -2108.817749 -492.484416 630.182251 1558.848917 41 42 43 44 45 5890.182251 5125.182251 1113.348917 -1552.817749 764.348917 46 47 48 49 50 -8035.151083 -10594.484416 -16821.304626 23178.299869 19718.633202 51 52 53 54 55 15435.299869 16138.966535 14038.299869 5629.299869 6310.466535 56 57 58 59 60 5157.299869 -429.533465 544.966535 -555.366798 865.812992 61 62 63 64 65 -4084.434383 -6188.101050 -9452.434383 -6898.767717 -13234.434383 66 67 68 69 70 -9673.434383 -11081.267717 -14272.434383 -14893.267717 -11769.767717 71 -4484.101050 > postscript(file="/var/www/html/rcomp/tmp/6pxtc1229866146.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 -17237.614993 NA 1 -16015.281660 -17237.614993 2 -14324.614993 -16015.281660 3 -12806.948327 -14324.614993 4 -12063.614993 -12806.948327 5 -8879.614993 -12063.614993 6 -3800.448327 -8879.614993 7 -1620.614993 -3800.448327 8 -1581.448327 -1620.614993 9 805.051673 -1581.448327 10 -1998.281660 805.051673 11 439.898130 -1998.281660 12 -1346.349245 439.898130 13 4.984088 -1346.349245 14 2110.650755 4.984088 15 -1254.682579 2110.650755 16 -78.349245 -1254.682579 17 2221.650755 -78.349245 18 2117.817421 2221.650755 19 6611.650755 2117.817421 20 8605.817421 6611.650755 21 10040.317421 8605.817421 22 9805.984088 10040.317421 23 8772.163878 9805.984088 24 1598.916503 8772.163878 25 2972.249836 1598.916503 26 5600.916503 2972.249836 27 3262.583169 5600.916503 28 5447.916503 3262.583169 29 5576.916503 5447.916503 30 5340.083169 5576.916503 31 5676.916503 5340.083169 32 7534.083169 5676.916503 33 8414.583169 7534.083169 34 7826.249836 8414.583169 35 6743.429626 7826.249836 36 -2108.817749 6743.429626 37 -492.484416 -2108.817749 38 630.182251 -492.484416 39 1558.848917 630.182251 40 5890.182251 1558.848917 41 5125.182251 5890.182251 42 1113.348917 5125.182251 43 -1552.817749 1113.348917 44 764.348917 -1552.817749 45 -8035.151083 764.348917 46 -10594.484416 -8035.151083 47 -16821.304626 -10594.484416 48 23178.299869 -16821.304626 49 19718.633202 23178.299869 50 15435.299869 19718.633202 51 16138.966535 15435.299869 52 14038.299869 16138.966535 53 5629.299869 14038.299869 54 6310.466535 5629.299869 55 5157.299869 6310.466535 56 -429.533465 5157.299869 57 544.966535 -429.533465 58 -555.366798 544.966535 59 865.812992 -555.366798 60 -4084.434383 865.812992 61 -6188.101050 -4084.434383 62 -9452.434383 -6188.101050 63 -6898.767717 -9452.434383 64 -13234.434383 -6898.767717 65 -9673.434383 -13234.434383 66 -11081.267717 -9673.434383 67 -14272.434383 -11081.267717 68 -14893.267717 -14272.434383 69 -11769.767717 -14893.267717 70 -4484.101050 -11769.767717 71 NA -4484.101050 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -16015.281660 -17237.614993 [2,] -14324.614993 -16015.281660 [3,] -12806.948327 -14324.614993 [4,] -12063.614993 -12806.948327 [5,] -8879.614993 -12063.614993 [6,] -3800.448327 -8879.614993 [7,] -1620.614993 -3800.448327 [8,] -1581.448327 -1620.614993 [9,] 805.051673 -1581.448327 [10,] -1998.281660 805.051673 [11,] 439.898130 -1998.281660 [12,] -1346.349245 439.898130 [13,] 4.984088 -1346.349245 [14,] 2110.650755 4.984088 [15,] -1254.682579 2110.650755 [16,] -78.349245 -1254.682579 [17,] 2221.650755 -78.349245 [18,] 2117.817421 2221.650755 [19,] 6611.650755 2117.817421 [20,] 8605.817421 6611.650755 [21,] 10040.317421 8605.817421 [22,] 9805.984088 10040.317421 [23,] 8772.163878 9805.984088 [24,] 1598.916503 8772.163878 [25,] 2972.249836 1598.916503 [26,] 5600.916503 2972.249836 [27,] 3262.583169 5600.916503 [28,] 5447.916503 3262.583169 [29,] 5576.916503 5447.916503 [30,] 5340.083169 5576.916503 [31,] 5676.916503 5340.083169 [32,] 7534.083169 5676.916503 [33,] 8414.583169 7534.083169 [34,] 7826.249836 8414.583169 [35,] 6743.429626 7826.249836 [36,] -2108.817749 6743.429626 [37,] -492.484416 -2108.817749 [38,] 630.182251 -492.484416 [39,] 1558.848917 630.182251 [40,] 5890.182251 1558.848917 [41,] 5125.182251 5890.182251 [42,] 1113.348917 5125.182251 [43,] -1552.817749 1113.348917 [44,] 764.348917 -1552.817749 [45,] -8035.151083 764.348917 [46,] -10594.484416 -8035.151083 [47,] -16821.304626 -10594.484416 [48,] 23178.299869 -16821.304626 [49,] 19718.633202 23178.299869 [50,] 15435.299869 19718.633202 [51,] 16138.966535 15435.299869 [52,] 14038.299869 16138.966535 [53,] 5629.299869 14038.299869 [54,] 6310.466535 5629.299869 [55,] 5157.299869 6310.466535 [56,] -429.533465 5157.299869 [57,] 544.966535 -429.533465 [58,] -555.366798 544.966535 [59,] 865.812992 -555.366798 [60,] -4084.434383 865.812992 [61,] -6188.101050 -4084.434383 [62,] -9452.434383 -6188.101050 [63,] -6898.767717 -9452.434383 [64,] -13234.434383 -6898.767717 [65,] -9673.434383 -13234.434383 [66,] -11081.267717 -9673.434383 [67,] -14272.434383 -11081.267717 [68,] -14893.267717 -14272.434383 [69,] -11769.767717 -14893.267717 [70,] -4484.101050 -11769.767717 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -16015.281660 -17237.614993 2 -14324.614993 -16015.281660 3 -12806.948327 -14324.614993 4 -12063.614993 -12806.948327 5 -8879.614993 -12063.614993 6 -3800.448327 -8879.614993 7 -1620.614993 -3800.448327 8 -1581.448327 -1620.614993 9 805.051673 -1581.448327 10 -1998.281660 805.051673 11 439.898130 -1998.281660 12 -1346.349245 439.898130 13 4.984088 -1346.349245 14 2110.650755 4.984088 15 -1254.682579 2110.650755 16 -78.349245 -1254.682579 17 2221.650755 -78.349245 18 2117.817421 2221.650755 19 6611.650755 2117.817421 20 8605.817421 6611.650755 21 10040.317421 8605.817421 22 9805.984088 10040.317421 23 8772.163878 9805.984088 24 1598.916503 8772.163878 25 2972.249836 1598.916503 26 5600.916503 2972.249836 27 3262.583169 5600.916503 28 5447.916503 3262.583169 29 5576.916503 5447.916503 30 5340.083169 5576.916503 31 5676.916503 5340.083169 32 7534.083169 5676.916503 33 8414.583169 7534.083169 34 7826.249836 8414.583169 35 6743.429626 7826.249836 36 -2108.817749 6743.429626 37 -492.484416 -2108.817749 38 630.182251 -492.484416 39 1558.848917 630.182251 40 5890.182251 1558.848917 41 5125.182251 5890.182251 42 1113.348917 5125.182251 43 -1552.817749 1113.348917 44 764.348917 -1552.817749 45 -8035.151083 764.348917 46 -10594.484416 -8035.151083 47 -16821.304626 -10594.484416 48 23178.299869 -16821.304626 49 19718.633202 23178.299869 50 15435.299869 19718.633202 51 16138.966535 15435.299869 52 14038.299869 16138.966535 53 5629.299869 14038.299869 54 6310.466535 5629.299869 55 5157.299869 6310.466535 56 -429.533465 5157.299869 57 544.966535 -429.533465 58 -555.366798 544.966535 59 865.812992 -555.366798 60 -4084.434383 865.812992 61 -6188.101050 -4084.434383 62 -9452.434383 -6188.101050 63 -6898.767717 -9452.434383 64 -13234.434383 -6898.767717 65 -9673.434383 -13234.434383 66 -11081.267717 -9673.434383 67 -14272.434383 -11081.267717 68 -14893.267717 -14272.434383 69 -11769.767717 -14893.267717 70 -4484.101050 -11769.767717 > 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/7z4s81229866146.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/8k8uu1229866146.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/9vhfp1229866146.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/10zu011229866146.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/11frf21229866146.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/12s8wi1229866146.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/13hprd1229866146.tab") > > system("convert tmp/1wwfa1229866146.ps tmp/1wwfa1229866146.png") > system("convert tmp/2xvwm1229866146.ps tmp/2xvwm1229866146.png") > system("convert tmp/3xrh01229866146.ps tmp/3xrh01229866146.png") > system("convert tmp/46dop1229866146.ps tmp/46dop1229866146.png") > system("convert tmp/5npcl1229866146.ps tmp/5npcl1229866146.png") > system("convert tmp/6pxtc1229866146.ps tmp/6pxtc1229866146.png") > system("convert tmp/7z4s81229866146.ps tmp/7z4s81229866146.png") > system("convert tmp/8k8uu1229866146.ps tmp/8k8uu1229866146.png") > system("convert tmp/9vhfp1229866146.ps tmp/9vhfp1229866146.png") > > > proc.time() user system elapsed 1.939 1.395 3.146