R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(56 + ,1901 + ,61 + ,17 + ,21 + ,51 + ,73 + ,2508 + ,74 + ,19 + ,15 + ,45 + ,62 + ,2114 + ,57 + ,18 + ,17 + ,44 + ,42 + ,1331 + ,50 + ,15 + ,20 + ,42 + ,59 + ,1399 + ,48 + ,15 + ,12 + ,38 + ,27 + ,7333 + ,2 + ,12 + ,4 + ,38 + ,78 + ,1507 + ,61 + ,14 + ,12 + ,35 + ,56 + ,1107 + ,36 + ,15 + ,9 + ,34 + ,59 + ,2051 + ,46 + ,13 + ,14 + ,33 + ,51 + ,1138 + ,29 + ,20 + ,11 + ,32 + ,47 + ,1290 + ,30 + ,17 + ,11 + ,32 + ,35 + ,819 + ,49 + ,10 + ,14 + ,31 + ,47 + ,1178 + ,54 + ,16 + ,9 + ,30 + ,47 + ,1451 + ,12 + ,12 + ,7 + ,30 + ,55 + ,1502 + ,14 + ,13 + ,4 + ,30 + ,54 + ,1514 + ,44 + ,15 + ,14 + ,29 + ,60 + ,883 + ,40 + ,15 + ,13 + ,29 + ,55 + ,1405 + ,57 + ,15 + ,11 + ,29 + ,48 + ,927 + ,29 + ,12 + ,9 + ,28 + ,47 + ,1314 + ,28 + ,12 + ,9 + ,27 + ,47 + ,1307 + ,40 + ,15 + ,11 + ,27 + ,52 + ,1352 + ,32 + ,13 + ,8 + ,27 + ,48 + ,1097 + ,19 + ,9 + ,4 + ,26 + ,48 + ,1100 + ,67 + ,12 + ,10 + ,26 + ,27 + ,1316 + ,25 + ,13 + ,10 + ,26 + ,12 + ,1243 + ,54 + ,12 + ,7 + ,26 + ,51 + ,1232 + ,56 + ,12 + ,15 + ,26 + ,58 + ,903 + ,42 + ,16 + ,13 + ,25 + ,60 + ,929 + ,28 + ,15 + ,10 + ,25 + ,46 + ,1049 + ,57 + ,13 + ,10 + ,25 + ,45 + ,1469 + ,35 + ,13 + ,8 + ,24 + ,42 + ,1239 + ,30 + ,12 + ,11 + ,24 + ,41 + ,820 + ,32 + ,15 + ,11 + ,24 + ,47 + ,1462 + ,24 + ,12 + ,10 + ,24 + ,32 + ,1372 + ,28 + ,12 + ,6 + ,24 + ,56 + ,821 + ,10 + ,12 + ,7 + ,24 + ,42 + ,1380 + ,23 + ,8 + ,10 + ,24 + ,41 + ,868 + ,49 + ,15 + ,5 + ,23 + ,47 + ,1228 + ,19 + ,14 + ,5 + ,23 + ,47 + ,707 + ,17 + ,15 + ,5 + ,23 + ,49 + ,1091 + ,33 + ,12 + ,10 + ,23 + ,52 + ,1202 + ,42 + ,12 + ,8 + ,23 + ,42 + ,1106 + ,3 + ,13 + ,2 + ,22 + ,55 + ,1671 + ,37 + ,13 + ,13 + ,22 + ,48 + ,1429 + ,56 + ,12 + ,9 + ,22 + ,48 + ,1579 + ,26 + ,12 + ,7 + ,22 + ,38 + ,1165 + ,30 + ,12 + ,9 + ,22 + ,48 + ,1156 + ,34 + ,13 + ,5 + ,21 + ,50 + ,968 + ,12 + ,9 + ,5 + ,21 + ,39 + ,1374 + ,28 + ,13 + ,10 + ,21 + ,48 + ,934 + ,22 + ,13 + ,7 + ,21 + ,36 + ,774 + ,19 + ,12 + ,5 + ,21 + ,49 + ,1375 + ,35 + ,12 + ,8 + ,21 + ,39 + ,1223 + ,38 + ,12 + ,5 + ,21 + ,41 + ,1111 + ,15 + ,13 + ,7 + ,21 + ,45 + ,804 + ,38 + ,15 + ,10 + ,21 + ,60 + ,962 + ,45 + ,15 + ,10 + ,21 + ,45 + ,613 + ,27 + ,14 + ,9 + ,20 + ,41 + ,1153 + ,35 + ,14 + ,10 + ,20 + ,52 + ,729 + ,23 + ,12 + ,10 + ,20 + ,46 + ,813 + ,51 + ,12 + ,8 + ,20 + ,39 + ,912 + ,23 + ,9 + ,5 + ,20 + ,32 + ,813 + ,33 + ,12 + ,10 + ,20 + ,52 + ,1178 + ,26 + ,14 + ,8 + ,20 + ,54 + ,1199 + ,32 + ,16 + ,6 + ,19 + ,51 + ,1165 + ,35 + ,15 + ,7 + ,19 + ,52 + ,705 + ,18 + ,13 + ,6 + ,18 + ,45 + ,837 + ,56 + ,12 + ,9 + ,17 + ,57 + ,814 + ,18 + ,16 + ,3 + ,17 + ,47 + ,884 + ,39 + ,12 + ,11 + ,17 + ,41 + ,1082 + ,41 + ,12 + ,9 + ,17 + ,27 + ,913 + ,37 + ,10 + ,9 + ,16 + ,43 + ,586 + ,35 + ,12 + ,10 + ,16 + ,31 + ,627 + ,16 + ,10 + ,5 + ,15 + ,32 + ,758 + ,33 + ,12 + ,6 + ,15 + ,41 + ,778 + ,0 + ,12 + ,0 + ,15 + ,40 + ,501 + ,13 + ,13 + ,5 + ,15 + ,46 + ,1009 + ,35 + ,15 + ,10 + ,15 + ,32 + ,547 + ,26 + ,15 + ,7 + ,15 + ,9 + ,848 + ,7 + ,9 + ,6 + ,15 + ,64 + ,849 + ,54 + ,12 + ,8 + ,15 + ,30 + ,480 + ,40 + ,12 + ,10 + ,15 + ,46 + ,719 + ,30 + ,13 + ,7 + ,15 + ,37 + ,847 + ,22 + ,12 + ,6 + ,15 + ,22 + ,634 + ,9 + ,16 + ,5 + ,15 + ,20 + ,714 + ,29 + ,12 + ,6 + ,14 + ,21 + ,871 + ,25 + ,12 + ,4 + ,14 + ,44 + ,815 + ,32 + ,12 + ,7 + ,14 + ,24 + ,811 + ,40 + ,12 + ,5 + ,14 + ,33 + ,776 + ,17 + ,14 + ,3 + ,14 + ,45 + ,642 + ,18 + ,13 + ,0 + ,13 + ,35 + ,562 + ,15 + ,8 + ,5 + ,13 + ,31 + ,626 + ,17 + ,16 + ,5 + ,13 + ,20 + ,528 + ,24 + ,12 + ,8 + ,13 + ,13 + ,636 + ,28 + ,12 + ,5 + ,13 + ,33 + ,935 + ,18 + ,11 + ,5 + ,13 + ,58 + ,473 + ,16 + ,15 + ,6 + ,12 + ,26 + ,566 + ,2 + ,13 + ,0 + ,12 + ,36 + ,929 + ,17 + ,12 + ,6 + ,12 + ,32 + ,656 + ,25 + ,13 + ,4 + ,12 + ,34 + ,765 + ,10 + ,12 + ,8 + ,12 + ,15 + ,835 + ,28 + ,13 + ,5 + ,12 + ,40 + ,479 + ,7 + ,8 + ,3 + ,11 + ,37 + ,567 + ,16 + ,16 + ,3 + ,11 + ,26 + ,558 + ,7 + ,12 + ,2 + ,11 + ,31 + ,582 + ,27 + ,14 + ,8 + ,11 + ,47 + ,607 + ,25 + ,12 + ,3 + ,11 + ,21 + ,705 + ,9 + ,12 + ,2 + ,11 + ,21 + ,433 + ,28 + ,8 + ,3 + ,11 + ,9 + ,507 + ,16 + ,9 + ,2 + ,10 + ,28 + ,488 + ,0 + ,5 + ,1 + ,10 + ,24 + ,394 + ,10 + ,11 + ,2 + ,10 + ,15 + ,504 + ,0 + ,4 + ,1 + ,9 + ,19 + ,368 + ,2 + ,8 + ,2 + ,9 + ,35 + ,386 + ,5 + ,13 + ,7 + ,9 + ,45 + ,580 + ,10 + ,12 + ,1 + ,9 + ,20 + ,510 + ,14 + ,12 + ,3 + ,9 + ,1 + ,565 + ,43 + ,13 + ,6 + ,9 + ,29 + ,451 + ,36 + ,13 + ,4 + ,9 + ,33 + ,495 + ,12 + ,12 + ,2 + ,8 + ,32 + ,412 + ,8 + ,12 + ,2 + ,8 + ,11 + ,596 + ,15 + ,10 + ,3 + ,8 + ,10 + ,446 + ,10 + ,13 + ,4 + ,7 + ,18 + ,338 + ,39 + ,5 + ,5 + ,7 + ,41 + ,418 + ,0 + ,12 + ,0 + ,7 + ,0 + ,349 + ,10 + ,9 + ,3 + ,6 + ,10 + ,335 + ,7 + ,6 + ,0 + ,6 + ,24 + ,308 + ,3 + ,12 + ,2 + ,5 + ,28 + ,228 + ,0 + ,11 + ,1 + ,5 + ,38 + ,455 + ,8 + ,15 + ,0 + ,5 + ,4 + ,428 + ,8 + ,3 + ,3 + ,5 + ,25 + ,244 + ,8 + ,0 + ,4 + ,5 + ,40 + ,242 + ,1 + ,8 + ,0 + ,5 + ,0 + ,352 + ,0 + ,12 + ,0 + ,5 + ,23 + ,269 + ,3 + ,9 + ,1 + ,5 + ,13 + ,213 + ,0 + ,9 + ,0 + ,4 + ,6 + ,242 + ,0 + ,4 + ,0 + ,4 + ,31 + ,291 + ,0 + ,14 + ,2 + ,4 + ,0 + ,135 + ,0 + ,0 + ,1 + ,3 + ,3 + ,210 + ,3 + ,1 + ,3 + ,3 + ,0 + ,231 + ,0 + ,0 + ,0 + ,2 + ,7 + ,225 + ,0 + ,6 + ,0 + ,2 + ,0 + ,340 + ,0 + ,0 + ,0 + ,2 + ,2 + ,44 + ,0 + ,0 + ,0 + ,2 + ,0 + ,126 + ,0 + ,6 + ,0 + ,2 + ,0 + ,141 + ,2 + ,2 + ,0 + ,1 + ,5 + ,25 + ,0 + ,0 + ,0 + ,1 + ,0 + ,104 + ,0 + ,0 + ,0 + ,1 + ,0 + ,11 + ,0 + ,0 + ,0 + ,0) + ,dim=c(6 + ,149) + ,dimnames=list(c('Long_feedback_messages' + ,'Page_views' + ,'Blogs' + ,'Peer_reviews' + ,'Compendium_hours' + ,'RFC_hours') + ,1:149)) > y <- array(NA,dim=c(6,149),dimnames=list(c('Long_feedback_messages','Page_views','Blogs','Peer_reviews','Compendium_hours','RFC_hours'),1:149)) > 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 = 'Do not include Seasonal Dummies' > par1 = '1' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > 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 Long_feedback_messages Page_views Blogs Peer_reviews Compendium_hours 1 56 1901 61 17 21 2 73 2508 74 19 15 3 62 2114 57 18 17 4 42 1331 50 15 20 5 59 1399 48 15 12 6 27 7333 2 12 4 7 78 1507 61 14 12 8 56 1107 36 15 9 9 59 2051 46 13 14 10 51 1138 29 20 11 11 47 1290 30 17 11 12 35 819 49 10 14 13 47 1178 54 16 9 14 47 1451 12 12 7 15 55 1502 14 13 4 16 54 1514 44 15 14 17 60 883 40 15 13 18 55 1405 57 15 11 19 48 927 29 12 9 20 47 1314 28 12 9 21 47 1307 40 15 11 22 52 1352 32 13 8 23 48 1097 19 9 4 24 48 1100 67 12 10 25 27 1316 25 13 10 26 12 1243 54 12 7 27 51 1232 56 12 15 28 58 903 42 16 13 29 60 929 28 15 10 30 46 1049 57 13 10 31 45 1469 35 13 8 32 42 1239 30 12 11 33 41 820 32 15 11 34 47 1462 24 12 10 35 32 1372 28 12 6 36 56 821 10 12 7 37 42 1380 23 8 10 38 41 868 49 15 5 39 47 1228 19 14 5 40 47 707 17 15 5 41 49 1091 33 12 10 42 52 1202 42 12 8 43 42 1106 3 13 2 44 55 1671 37 13 13 45 48 1429 56 12 9 46 48 1579 26 12 7 47 38 1165 30 12 9 48 48 1156 34 13 5 49 50 968 12 9 5 50 39 1374 28 13 10 51 48 934 22 13 7 52 36 774 19 12 5 53 49 1375 35 12 8 54 39 1223 38 12 5 55 41 1111 15 13 7 56 45 804 38 15 10 57 60 962 45 15 10 58 45 613 27 14 9 59 41 1153 35 14 10 60 52 729 23 12 10 61 46 813 51 12 8 62 39 912 23 9 5 63 32 813 33 12 10 64 52 1178 26 14 8 65 54 1199 32 16 6 66 51 1165 35 15 7 67 52 705 18 13 6 68 45 837 56 12 9 69 57 814 18 16 3 70 47 884 39 12 11 71 41 1082 41 12 9 72 27 913 37 10 9 73 43 586 35 12 10 74 31 627 16 10 5 75 32 758 33 12 6 76 41 778 0 12 0 77 40 501 13 13 5 78 46 1009 35 15 10 79 32 547 26 15 7 80 9 848 7 9 6 81 64 849 54 12 8 82 30 480 40 12 10 83 46 719 30 13 7 84 37 847 22 12 6 85 22 634 9 16 5 86 20 714 29 12 6 87 21 871 25 12 4 88 44 815 32 12 7 89 24 811 40 12 5 90 33 776 17 14 3 91 45 642 18 13 0 92 35 562 15 8 5 93 31 626 17 16 5 94 20 528 24 12 8 95 13 636 28 12 5 96 33 935 18 11 5 97 58 473 16 15 6 98 26 566 2 13 0 99 36 929 17 12 6 100 32 656 25 13 4 101 34 765 10 12 8 102 15 835 28 13 5 103 40 479 7 8 3 104 37 567 16 16 3 105 26 558 7 12 2 106 31 582 27 14 8 107 47 607 25 12 3 108 21 705 9 12 2 109 21 433 28 8 3 110 9 507 16 9 2 111 28 488 0 5 1 112 24 394 10 11 2 113 15 504 0 4 1 114 19 368 2 8 2 115 35 386 5 13 7 116 45 580 10 12 1 117 20 510 14 12 3 118 1 565 43 13 6 119 29 451 36 13 4 120 33 495 12 12 2 121 32 412 8 12 2 122 11 596 15 10 3 123 10 446 10 13 4 124 18 338 39 5 5 125 41 418 0 12 0 126 0 349 10 9 3 127 10 335 7 6 0 128 24 308 3 12 2 129 28 228 0 11 1 130 38 455 8 15 0 131 4 428 8 3 3 132 25 244 8 0 4 133 40 242 1 8 0 134 0 352 0 12 0 135 23 269 3 9 1 136 13 213 0 9 0 137 6 242 0 4 0 138 31 291 0 14 2 139 0 135 0 0 1 140 3 210 3 1 3 141 0 231 0 0 0 142 7 225 0 6 0 143 0 340 0 0 0 144 2 44 0 0 0 145 0 126 0 6 0 146 0 141 2 2 0 147 5 25 0 0 0 148 0 104 0 0 0 149 0 11 0 0 0 RFC_hours 1 51 2 45 3 44 4 42 5 38 6 38 7 35 8 34 9 33 10 32 11 32 12 31 13 30 14 30 15 30 16 29 17 29 18 29 19 28 20 27 21 27 22 27 23 26 24 26 25 26 26 26 27 26 28 25 29 25 30 25 31 24 32 24 33 24 34 24 35 24 36 24 37 24 38 23 39 23 40 23 41 23 42 23 43 22 44 22 45 22 46 22 47 22 48 21 49 21 50 21 51 21 52 21 53 21 54 21 55 21 56 21 57 21 58 20 59 20 60 20 61 20 62 20 63 20 64 20 65 19 66 19 67 18 68 17 69 17 70 17 71 17 72 16 73 16 74 15 75 15 76 15 77 15 78 15 79 15 80 15 81 15 82 15 83 15 84 15 85 15 86 14 87 14 88 14 89 14 90 14 91 13 92 13 93 13 94 13 95 13 96 13 97 12 98 12 99 12 100 12 101 12 102 12 103 11 104 11 105 11 106 11 107 11 108 11 109 11 110 10 111 10 112 10 113 9 114 9 115 9 116 9 117 9 118 9 119 9 120 8 121 8 122 8 123 7 124 7 125 7 126 6 127 6 128 5 129 5 130 5 131 5 132 5 133 5 134 5 135 5 136 4 137 4 138 4 139 3 140 3 141 2 142 2 143 2 144 2 145 2 146 1 147 1 148 1 149 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Page_views Blogs Peer_reviews 1.655620 -0.003048 0.061678 1.595503 Compendium_hours RFC_hours -0.048627 0.986249 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -33.646 -6.113 0.331 6.954 28.051 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.655620 2.649415 0.625 0.533 Page_views -0.003048 0.001864 -1.635 0.104 Blogs 0.061678 0.087419 0.706 0.482 Peer_reviews 1.595503 0.284997 5.598 1.07e-07 *** Compendium_hours -0.048627 0.448099 -0.109 0.914 RFC_hours 0.986249 0.216226 4.561 1.08e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 10.74 on 143 degrees of freedom Multiple R-squared: 0.6445, Adjusted R-squared: 0.6321 F-statistic: 51.85 on 5 and 143 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.161132306 0.322264613 0.838867694 [2,] 0.082939319 0.165878638 0.917060681 [3,] 0.038652592 0.077305185 0.961347408 [4,] 0.325490396 0.650980791 0.674509604 [5,] 0.654723038 0.690553923 0.345276962 [6,] 0.623874202 0.752251595 0.376125798 [7,] 0.540737902 0.918524196 0.459262098 [8,] 0.515135381 0.969729238 0.484864619 [9,] 0.504769781 0.990460438 0.495230219 [10,] 0.438837238 0.877674477 0.561162762 [11,] 0.355028857 0.710057715 0.644971143 [12,] 0.279999350 0.559998701 0.720000650 [13,] 0.225867975 0.451735951 0.774132025 [14,] 0.171125896 0.342251792 0.828874104 [15,] 0.126089636 0.252179272 0.873910364 [16,] 0.138762658 0.277525316 0.861237342 [17,] 0.224812929 0.449625859 0.775187071 [18,] 0.928310997 0.143378006 0.071689003 [19,] 0.918331926 0.163336148 0.081668074 [20,] 0.906870135 0.186259730 0.093129865 [21,] 0.904311102 0.191377796 0.095688898 [22,] 0.877298139 0.245403723 0.122701861 [23,] 0.844214776 0.311570448 0.155785224 [24,] 0.808016837 0.383966326 0.191983163 [25,] 0.792779750 0.414440500 0.207220250 [26,] 0.758589348 0.482821303 0.241410652 [27,] 0.775292539 0.449414921 0.224707461 [28,] 0.781867583 0.436264835 0.218132417 [29,] 0.746042238 0.507915523 0.253957762 [30,] 0.729719499 0.540561002 0.270280501 [31,] 0.683150893 0.633698214 0.316849107 [32,] 0.635415799 0.729168402 0.364584201 [33,] 0.592133466 0.815733067 0.407866534 [34,] 0.564239504 0.871520991 0.435760496 [35,] 0.516052629 0.967894743 0.483947371 [36,] 0.513299363 0.973401274 0.486700637 [37,] 0.464666344 0.929332687 0.535333656 [38,] 0.422329739 0.844659477 0.577670261 [39,] 0.393213387 0.786426775 0.606786613 [40,] 0.347112945 0.694225890 0.652887055 [41,] 0.341106274 0.682212547 0.658893726 [42,] 0.308307590 0.616615181 0.691692410 [43,] 0.266054966 0.532109932 0.733945034 [44,] 0.255091171 0.510182342 0.744908829 [45,] 0.225909981 0.451819963 0.774090019 [46,] 0.197635405 0.395270810 0.802364595 [47,] 0.169058116 0.338116233 0.830941884 [48,] 0.143068244 0.286136487 0.856931756 [49,] 0.148712293 0.297424585 0.851287707 [50,] 0.122703146 0.245406291 0.877296854 [51,] 0.104315651 0.208631302 0.895684349 [52,] 0.093943603 0.187887205 0.906056397 [53,] 0.074730743 0.149461486 0.925269257 [54,] 0.058855428 0.117710855 0.941144572 [55,] 0.067358535 0.134717071 0.932641465 [56,] 0.058123168 0.116246335 0.941876832 [57,] 0.050578543 0.101157086 0.949421457 [58,] 0.041491641 0.082983283 0.958508359 [59,] 0.037299378 0.074598757 0.962700622 [60,] 0.029654093 0.059308186 0.970345907 [61,] 0.030126488 0.060252975 0.969873512 [62,] 0.025568545 0.051137089 0.974431455 [63,] 0.020240827 0.040481654 0.979759173 [64,] 0.021304928 0.042609856 0.978695072 [65,] 0.016644392 0.033288784 0.983355608 [66,] 0.013908636 0.027817273 0.986091364 [67,] 0.012489347 0.024978694 0.987510653 [68,] 0.009409997 0.018819993 0.990590003 [69,] 0.007012641 0.014025282 0.992987359 [70,] 0.005825321 0.011650642 0.994174679 [71,] 0.006850138 0.013700277 0.993149862 [72,] 0.026620212 0.053240424 0.973379788 [73,] 0.128987246 0.257974492 0.871012754 [74,] 0.123664790 0.247329580 0.876335210 [75,] 0.118077190 0.236154380 0.881922810 [76,] 0.098715318 0.197430636 0.901284682 [77,] 0.208702373 0.417404745 0.791297627 [78,] 0.257898273 0.515796546 0.742101727 [79,] 0.287345462 0.574690923 0.712654538 [80,] 0.300663829 0.601327658 0.699336171 [81,] 0.302269178 0.604538357 0.697730822 [82,] 0.270519285 0.541038571 0.729480715 [83,] 0.263184324 0.526368647 0.736815676 [84,] 0.232792227 0.465584454 0.767207773 [85,] 0.223095610 0.446191220 0.776904390 [86,] 0.269889415 0.539778830 0.730110585 [87,] 0.400491337 0.800982675 0.599508663 [88,] 0.362952626 0.725905253 0.637047374 [89,] 0.460206706 0.920413411 0.539793294 [90,] 0.468211715 0.936423430 0.531788285 [91,] 0.460335870 0.920671740 0.539664130 [92,] 0.414905074 0.829810147 0.585094926 [93,] 0.378866926 0.757733853 0.621133074 [94,] 0.415140422 0.830280845 0.584859578 [95,] 0.423333842 0.846667684 0.576666158 [96,] 0.372757304 0.745514608 0.627242696 [97,] 0.342129678 0.684259356 0.657870322 [98,] 0.302925678 0.605851356 0.697074322 [99,] 0.414537373 0.829074746 0.585462627 [100,] 0.393759764 0.787519528 0.606240236 [101,] 0.353995464 0.707990927 0.646004536 [102,] 0.437465206 0.874930413 0.562534794 [103,] 0.388370121 0.776740243 0.611629879 [104,] 0.372378900 0.744757800 0.627621100 [105,] 0.343865619 0.687731238 0.656134381 [106,] 0.378710554 0.757421108 0.621289446 [107,] 0.332464447 0.664928895 0.667535553 [108,] 0.383105397 0.766210795 0.616894603 [109,] 0.362264188 0.724528377 0.637735812 [110,] 0.537803814 0.924392372 0.462196186 [111,] 0.476196185 0.952392370 0.523803815 [112,] 0.432655044 0.865310088 0.567344956 [113,] 0.373687158 0.747374315 0.626312842 [114,] 0.361811478 0.723622955 0.638188522 [115,] 0.443214809 0.886429618 0.556785191 [116,] 0.383482510 0.766965020 0.616517490 [117,] 0.419609997 0.839219995 0.580390003 [118,] 0.750357147 0.499285705 0.249642853 [119,] 0.779044072 0.441911855 0.220955928 [120,] 0.717701229 0.564597541 0.282298771 [121,] 0.658198794 0.683602412 0.341801206 [122,] 0.636209269 0.727581462 0.363790731 [123,] 0.647634331 0.704731337 0.352365669 [124,] 0.577744116 0.844511767 0.422255884 [125,] 0.942985645 0.114028709 0.057014355 [126,] 0.995133220 0.009733559 0.004866780 [127,] 0.997225157 0.005549686 0.002774843 [128,] 0.992398317 0.015203367 0.007601683 [129,] 0.982052616 0.035894768 0.017947384 [130,] 0.995262711 0.009474578 0.004737289 [131,] 0.985413742 0.029172517 0.014586258 [132,] 0.947675834 0.104648331 0.052324166 > postscript(file="/var/wessaorg/rcomp/tmp/125tv1352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/2x3ni1352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/3hb071352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/4fucs1352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/5zk551352045343.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 149 Frequency = 1 1 2 3 4 5 6 -20.02475827 0.45831882 -8.01507589 -23.06506167 -2.17845379 -8.85665104 7 8 9 10 11 12 20.90316849 -1.52922711 8.15173404 -11.91075240 -10.72261910 -13.02948689 13 14 15 16 17 18 -9.07353024 0.63383122 6.92454246 2.39228093 6.66705007 2.11234680 19 20 21 22 23 24 1.05787627 2.28539773 -3.16533296 5.51038105 8.70870072 1.26253975 25 26 27 28 29 30 -18.08409842 -33.64565210 5.58647564 6.95414863 11.34651644 -0.88538167 31 32 33 34 35 36 1.64071544 -0.01056134 -7.19755780 5.99059593 -9.72494764 13.75441395 37 38 39 40 41 42 7.18434572 -7.40529220 3.13785494 0.07767643 7.29091568 9.97689136 43 44 45 46 47 48 1.18871763 14.34869577 6.84017818 9.05047956 -2.36087148 6.56122312 49 50 51 52 53 54 15.72712331 -1.16110027 6.72194905 -4.08245397 9.90844965 -0.88576795 55 56 57 58 59 60 0.69320103 -0.70627493 14.34356863 1.92313448 -0.87571989 12.76305314 61 62 63 64 65 66 5.19484476 4.86422117 -7.59769349 10.65833236 10.05026219 8.40572329 67 68 69 70 71 72 13.18078057 6.96698093 14.56687858 10.25602260 4.63892610 -5.45222582 73 74 75 76 77 78 6.53204044 -0.23698090 -3.02859621 7.77598751 3.77749150 7.02110480 79 80 81 82 83 84 -7.97786814 -19.36412894 28.05078588 -6.11319450 9.49068850 2.92114071 85 86 87 88 89 90 -18.35691382 -13.92974799 -12.30174488 10.24169653 -10.36117487 -3.33751553 91 92 93 94 95 96 10.62824029 8.79007849 -7.90222573 -13.10479093 -20.16819471 2.95545653 97 98 99 100 101 102 21.32348010 -6.63030994 5.43821951 -1.58007921 3.46734086 -18.17088707 103 104 105 106 107 108 15.90576197 -0.14513692 -4.28408031 -3.34373837 15.80369200 -8.95937399 109 110 111 112 113 114 -4.52969149 -16.22187720 10.04044672 -4.38724260 -0.32903246 -3.20030803 115 116 117 118 119 120 4.93514084 16.52181384 -8.84100923 -30.91165908 -2.92464178 5.17424923 121 122 123 124 125 126 4.16797439 -13.46330058 -18.36374894 0.33104198 14.56868475 -21.33977545 127 128 129 130 131 132 -6.55678461 -0.88188344 4.60618385 8.37402642 -6.41635702 18.85793755 133 134 135 136 137 138 21.32506016 -24.65998782 2.73712467 -6.31090852 -5.24500100 4.04657811 139 140 141 142 143 144 -4.15425478 -2.60893571 -2.92401968 -5.51532497 -2.59178262 -1.49400436 145 146 147 148 149 -12.81708157 -5.52645679 2.43433201 -2.32487233 -1.62209140 > postscript(file="/var/wessaorg/rcomp/tmp/6ujng1352045343.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 149 Frequency = 1 lag(myerror, k = 1) myerror 0 -20.02475827 NA 1 0.45831882 -20.02475827 2 -8.01507589 0.45831882 3 -23.06506167 -8.01507589 4 -2.17845379 -23.06506167 5 -8.85665104 -2.17845379 6 20.90316849 -8.85665104 7 -1.52922711 20.90316849 8 8.15173404 -1.52922711 9 -11.91075240 8.15173404 10 -10.72261910 -11.91075240 11 -13.02948689 -10.72261910 12 -9.07353024 -13.02948689 13 0.63383122 -9.07353024 14 6.92454246 0.63383122 15 2.39228093 6.92454246 16 6.66705007 2.39228093 17 2.11234680 6.66705007 18 1.05787627 2.11234680 19 2.28539773 1.05787627 20 -3.16533296 2.28539773 21 5.51038105 -3.16533296 22 8.70870072 5.51038105 23 1.26253975 8.70870072 24 -18.08409842 1.26253975 25 -33.64565210 -18.08409842 26 5.58647564 -33.64565210 27 6.95414863 5.58647564 28 11.34651644 6.95414863 29 -0.88538167 11.34651644 30 1.64071544 -0.88538167 31 -0.01056134 1.64071544 32 -7.19755780 -0.01056134 33 5.99059593 -7.19755780 34 -9.72494764 5.99059593 35 13.75441395 -9.72494764 36 7.18434572 13.75441395 37 -7.40529220 7.18434572 38 3.13785494 -7.40529220 39 0.07767643 3.13785494 40 7.29091568 0.07767643 41 9.97689136 7.29091568 42 1.18871763 9.97689136 43 14.34869577 1.18871763 44 6.84017818 14.34869577 45 9.05047956 6.84017818 46 -2.36087148 9.05047956 47 6.56122312 -2.36087148 48 15.72712331 6.56122312 49 -1.16110027 15.72712331 50 6.72194905 -1.16110027 51 -4.08245397 6.72194905 52 9.90844965 -4.08245397 53 -0.88576795 9.90844965 54 0.69320103 -0.88576795 55 -0.70627493 0.69320103 56 14.34356863 -0.70627493 57 1.92313448 14.34356863 58 -0.87571989 1.92313448 59 12.76305314 -0.87571989 60 5.19484476 12.76305314 61 4.86422117 5.19484476 62 -7.59769349 4.86422117 63 10.65833236 -7.59769349 64 10.05026219 10.65833236 65 8.40572329 10.05026219 66 13.18078057 8.40572329 67 6.96698093 13.18078057 68 14.56687858 6.96698093 69 10.25602260 14.56687858 70 4.63892610 10.25602260 71 -5.45222582 4.63892610 72 6.53204044 -5.45222582 73 -0.23698090 6.53204044 74 -3.02859621 -0.23698090 75 7.77598751 -3.02859621 76 3.77749150 7.77598751 77 7.02110480 3.77749150 78 -7.97786814 7.02110480 79 -19.36412894 -7.97786814 80 28.05078588 -19.36412894 81 -6.11319450 28.05078588 82 9.49068850 -6.11319450 83 2.92114071 9.49068850 84 -18.35691382 2.92114071 85 -13.92974799 -18.35691382 86 -12.30174488 -13.92974799 87 10.24169653 -12.30174488 88 -10.36117487 10.24169653 89 -3.33751553 -10.36117487 90 10.62824029 -3.33751553 91 8.79007849 10.62824029 92 -7.90222573 8.79007849 93 -13.10479093 -7.90222573 94 -20.16819471 -13.10479093 95 2.95545653 -20.16819471 96 21.32348010 2.95545653 97 -6.63030994 21.32348010 98 5.43821951 -6.63030994 99 -1.58007921 5.43821951 100 3.46734086 -1.58007921 101 -18.17088707 3.46734086 102 15.90576197 -18.17088707 103 -0.14513692 15.90576197 104 -4.28408031 -0.14513692 105 -3.34373837 -4.28408031 106 15.80369200 -3.34373837 107 -8.95937399 15.80369200 108 -4.52969149 -8.95937399 109 -16.22187720 -4.52969149 110 10.04044672 -16.22187720 111 -4.38724260 10.04044672 112 -0.32903246 -4.38724260 113 -3.20030803 -0.32903246 114 4.93514084 -3.20030803 115 16.52181384 4.93514084 116 -8.84100923 16.52181384 117 -30.91165908 -8.84100923 118 -2.92464178 -30.91165908 119 5.17424923 -2.92464178 120 4.16797439 5.17424923 121 -13.46330058 4.16797439 122 -18.36374894 -13.46330058 123 0.33104198 -18.36374894 124 14.56868475 0.33104198 125 -21.33977545 14.56868475 126 -6.55678461 -21.33977545 127 -0.88188344 -6.55678461 128 4.60618385 -0.88188344 129 8.37402642 4.60618385 130 -6.41635702 8.37402642 131 18.85793755 -6.41635702 132 21.32506016 18.85793755 133 -24.65998782 21.32506016 134 2.73712467 -24.65998782 135 -6.31090852 2.73712467 136 -5.24500100 -6.31090852 137 4.04657811 -5.24500100 138 -4.15425478 4.04657811 139 -2.60893571 -4.15425478 140 -2.92401968 -2.60893571 141 -5.51532497 -2.92401968 142 -2.59178262 -5.51532497 143 -1.49400436 -2.59178262 144 -12.81708157 -1.49400436 145 -5.52645679 -12.81708157 146 2.43433201 -5.52645679 147 -2.32487233 2.43433201 148 -1.62209140 -2.32487233 149 NA -1.62209140 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.45831882 -20.02475827 [2,] -8.01507589 0.45831882 [3,] -23.06506167 -8.01507589 [4,] -2.17845379 -23.06506167 [5,] -8.85665104 -2.17845379 [6,] 20.90316849 -8.85665104 [7,] -1.52922711 20.90316849 [8,] 8.15173404 -1.52922711 [9,] -11.91075240 8.15173404 [10,] -10.72261910 -11.91075240 [11,] -13.02948689 -10.72261910 [12,] -9.07353024 -13.02948689 [13,] 0.63383122 -9.07353024 [14,] 6.92454246 0.63383122 [15,] 2.39228093 6.92454246 [16,] 6.66705007 2.39228093 [17,] 2.11234680 6.66705007 [18,] 1.05787627 2.11234680 [19,] 2.28539773 1.05787627 [20,] -3.16533296 2.28539773 [21,] 5.51038105 -3.16533296 [22,] 8.70870072 5.51038105 [23,] 1.26253975 8.70870072 [24,] -18.08409842 1.26253975 [25,] -33.64565210 -18.08409842 [26,] 5.58647564 -33.64565210 [27,] 6.95414863 5.58647564 [28,] 11.34651644 6.95414863 [29,] -0.88538167 11.34651644 [30,] 1.64071544 -0.88538167 [31,] -0.01056134 1.64071544 [32,] -7.19755780 -0.01056134 [33,] 5.99059593 -7.19755780 [34,] -9.72494764 5.99059593 [35,] 13.75441395 -9.72494764 [36,] 7.18434572 13.75441395 [37,] -7.40529220 7.18434572 [38,] 3.13785494 -7.40529220 [39,] 0.07767643 3.13785494 [40,] 7.29091568 0.07767643 [41,] 9.97689136 7.29091568 [42,] 1.18871763 9.97689136 [43,] 14.34869577 1.18871763 [44,] 6.84017818 14.34869577 [45,] 9.05047956 6.84017818 [46,] -2.36087148 9.05047956 [47,] 6.56122312 -2.36087148 [48,] 15.72712331 6.56122312 [49,] -1.16110027 15.72712331 [50,] 6.72194905 -1.16110027 [51,] -4.08245397 6.72194905 [52,] 9.90844965 -4.08245397 [53,] -0.88576795 9.90844965 [54,] 0.69320103 -0.88576795 [55,] -0.70627493 0.69320103 [56,] 14.34356863 -0.70627493 [57,] 1.92313448 14.34356863 [58,] -0.87571989 1.92313448 [59,] 12.76305314 -0.87571989 [60,] 5.19484476 12.76305314 [61,] 4.86422117 5.19484476 [62,] -7.59769349 4.86422117 [63,] 10.65833236 -7.59769349 [64,] 10.05026219 10.65833236 [65,] 8.40572329 10.05026219 [66,] 13.18078057 8.40572329 [67,] 6.96698093 13.18078057 [68,] 14.56687858 6.96698093 [69,] 10.25602260 14.56687858 [70,] 4.63892610 10.25602260 [71,] -5.45222582 4.63892610 [72,] 6.53204044 -5.45222582 [73,] -0.23698090 6.53204044 [74,] -3.02859621 -0.23698090 [75,] 7.77598751 -3.02859621 [76,] 3.77749150 7.77598751 [77,] 7.02110480 3.77749150 [78,] -7.97786814 7.02110480 [79,] -19.36412894 -7.97786814 [80,] 28.05078588 -19.36412894 [81,] -6.11319450 28.05078588 [82,] 9.49068850 -6.11319450 [83,] 2.92114071 9.49068850 [84,] -18.35691382 2.92114071 [85,] -13.92974799 -18.35691382 [86,] -12.30174488 -13.92974799 [87,] 10.24169653 -12.30174488 [88,] -10.36117487 10.24169653 [89,] -3.33751553 -10.36117487 [90,] 10.62824029 -3.33751553 [91,] 8.79007849 10.62824029 [92,] -7.90222573 8.79007849 [93,] -13.10479093 -7.90222573 [94,] -20.16819471 -13.10479093 [95,] 2.95545653 -20.16819471 [96,] 21.32348010 2.95545653 [97,] -6.63030994 21.32348010 [98,] 5.43821951 -6.63030994 [99,] -1.58007921 5.43821951 [100,] 3.46734086 -1.58007921 [101,] -18.17088707 3.46734086 [102,] 15.90576197 -18.17088707 [103,] -0.14513692 15.90576197 [104,] -4.28408031 -0.14513692 [105,] -3.34373837 -4.28408031 [106,] 15.80369200 -3.34373837 [107,] -8.95937399 15.80369200 [108,] -4.52969149 -8.95937399 [109,] -16.22187720 -4.52969149 [110,] 10.04044672 -16.22187720 [111,] -4.38724260 10.04044672 [112,] -0.32903246 -4.38724260 [113,] -3.20030803 -0.32903246 [114,] 4.93514084 -3.20030803 [115,] 16.52181384 4.93514084 [116,] -8.84100923 16.52181384 [117,] -30.91165908 -8.84100923 [118,] -2.92464178 -30.91165908 [119,] 5.17424923 -2.92464178 [120,] 4.16797439 5.17424923 [121,] -13.46330058 4.16797439 [122,] -18.36374894 -13.46330058 [123,] 0.33104198 -18.36374894 [124,] 14.56868475 0.33104198 [125,] -21.33977545 14.56868475 [126,] -6.55678461 -21.33977545 [127,] -0.88188344 -6.55678461 [128,] 4.60618385 -0.88188344 [129,] 8.37402642 4.60618385 [130,] -6.41635702 8.37402642 [131,] 18.85793755 -6.41635702 [132,] 21.32506016 18.85793755 [133,] -24.65998782 21.32506016 [134,] 2.73712467 -24.65998782 [135,] -6.31090852 2.73712467 [136,] -5.24500100 -6.31090852 [137,] 4.04657811 -5.24500100 [138,] -4.15425478 4.04657811 [139,] -2.60893571 -4.15425478 [140,] -2.92401968 -2.60893571 [141,] -5.51532497 -2.92401968 [142,] -2.59178262 -5.51532497 [143,] -1.49400436 -2.59178262 [144,] -12.81708157 -1.49400436 [145,] -5.52645679 -12.81708157 [146,] 2.43433201 -5.52645679 [147,] -2.32487233 2.43433201 [148,] -1.62209140 -2.32487233 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.45831882 -20.02475827 2 -8.01507589 0.45831882 3 -23.06506167 -8.01507589 4 -2.17845379 -23.06506167 5 -8.85665104 -2.17845379 6 20.90316849 -8.85665104 7 -1.52922711 20.90316849 8 8.15173404 -1.52922711 9 -11.91075240 8.15173404 10 -10.72261910 -11.91075240 11 -13.02948689 -10.72261910 12 -9.07353024 -13.02948689 13 0.63383122 -9.07353024 14 6.92454246 0.63383122 15 2.39228093 6.92454246 16 6.66705007 2.39228093 17 2.11234680 6.66705007 18 1.05787627 2.11234680 19 2.28539773 1.05787627 20 -3.16533296 2.28539773 21 5.51038105 -3.16533296 22 8.70870072 5.51038105 23 1.26253975 8.70870072 24 -18.08409842 1.26253975 25 -33.64565210 -18.08409842 26 5.58647564 -33.64565210 27 6.95414863 5.58647564 28 11.34651644 6.95414863 29 -0.88538167 11.34651644 30 1.64071544 -0.88538167 31 -0.01056134 1.64071544 32 -7.19755780 -0.01056134 33 5.99059593 -7.19755780 34 -9.72494764 5.99059593 35 13.75441395 -9.72494764 36 7.18434572 13.75441395 37 -7.40529220 7.18434572 38 3.13785494 -7.40529220 39 0.07767643 3.13785494 40 7.29091568 0.07767643 41 9.97689136 7.29091568 42 1.18871763 9.97689136 43 14.34869577 1.18871763 44 6.84017818 14.34869577 45 9.05047956 6.84017818 46 -2.36087148 9.05047956 47 6.56122312 -2.36087148 48 15.72712331 6.56122312 49 -1.16110027 15.72712331 50 6.72194905 -1.16110027 51 -4.08245397 6.72194905 52 9.90844965 -4.08245397 53 -0.88576795 9.90844965 54 0.69320103 -0.88576795 55 -0.70627493 0.69320103 56 14.34356863 -0.70627493 57 1.92313448 14.34356863 58 -0.87571989 1.92313448 59 12.76305314 -0.87571989 60 5.19484476 12.76305314 61 4.86422117 5.19484476 62 -7.59769349 4.86422117 63 10.65833236 -7.59769349 64 10.05026219 10.65833236 65 8.40572329 10.05026219 66 13.18078057 8.40572329 67 6.96698093 13.18078057 68 14.56687858 6.96698093 69 10.25602260 14.56687858 70 4.63892610 10.25602260 71 -5.45222582 4.63892610 72 6.53204044 -5.45222582 73 -0.23698090 6.53204044 74 -3.02859621 -0.23698090 75 7.77598751 -3.02859621 76 3.77749150 7.77598751 77 7.02110480 3.77749150 78 -7.97786814 7.02110480 79 -19.36412894 -7.97786814 80 28.05078588 -19.36412894 81 -6.11319450 28.05078588 82 9.49068850 -6.11319450 83 2.92114071 9.49068850 84 -18.35691382 2.92114071 85 -13.92974799 -18.35691382 86 -12.30174488 -13.92974799 87 10.24169653 -12.30174488 88 -10.36117487 10.24169653 89 -3.33751553 -10.36117487 90 10.62824029 -3.33751553 91 8.79007849 10.62824029 92 -7.90222573 8.79007849 93 -13.10479093 -7.90222573 94 -20.16819471 -13.10479093 95 2.95545653 -20.16819471 96 21.32348010 2.95545653 97 -6.63030994 21.32348010 98 5.43821951 -6.63030994 99 -1.58007921 5.43821951 100 3.46734086 -1.58007921 101 -18.17088707 3.46734086 102 15.90576197 -18.17088707 103 -0.14513692 15.90576197 104 -4.28408031 -0.14513692 105 -3.34373837 -4.28408031 106 15.80369200 -3.34373837 107 -8.95937399 15.80369200 108 -4.52969149 -8.95937399 109 -16.22187720 -4.52969149 110 10.04044672 -16.22187720 111 -4.38724260 10.04044672 112 -0.32903246 -4.38724260 113 -3.20030803 -0.32903246 114 4.93514084 -3.20030803 115 16.52181384 4.93514084 116 -8.84100923 16.52181384 117 -30.91165908 -8.84100923 118 -2.92464178 -30.91165908 119 5.17424923 -2.92464178 120 4.16797439 5.17424923 121 -13.46330058 4.16797439 122 -18.36374894 -13.46330058 123 0.33104198 -18.36374894 124 14.56868475 0.33104198 125 -21.33977545 14.56868475 126 -6.55678461 -21.33977545 127 -0.88188344 -6.55678461 128 4.60618385 -0.88188344 129 8.37402642 4.60618385 130 -6.41635702 8.37402642 131 18.85793755 -6.41635702 132 21.32506016 18.85793755 133 -24.65998782 21.32506016 134 2.73712467 -24.65998782 135 -6.31090852 2.73712467 136 -5.24500100 -6.31090852 137 4.04657811 -5.24500100 138 -4.15425478 4.04657811 139 -2.60893571 -4.15425478 140 -2.92401968 -2.60893571 141 -5.51532497 -2.92401968 142 -2.59178262 -5.51532497 143 -1.49400436 -2.59178262 144 -12.81708157 -1.49400436 145 -5.52645679 -12.81708157 146 2.43433201 -5.52645679 147 -2.32487233 2.43433201 148 -1.62209140 -2.32487233 > 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/wessaorg/rcomp/tmp/76z231352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/8ah2t1352045343.ps",horizontal=F,onefile=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/wessaorg/rcomp/tmp/9ca6q1352045343.ps",horizontal=F,onefile=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 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10afc01352045343.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11iek01352045344.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/wessaorg/rcomp/tmp/1225m11352045344.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/wessaorg/rcomp/tmp/13aemb1352045344.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/wessaorg/rcomp/tmp/14m1971352045344.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15imi91352045344.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16cx1d1352045344.tab") + } > > try(system("convert tmp/125tv1352045343.ps tmp/125tv1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/2x3ni1352045343.ps tmp/2x3ni1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/3hb071352045343.ps tmp/3hb071352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/4fucs1352045343.ps tmp/4fucs1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/5zk551352045343.ps tmp/5zk551352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/6ujng1352045343.ps tmp/6ujng1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/76z231352045343.ps tmp/76z231352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/8ah2t1352045343.ps tmp/8ah2t1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/9ca6q1352045343.ps tmp/9ca6q1352045343.png",intern=TRUE)) character(0) > try(system("convert tmp/10afc01352045343.ps tmp/10afc01352045343.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 11.282 1.672 12.999