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(210907 + ,56 + ,145 + ,30 + ,120982 + ,56 + ,101 + ,28 + ,176508 + ,54 + ,98 + ,38 + ,179321 + ,89 + ,132 + ,30 + ,123185 + ,40 + ,60 + ,22 + ,52746 + ,25 + ,38 + ,26 + ,385534 + ,92 + ,144 + ,25 + ,33170 + ,18 + ,5 + ,18 + ,149061 + ,44 + ,84 + ,26 + ,165446 + ,33 + ,79 + ,25 + ,237213 + ,84 + ,127 + ,38 + ,173326 + ,88 + ,78 + ,44 + ,133131 + ,55 + ,60 + ,30 + ,258873 + ,60 + ,131 + ,40 + ,180083 + ,66 + ,84 + ,34 + ,324799 + ,154 + ,133 + ,47 + ,230964 + ,53 + ,150 + ,30 + ,236785 + ,119 + ,91 + ,31 + ,135473 + ,41 + ,132 + ,23 + ,202925 + ,61 + ,136 + ,36 + ,215147 + ,58 + ,124 + ,36 + ,344297 + ,75 + ,118 + ,30 + ,153935 + ,33 + ,70 + ,25 + ,132943 + ,40 + ,107 + ,39 + ,174724 + ,92 + ,119 + ,34 + ,174415 + ,100 + ,89 + ,31 + ,225548 + ,112 + ,112 + ,31 + ,223632 + ,73 + ,108 + ,33 + ,124817 + ,40 + ,52 + ,25 + ,221698 + ,45 + ,112 + ,33 + ,210767 + ,60 + ,116 + ,35 + ,170266 + ,62 + ,123 + ,42 + ,260561 + ,75 + ,125 + ,43 + ,84853 + ,31 + ,27 + ,30 + ,294424 + ,77 + ,162 + ,33 + ,215641 + ,46 + ,64 + ,32 + ,325107 + ,99 + ,92 + ,36 + ,167542 + ,66 + ,83 + ,28 + ,106408 + ,30 + ,41 + ,14 + ,265769 + ,146 + ,120 + ,32 + ,269651 + ,67 + ,105 + ,30 + ,149112 + ,56 + ,79 + ,35 + ,152871 + ,58 + ,70 + ,28 + ,111665 + ,34 + ,55 + ,28 + ,116408 + ,61 + ,39 + ,39 + ,362301 + ,119 + ,67 + ,34 + ,78800 + ,42 + ,21 + ,26 + ,183167 + ,66 + ,127 + ,39 + ,277965 + ,89 + ,152 + ,39 + ,150629 + ,44 + ,113 + ,33 + ,168809 + ,66 + ,99 + ,28 + ,24188 + ,24 + ,7 + ,4 + ,329267 + ,259 + ,141 + ,39 + ,65029 + ,17 + ,21 + ,18 + ,101097 + ,64 + ,35 + ,14 + ,218946 + ,41 + ,109 + ,29 + ,244052 + ,68 + ,133 + ,44 + ,233328 + ,132 + ,230 + ,28 + ,256462 + ,105 + ,166 + ,35 + ,206161 + ,71 + ,68 + ,28 + ,311473 + ,112 + ,147 + ,38 + ,235800 + ,94 + ,179 + ,23 + ,177939 + ,82 + ,61 + ,36 + ,207176 + ,70 + ,101 + ,32 + ,196553 + ,57 + ,108 + ,29 + ,174184 + ,53 + ,90 + ,25 + ,143246 + ,103 + ,114 + ,27 + ,187559 + ,121 + ,103 + ,36 + ,187681 + ,62 + ,142 + ,28 + ,119016 + ,52 + ,79 + ,23 + ,182192 + ,52 + ,88 + ,40 + ,73566 + ,32 + ,25 + ,23 + ,194979 + ,62 + ,83 + ,40 + ,167488 + ,45 + ,113 + ,28 + ,143756 + ,46 + ,118 + ,34 + ,275541 + ,63 + ,110 + ,33 + ,243199 + ,75 + ,129 + ,28 + ,182999 + ,88 + ,51 + ,34 + ,135649 + ,46 + ,93 + ,30 + ,152299 + ,53 + ,76 + ,33 + ,120221 + ,37 + ,49 + ,22 + ,346485 + ,90 + ,118 + ,38 + ,145790 + ,63 + ,38 + ,26 + ,193339 + ,78 + ,141 + ,35 + ,80953 + ,25 + ,58 + ,8 + ,122774 + ,45 + ,27 + ,24 + ,130585 + ,46 + ,91 + ,29 + ,286468 + ,144 + ,63 + ,29 + ,241066 + ,82 + ,56 + ,45 + ,148446 + ,91 + ,144 + ,37 + ,204713 + ,71 + ,73 + ,33 + ,182079 + ,63 + ,168 + ,33 + ,140344 + ,53 + ,64 + ,25 + ,220516 + ,62 + ,97 + ,32 + ,243060 + ,63 + ,117 + ,29 + ,162765 + ,32 + ,100 + ,28 + ,182613 + ,39 + ,149 + ,28 + ,232138 + ,62 + ,187 + ,31 + ,265318 + ,117 + ,127 + ,52 + ,310839 + ,92 + ,245 + ,24 + ,225060 + ,93 + ,87 + ,41 + ,232317 + ,54 + ,177 + ,33 + ,144966 + ,144 + ,49 + ,32 + ,43287 + ,14 + ,49 + ,19 + ,155754 + ,61 + ,73 + ,20 + ,164709 + ,109 + ,177 + ,31 + ,201940 + ,38 + ,94 + ,31 + ,235454 + ,73 + ,117 + ,32 + ,99466 + ,50 + ,55 + ,23 + ,100750 + ,72 + ,58 + ,30 + ,224549 + ,50 + ,95 + ,31 + ,243511 + ,71 + ,129 + ,42 + ,22938 + ,10 + ,11 + ,1 + ,152474 + ,65 + ,101 + ,32 + ,61857 + ,25 + ,28 + ,11 + ,132487 + ,41 + ,89 + ,36 + ,317394 + ,86 + ,193 + ,31 + ,21054 + ,16 + ,4 + ,0 + ,209641 + ,42 + ,84 + ,24 + ,31414 + ,19 + ,39 + ,8 + ,244749 + ,95 + ,101 + ,33 + ,184510 + ,49 + ,82 + ,40 + ,128423 + ,64 + ,36 + ,38 + ,97839 + ,38 + ,75 + ,24 + ,38214 + ,34 + ,16 + ,8 + ,151101 + ,32 + ,55 + ,35 + ,272458 + ,65 + ,131 + ,43 + ,172494 + ,52 + ,131 + ,43 + ,328107 + ,65 + ,144 + ,41 + ,250579 + ,83 + ,139 + ,38 + ,351067 + ,95 + ,211 + ,45 + ,158015 + ,29 + ,78 + ,31 + ,85439 + ,33 + ,39 + ,28 + ,229242 + ,247 + ,90 + ,31 + ,351619 + ,139 + ,166 + ,40 + ,84207 + ,29 + ,12 + ,30 + ,324598 + ,110 + ,133 + ,37 + ,131069 + ,67 + ,69 + ,30 + ,204271 + ,42 + ,119 + ,35 + ,165543 + ,65 + ,119 + ,32 + ,141722 + ,94 + ,65 + ,27 + ,299775 + ,95 + ,101 + ,31 + ,195838 + ,67 + ,196 + ,31 + ,173260 + ,63 + ,15 + ,21 + ,254488 + ,83 + ,136 + ,39 + ,104389 + ,45 + ,89 + ,41 + ,199476 + ,70 + ,123 + ,32 + ,224330 + ,83 + ,163 + ,39 + ,14688 + ,10 + ,5 + ,0 + ,181633 + ,70 + ,96 + ,30 + ,271856 + ,103 + ,151 + ,37 + ,7199 + ,5 + ,6 + ,0 + ,46660 + ,20 + ,13 + ,5 + ,17547 + ,5 + ,3 + ,1 + ,95227 + ,34 + ,23 + ,32 + ,152601 + ,48 + ,57 + ,24) + ,dim=c(4 + ,156) + ,dimnames=list(c('time_in_rfc' + ,'logins' + ,'totblogs' + ,'compendiums_reviewed') + ,1:156)) > y <- array(NA,dim=c(4,156),dimnames=list(c('time_in_rfc','logins','totblogs','compendiums_reviewed'),1:156)) > 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 time_in_rfc logins totblogs compendiums_reviewed 1 210907 56 145 30 2 120982 56 101 28 3 176508 54 98 38 4 179321 89 132 30 5 123185 40 60 22 6 52746 25 38 26 7 385534 92 144 25 8 33170 18 5 18 9 149061 44 84 26 10 165446 33 79 25 11 237213 84 127 38 12 173326 88 78 44 13 133131 55 60 30 14 258873 60 131 40 15 180083 66 84 34 16 324799 154 133 47 17 230964 53 150 30 18 236785 119 91 31 19 135473 41 132 23 20 202925 61 136 36 21 215147 58 124 36 22 344297 75 118 30 23 153935 33 70 25 24 132943 40 107 39 25 174724 92 119 34 26 174415 100 89 31 27 225548 112 112 31 28 223632 73 108 33 29 124817 40 52 25 30 221698 45 112 33 31 210767 60 116 35 32 170266 62 123 42 33 260561 75 125 43 34 84853 31 27 30 35 294424 77 162 33 36 215641 46 64 32 37 325107 99 92 36 38 167542 66 83 28 39 106408 30 41 14 40 265769 146 120 32 41 269651 67 105 30 42 149112 56 79 35 43 152871 58 70 28 44 111665 34 55 28 45 116408 61 39 39 46 362301 119 67 34 47 78800 42 21 26 48 183167 66 127 39 49 277965 89 152 39 50 150629 44 113 33 51 168809 66 99 28 52 24188 24 7 4 53 329267 259 141 39 54 65029 17 21 18 55 101097 64 35 14 56 218946 41 109 29 57 244052 68 133 44 58 233328 132 230 28 59 256462 105 166 35 60 206161 71 68 28 61 311473 112 147 38 62 235800 94 179 23 63 177939 82 61 36 64 207176 70 101 32 65 196553 57 108 29 66 174184 53 90 25 67 143246 103 114 27 68 187559 121 103 36 69 187681 62 142 28 70 119016 52 79 23 71 182192 52 88 40 72 73566 32 25 23 73 194979 62 83 40 74 167488 45 113 28 75 143756 46 118 34 76 275541 63 110 33 77 243199 75 129 28 78 182999 88 51 34 79 135649 46 93 30 80 152299 53 76 33 81 120221 37 49 22 82 346485 90 118 38 83 145790 63 38 26 84 193339 78 141 35 85 80953 25 58 8 86 122774 45 27 24 87 130585 46 91 29 88 286468 144 63 29 89 241066 82 56 45 90 148446 91 144 37 91 204713 71 73 33 92 182079 63 168 33 93 140344 53 64 25 94 220516 62 97 32 95 243060 63 117 29 96 162765 32 100 28 97 182613 39 149 28 98 232138 62 187 31 99 265318 117 127 52 100 310839 92 245 24 101 225060 93 87 41 102 232317 54 177 33 103 144966 144 49 32 104 43287 14 49 19 105 155754 61 73 20 106 164709 109 177 31 107 201940 38 94 31 108 235454 73 117 32 109 99466 50 55 23 110 100750 72 58 30 111 224549 50 95 31 112 243511 71 129 42 113 22938 10 11 1 114 152474 65 101 32 115 61857 25 28 11 116 132487 41 89 36 117 317394 86 193 31 118 21054 16 4 0 119 209641 42 84 24 120 31414 19 39 8 121 244749 95 101 33 122 184510 49 82 40 123 128423 64 36 38 124 97839 38 75 24 125 38214 34 16 8 126 151101 32 55 35 127 272458 65 131 43 128 172494 52 131 43 129 328107 65 144 41 130 250579 83 139 38 131 351067 95 211 45 132 158015 29 78 31 133 85439 33 39 28 134 229242 247 90 31 135 351619 139 166 40 136 84207 29 12 30 137 324598 110 133 37 138 131069 67 69 30 139 204271 42 119 35 140 165543 65 119 32 141 141722 94 65 27 142 299775 95 101 31 143 195838 67 196 31 144 173260 63 15 21 145 254488 83 136 39 146 104389 45 89 41 147 199476 70 123 32 148 224330 83 163 39 149 14688 10 5 0 150 181633 70 96 30 151 271856 103 151 37 152 7199 5 6 0 153 46660 20 13 5 154 17547 5 3 1 155 95227 34 23 32 156 152601 48 57 24 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) logins totblogs 2350.6 727.3 709.3 compendiums_reviewed 2168.4 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -109688 -28630 -706 18968 159919 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2350.62 11884.02 0.198 0.843 logins 727.32 116.94 6.220 4.60e-09 *** totblogs 709.32 92.61 7.659 2.04e-12 *** compendiums_reviewed 2168.38 475.41 4.561 1.04e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 45090 on 152 degrees of freedom Multiple R-squared: 0.6971, Adjusted R-squared: 0.6911 F-statistic: 116.6 on 3 and 152 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.9798362 0.0403275007 0.0201637504 [2,] 0.9565095 0.0869810748 0.0434905374 [3,] 0.9196634 0.1606731913 0.0803365956 [4,] 0.8963698 0.2072604960 0.1036302480 [5,] 0.8506884 0.2986232928 0.1493116464 [6,] 0.7968091 0.4063818266 0.2031909133 [7,] 0.7219393 0.5561214378 0.2780607189 [8,] 0.7479989 0.5040021659 0.2520010830 [9,] 0.6764149 0.6471701263 0.3235850632 [10,] 0.5948172 0.8103656122 0.4051828061 [11,] 0.5181126 0.9637748871 0.4818874436 [12,] 0.4404343 0.8808686049 0.5595656976 [13,] 0.5365736 0.9268527511 0.4634263755 [14,] 0.4681282 0.9362563011 0.5318718495 [15,] 0.4008236 0.8016471798 0.5991764101 [16,] 0.8061432 0.3877136381 0.1938568190 [17,] 0.7807735 0.4384530400 0.2192265200 [18,] 0.7524189 0.4951621375 0.2475810687 [19,] 0.8119984 0.3760031844 0.1880015922 [20,] 0.8071728 0.3856544230 0.1928272115 [21,] 0.7786817 0.4426365442 0.2213182721 [22,] 0.7386660 0.5226680752 0.2613340376 [23,] 0.6922879 0.6154242705 0.3077121353 [24,] 0.6816947 0.6366106669 0.3183053335 [25,] 0.6283724 0.7432551183 0.3716275592 [26,] 0.6143311 0.7713377965 0.3856688983 [27,] 0.5969159 0.8061682982 0.4030841491 [28,] 0.5524364 0.8951271082 0.4475635541 [29,] 0.5200579 0.9598841731 0.4799420866 [30,] 0.6458567 0.7082865943 0.3541432972 [31,] 0.8316520 0.3366959561 0.1683479781 [32,] 0.7969249 0.4061502488 0.2030751244 [33,] 0.7605136 0.4789727765 0.2394863883 [34,] 0.7422914 0.5154172682 0.2577086341 [35,] 0.7999160 0.4001680121 0.2000840060 [36,] 0.7676894 0.4646211823 0.2323105912 [37,] 0.7258075 0.5483849192 0.2741924596 [38,] 0.6826698 0.6346604732 0.3173302366 [39,] 0.6530125 0.6939750961 0.3469875480 [40,] 0.9375171 0.1249657941 0.0624828970 [41,] 0.9244946 0.1510107424 0.0755053712 [42,] 0.9198021 0.1603957850 0.0801978925 [43,] 0.9017732 0.1964535366 0.0982267683 [44,] 0.8905092 0.2189816266 0.1094908133 [45,] 0.8728379 0.2543242464 0.1271621232 [46,] 0.8569180 0.2861639097 0.1430819549 [47,] 0.9262709 0.1474581878 0.0737290939 [48,] 0.9078649 0.1842702368 0.0921351184 [49,] 0.8881657 0.2236685082 0.1118342541 [50,] 0.8847608 0.2304784058 0.1152392029 [51,] 0.8598833 0.2802334399 0.1401167199 [52,] 0.9454231 0.1091538233 0.0545769116 [53,] 0.9332973 0.1334053860 0.0667026930 [54,] 0.9306384 0.1387232247 0.0693616124 [55,] 0.9271663 0.1456674398 0.0728337199 [56,] 0.9119546 0.1760907240 0.0880453620 [57,] 0.8918492 0.2163015307 0.1081507654 [58,] 0.8701477 0.2597046391 0.1298523196 [59,] 0.8456818 0.3086363844 0.1543181922 [60,] 0.8190568 0.3618864848 0.1809432424 [61,] 0.8655798 0.2688404649 0.1344202325 [62,] 0.8746684 0.2506631292 0.1253315646 [63,] 0.8549461 0.2901078986 0.1450539493 [64,] 0.8373452 0.3253095131 0.1626547566 [65,] 0.8075696 0.3848608378 0.1924304189 [66,] 0.7806871 0.4386258492 0.2193129246 [67,] 0.7446791 0.5106418963 0.2553209481 [68,] 0.7071366 0.5857267010 0.2928633505 [69,] 0.7134884 0.5730231352 0.2865115676 [70,] 0.7836442 0.4327116185 0.2163558093 [71,] 0.7682989 0.4634022836 0.2317011418 [72,] 0.7320844 0.5358312990 0.2679156495 [73,] 0.7111590 0.5776819328 0.2888409664 [74,] 0.6739652 0.6520696311 0.3260348155 [75,] 0.6321002 0.7357995139 0.3678997570 [76,] 0.8274601 0.3450797018 0.1725398509 [77,] 0.7994133 0.4011733820 0.2005866910 [78,] 0.7929070 0.4141860998 0.2070930499 [79,] 0.7578055 0.4843889261 0.2421944631 [80,] 0.7248899 0.5502201965 0.2751100982 [81,] 0.7050091 0.5899817108 0.2949908554 [82,] 0.7767726 0.4464548966 0.2232274483 [83,] 0.7766544 0.4466911778 0.2233455889 [84,] 0.8918280 0.2163439621 0.1081719811 [85,] 0.8794482 0.2411036096 0.1205518048 [86,] 0.8956304 0.2087392334 0.1043696167 [87,] 0.8723156 0.2553688706 0.1276844353 [88,] 0.8637548 0.2724903393 0.1362451696 [89,] 0.8705274 0.2589451660 0.1294725830 [90,] 0.8435242 0.3129515010 0.1564757505 [91,] 0.8184547 0.3630906656 0.1815453328 [92,] 0.7924897 0.4150205649 0.2075102824 [93,] 0.7628840 0.4742320042 0.2371160021 [94,] 0.7272494 0.5455011737 0.2727505869 [95,] 0.6883319 0.6233362106 0.3116681053 [96,] 0.6489335 0.7021330837 0.3510665419 [97,] 0.6747676 0.6504648471 0.3252324235 [98,] 0.6781738 0.6436523528 0.3218261764 [99,] 0.6371513 0.7256973096 0.3628486548 [100,] 0.8572783 0.2854434066 0.1427217033 [101,] 0.8472727 0.3054546803 0.1527273401 [102,] 0.8258080 0.3483839831 0.1741919916 [103,] 0.8028752 0.3942496277 0.1971248138 [104,] 0.8218418 0.3563163925 0.1781581962 [105,] 0.8314704 0.3370592781 0.1685296390 [106,] 0.7964793 0.4070414406 0.2035207203 [107,] 0.7563395 0.4873209305 0.2436604653 [108,] 0.7458713 0.5082573017 0.2541286508 [109,] 0.7003452 0.5993096178 0.2996548089 [110,] 0.6924899 0.6150202475 0.3075101237 [111,] 0.6785299 0.6429401176 0.3214700588 [112,] 0.6275020 0.7449960506 0.3724980253 [113,] 0.6805546 0.6388908181 0.3194454091 [114,] 0.6514148 0.6971703057 0.3485851529 [115,] 0.6256455 0.7487089466 0.3743544733 [116,] 0.5696097 0.8607805407 0.4303902703 [117,] 0.5243573 0.9512853153 0.4756426577 [118,] 0.5072676 0.9854647357 0.4927323678 [119,] 0.4556108 0.9112215851 0.5443892075 [120,] 0.3996181 0.7992361308 0.6003819346 [121,] 0.3774718 0.7549435087 0.6225282457 [122,] 0.4047305 0.8094610628 0.5952694686 [123,] 0.5625336 0.8749328525 0.4374664263 [124,] 0.4996726 0.9993451442 0.5003274279 [125,] 0.4737122 0.9474244237 0.5262877882 [126,] 0.4139524 0.8279048314 0.5860475843 [127,] 0.3692533 0.7385066493 0.6307466753 [128,] 0.8985730 0.2028540506 0.1014270253 [129,] 0.8636582 0.2726836250 0.1363418125 [130,] 0.8164906 0.3670187280 0.1835093640 [131,] 0.8333398 0.3333204193 0.1666602096 [132,] 0.8296828 0.3406343711 0.1703171856 [133,] 0.8938250 0.2123499541 0.1061749770 [134,] 0.8555872 0.2888256049 0.1444128025 [135,] 0.9996279 0.0007441278 0.0003720639 [136,] 0.9998086 0.0003828753 0.0001914377 [137,] 0.9995169 0.0009661642 0.0004830821 [138,] 0.9986029 0.0027941998 0.0013970999 [139,] 0.9991171 0.0017658646 0.0008829323 [140,] 0.9991320 0.0017359967 0.0008679984 [141,] 0.9971058 0.0057883070 0.0028941535 [142,] 0.9884345 0.0231310455 0.0115655228 [143,] 0.9614199 0.0771602403 0.0385801202 > postscript(file="/var/fisher/rcomp/tmp/1yqdd1353352791.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/fisher/rcomp/tmp/2l8651353352791.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/fisher/rcomp/tmp/3u5vl1353352791.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/fisher/rcomp/tmp/444mw1353352791.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/fisher/rcomp/tmp/5qsvd1353352791.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 = 156 Frequency = 1 1 2 3 4 5 -75.84705 -54454.08441 -17029.29388 -46442.13657 1478.29738 6 7 8 9 10 -51119.47990 159918.99451 -24849.72864 -1252.12318 28848.32337 11 12 13 14 15 1285.99762 -43763.94926 -16832.47906 33227.54854 -3578.11138 16 17 18 19 20 14188.55385 18616.50956 16116.05344 -40200.31286 -18320.84025 21 22 23 24 25 4594.92676 138646.74259 23721.18770 -58964.11429 -52673.46557 26 27 28 29 30 -31016.30668 -4925.41824 20024.41826 2279.70460 35617.99228 31 32 33 34 35 6603.22051 -55496.29655 21756.57975 -24247.39332 49603.96840 36 37 38 39 40 65049.33237 107433.15642 -2399.51542 22798.54090 2723.91321 41 42 43 44 45 79040.40768 -25897.74004 -2030.85032 -15141.49323 -42539.10798 46 47 48 49 50 152150.55280 -25371.44092 -41836.69460 18500.08169 -35433.01001 51 52 53 54 55 -12481.60756 -9256.94632 -46039.13177 -3612.50482 -2985.29240 56 57 58 59 60 46576.72939 2495.86582 -88886.15328 -15896.91093 43222.67864 61 62 63 64 65 40994.78537 -11759.01726 -5381.60612 12883.97359 13255.99219 66 67 68 69 70 15237.50319 -73426.69259 -53918.29569 -21201.02883 -27063.92076 71 72 73 74 75 -7134.23859 -19664.41544 1926.19304 -8459.42789 -49475.61286 76 77 78 79 80 77787.94140 34083.00097 6744.43991 -31176.13791 -14064.07812 81 82 83 84 85 8498.74612 112577.96615 14286.51338 -41649.42336 1931.98804 86 87 88 89 90 16501.46086 -32653.12178 71813.82476 41776.56862 -102462.24494 91 92 93 94 95 27386.18926 -56814.51762 -160.22208 34879.77435 49015.23206 96 97 98 99 100 5493.81704 -14505.98942 -15168.48934 -24967.74392 15751.22996 101 102 103 104 105 4454.74543 -6414.53825 -66262.85846 -45201.84779 13889.28395 106 107 108 109 110 -109688.15718 38055.69194 27630.93354 -28135.65061 -60159.21397 111 112 113 114 115 51227.58209 6946.95019 3343.34303 -38181.44658 -2389.60305 116 117 118 119 120 -40874.56275 48376.01791 4229.05466 65119.26799 -29766.06924 121 122 123 124 125 30105.69481 1621.61887 -28409.72148 -37389.60381 -17561.48878 126 127 128 129 130 10570.48138 36670.82986 -53838.06258 87435.45172 6867.49447 131 132 133 134 135 32378.13090 12025.62779 -29291.08512 -83814.07202 43689.44812 136 137 138 139 140 -12798.98750 67673.25255 -34006.13499 11070.95313 -37880.17524 141 142 143 144 145 -33648.25420 89468.45404 -61488.93351 68912.73142 10736.06963 146 147 148 149 150 -82723.72470 -10421.02811 -38573.52336 1517.63220 -4775.67588 151 152 153 154 155 7254.73565 -3044.10623 9700.02838 7263.46893 -17554.82742 156 22866.96519 > postscript(file="/var/fisher/rcomp/tmp/6fp5j1353352791.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 -75.84705 NA 1 -54454.08441 -75.84705 2 -17029.29388 -54454.08441 3 -46442.13657 -17029.29388 4 1478.29738 -46442.13657 5 -51119.47990 1478.29738 6 159918.99451 -51119.47990 7 -24849.72864 159918.99451 8 -1252.12318 -24849.72864 9 28848.32337 -1252.12318 10 1285.99762 28848.32337 11 -43763.94926 1285.99762 12 -16832.47906 -43763.94926 13 33227.54854 -16832.47906 14 -3578.11138 33227.54854 15 14188.55385 -3578.11138 16 18616.50956 14188.55385 17 16116.05344 18616.50956 18 -40200.31286 16116.05344 19 -18320.84025 -40200.31286 20 4594.92676 -18320.84025 21 138646.74259 4594.92676 22 23721.18770 138646.74259 23 -58964.11429 23721.18770 24 -52673.46557 -58964.11429 25 -31016.30668 -52673.46557 26 -4925.41824 -31016.30668 27 20024.41826 -4925.41824 28 2279.70460 20024.41826 29 35617.99228 2279.70460 30 6603.22051 35617.99228 31 -55496.29655 6603.22051 32 21756.57975 -55496.29655 33 -24247.39332 21756.57975 34 49603.96840 -24247.39332 35 65049.33237 49603.96840 36 107433.15642 65049.33237 37 -2399.51542 107433.15642 38 22798.54090 -2399.51542 39 2723.91321 22798.54090 40 79040.40768 2723.91321 41 -25897.74004 79040.40768 42 -2030.85032 -25897.74004 43 -15141.49323 -2030.85032 44 -42539.10798 -15141.49323 45 152150.55280 -42539.10798 46 -25371.44092 152150.55280 47 -41836.69460 -25371.44092 48 18500.08169 -41836.69460 49 -35433.01001 18500.08169 50 -12481.60756 -35433.01001 51 -9256.94632 -12481.60756 52 -46039.13177 -9256.94632 53 -3612.50482 -46039.13177 54 -2985.29240 -3612.50482 55 46576.72939 -2985.29240 56 2495.86582 46576.72939 57 -88886.15328 2495.86582 58 -15896.91093 -88886.15328 59 43222.67864 -15896.91093 60 40994.78537 43222.67864 61 -11759.01726 40994.78537 62 -5381.60612 -11759.01726 63 12883.97359 -5381.60612 64 13255.99219 12883.97359 65 15237.50319 13255.99219 66 -73426.69259 15237.50319 67 -53918.29569 -73426.69259 68 -21201.02883 -53918.29569 69 -27063.92076 -21201.02883 70 -7134.23859 -27063.92076 71 -19664.41544 -7134.23859 72 1926.19304 -19664.41544 73 -8459.42789 1926.19304 74 -49475.61286 -8459.42789 75 77787.94140 -49475.61286 76 34083.00097 77787.94140 77 6744.43991 34083.00097 78 -31176.13791 6744.43991 79 -14064.07812 -31176.13791 80 8498.74612 -14064.07812 81 112577.96615 8498.74612 82 14286.51338 112577.96615 83 -41649.42336 14286.51338 84 1931.98804 -41649.42336 85 16501.46086 1931.98804 86 -32653.12178 16501.46086 87 71813.82476 -32653.12178 88 41776.56862 71813.82476 89 -102462.24494 41776.56862 90 27386.18926 -102462.24494 91 -56814.51762 27386.18926 92 -160.22208 -56814.51762 93 34879.77435 -160.22208 94 49015.23206 34879.77435 95 5493.81704 49015.23206 96 -14505.98942 5493.81704 97 -15168.48934 -14505.98942 98 -24967.74392 -15168.48934 99 15751.22996 -24967.74392 100 4454.74543 15751.22996 101 -6414.53825 4454.74543 102 -66262.85846 -6414.53825 103 -45201.84779 -66262.85846 104 13889.28395 -45201.84779 105 -109688.15718 13889.28395 106 38055.69194 -109688.15718 107 27630.93354 38055.69194 108 -28135.65061 27630.93354 109 -60159.21397 -28135.65061 110 51227.58209 -60159.21397 111 6946.95019 51227.58209 112 3343.34303 6946.95019 113 -38181.44658 3343.34303 114 -2389.60305 -38181.44658 115 -40874.56275 -2389.60305 116 48376.01791 -40874.56275 117 4229.05466 48376.01791 118 65119.26799 4229.05466 119 -29766.06924 65119.26799 120 30105.69481 -29766.06924 121 1621.61887 30105.69481 122 -28409.72148 1621.61887 123 -37389.60381 -28409.72148 124 -17561.48878 -37389.60381 125 10570.48138 -17561.48878 126 36670.82986 10570.48138 127 -53838.06258 36670.82986 128 87435.45172 -53838.06258 129 6867.49447 87435.45172 130 32378.13090 6867.49447 131 12025.62779 32378.13090 132 -29291.08512 12025.62779 133 -83814.07202 -29291.08512 134 43689.44812 -83814.07202 135 -12798.98750 43689.44812 136 67673.25255 -12798.98750 137 -34006.13499 67673.25255 138 11070.95313 -34006.13499 139 -37880.17524 11070.95313 140 -33648.25420 -37880.17524 141 89468.45404 -33648.25420 142 -61488.93351 89468.45404 143 68912.73142 -61488.93351 144 10736.06963 68912.73142 145 -82723.72470 10736.06963 146 -10421.02811 -82723.72470 147 -38573.52336 -10421.02811 148 1517.63220 -38573.52336 149 -4775.67588 1517.63220 150 7254.73565 -4775.67588 151 -3044.10623 7254.73565 152 9700.02838 -3044.10623 153 7263.46893 9700.02838 154 -17554.82742 7263.46893 155 22866.96519 -17554.82742 156 NA 22866.96519 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -54454.0844 -75.84705 [2,] -17029.2939 -54454.08441 [3,] -46442.1366 -17029.29388 [4,] 1478.2974 -46442.13657 [5,] -51119.4799 1478.29738 [6,] 159918.9945 -51119.47990 [7,] -24849.7286 159918.99451 [8,] -1252.1232 -24849.72864 [9,] 28848.3234 -1252.12318 [10,] 1285.9976 28848.32337 [11,] -43763.9493 1285.99762 [12,] -16832.4791 -43763.94926 [13,] 33227.5485 -16832.47906 [14,] -3578.1114 33227.54854 [15,] 14188.5538 -3578.11138 [16,] 18616.5096 14188.55385 [17,] 16116.0534 18616.50956 [18,] -40200.3129 16116.05344 [19,] -18320.8403 -40200.31286 [20,] 4594.9268 -18320.84025 [21,] 138646.7426 4594.92676 [22,] 23721.1877 138646.74259 [23,] -58964.1143 23721.18770 [24,] -52673.4656 -58964.11429 [25,] -31016.3067 -52673.46557 [26,] -4925.4182 -31016.30668 [27,] 20024.4183 -4925.41824 [28,] 2279.7046 20024.41826 [29,] 35617.9923 2279.70460 [30,] 6603.2205 35617.99228 [31,] -55496.2966 6603.22051 [32,] 21756.5797 -55496.29655 [33,] -24247.3933 21756.57975 [34,] 49603.9684 -24247.39332 [35,] 65049.3324 49603.96840 [36,] 107433.1564 65049.33237 [37,] -2399.5154 107433.15642 [38,] 22798.5409 -2399.51542 [39,] 2723.9132 22798.54090 [40,] 79040.4077 2723.91321 [41,] -25897.7400 79040.40768 [42,] -2030.8503 -25897.74004 [43,] -15141.4932 -2030.85032 [44,] -42539.1080 -15141.49323 [45,] 152150.5528 -42539.10798 [46,] -25371.4409 152150.55280 [47,] -41836.6946 -25371.44092 [48,] 18500.0817 -41836.69460 [49,] -35433.0100 18500.08169 [50,] -12481.6076 -35433.01001 [51,] -9256.9463 -12481.60756 [52,] -46039.1318 -9256.94632 [53,] -3612.5048 -46039.13177 [54,] -2985.2924 -3612.50482 [55,] 46576.7294 -2985.29240 [56,] 2495.8658 46576.72939 [57,] -88886.1533 2495.86582 [58,] -15896.9109 -88886.15328 [59,] 43222.6786 -15896.91093 [60,] 40994.7854 43222.67864 [61,] -11759.0173 40994.78537 [62,] -5381.6061 -11759.01726 [63,] 12883.9736 -5381.60612 [64,] 13255.9922 12883.97359 [65,] 15237.5032 13255.99219 [66,] -73426.6926 15237.50319 [67,] -53918.2957 -73426.69259 [68,] -21201.0288 -53918.29569 [69,] -27063.9208 -21201.02883 [70,] -7134.2386 -27063.92076 [71,] -19664.4154 -7134.23859 [72,] 1926.1930 -19664.41544 [73,] -8459.4279 1926.19304 [74,] -49475.6129 -8459.42789 [75,] 77787.9414 -49475.61286 [76,] 34083.0010 77787.94140 [77,] 6744.4399 34083.00097 [78,] -31176.1379 6744.43991 [79,] -14064.0781 -31176.13791 [80,] 8498.7461 -14064.07812 [81,] 112577.9661 8498.74612 [82,] 14286.5134 112577.96615 [83,] -41649.4234 14286.51338 [84,] 1931.9880 -41649.42336 [85,] 16501.4609 1931.98804 [86,] -32653.1218 16501.46086 [87,] 71813.8248 -32653.12178 [88,] 41776.5686 71813.82476 [89,] -102462.2449 41776.56862 [90,] 27386.1893 -102462.24494 [91,] -56814.5176 27386.18926 [92,] -160.2221 -56814.51762 [93,] 34879.7744 -160.22208 [94,] 49015.2321 34879.77435 [95,] 5493.8170 49015.23206 [96,] -14505.9894 5493.81704 [97,] -15168.4893 -14505.98942 [98,] -24967.7439 -15168.48934 [99,] 15751.2300 -24967.74392 [100,] 4454.7454 15751.22996 [101,] -6414.5383 4454.74543 [102,] -66262.8585 -6414.53825 [103,] -45201.8478 -66262.85846 [104,] 13889.2839 -45201.84779 [105,] -109688.1572 13889.28395 [106,] 38055.6919 -109688.15718 [107,] 27630.9335 38055.69194 [108,] -28135.6506 27630.93354 [109,] -60159.2140 -28135.65061 [110,] 51227.5821 -60159.21397 [111,] 6946.9502 51227.58209 [112,] 3343.3430 6946.95019 [113,] -38181.4466 3343.34303 [114,] -2389.6030 -38181.44658 [115,] -40874.5627 -2389.60305 [116,] 48376.0179 -40874.56275 [117,] 4229.0547 48376.01791 [118,] 65119.2680 4229.05466 [119,] -29766.0692 65119.26799 [120,] 30105.6948 -29766.06924 [121,] 1621.6189 30105.69481 [122,] -28409.7215 1621.61887 [123,] -37389.6038 -28409.72148 [124,] -17561.4888 -37389.60381 [125,] 10570.4814 -17561.48878 [126,] 36670.8299 10570.48138 [127,] -53838.0626 36670.82986 [128,] 87435.4517 -53838.06258 [129,] 6867.4945 87435.45172 [130,] 32378.1309 6867.49447 [131,] 12025.6278 32378.13090 [132,] -29291.0851 12025.62779 [133,] -83814.0720 -29291.08512 [134,] 43689.4481 -83814.07202 [135,] -12798.9875 43689.44812 [136,] 67673.2526 -12798.98750 [137,] -34006.1350 67673.25255 [138,] 11070.9531 -34006.13499 [139,] -37880.1752 11070.95313 [140,] -33648.2542 -37880.17524 [141,] 89468.4540 -33648.25420 [142,] -61488.9335 89468.45404 [143,] 68912.7314 -61488.93351 [144,] 10736.0696 68912.73142 [145,] -82723.7247 10736.06963 [146,] -10421.0281 -82723.72470 [147,] -38573.5234 -10421.02811 [148,] 1517.6322 -38573.52336 [149,] -4775.6759 1517.63220 [150,] 7254.7357 -4775.67588 [151,] -3044.1062 7254.73565 [152,] 9700.0284 -3044.10623 [153,] 7263.4689 9700.02838 [154,] -17554.8274 7263.46893 [155,] 22866.9652 -17554.82742 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -54454.0844 -75.84705 2 -17029.2939 -54454.08441 3 -46442.1366 -17029.29388 4 1478.2974 -46442.13657 5 -51119.4799 1478.29738 6 159918.9945 -51119.47990 7 -24849.7286 159918.99451 8 -1252.1232 -24849.72864 9 28848.3234 -1252.12318 10 1285.9976 28848.32337 11 -43763.9493 1285.99762 12 -16832.4791 -43763.94926 13 33227.5485 -16832.47906 14 -3578.1114 33227.54854 15 14188.5538 -3578.11138 16 18616.5096 14188.55385 17 16116.0534 18616.50956 18 -40200.3129 16116.05344 19 -18320.8403 -40200.31286 20 4594.9268 -18320.84025 21 138646.7426 4594.92676 22 23721.1877 138646.74259 23 -58964.1143 23721.18770 24 -52673.4656 -58964.11429 25 -31016.3067 -52673.46557 26 -4925.4182 -31016.30668 27 20024.4183 -4925.41824 28 2279.7046 20024.41826 29 35617.9923 2279.70460 30 6603.2205 35617.99228 31 -55496.2966 6603.22051 32 21756.5797 -55496.29655 33 -24247.3933 21756.57975 34 49603.9684 -24247.39332 35 65049.3324 49603.96840 36 107433.1564 65049.33237 37 -2399.5154 107433.15642 38 22798.5409 -2399.51542 39 2723.9132 22798.54090 40 79040.4077 2723.91321 41 -25897.7400 79040.40768 42 -2030.8503 -25897.74004 43 -15141.4932 -2030.85032 44 -42539.1080 -15141.49323 45 152150.5528 -42539.10798 46 -25371.4409 152150.55280 47 -41836.6946 -25371.44092 48 18500.0817 -41836.69460 49 -35433.0100 18500.08169 50 -12481.6076 -35433.01001 51 -9256.9463 -12481.60756 52 -46039.1318 -9256.94632 53 -3612.5048 -46039.13177 54 -2985.2924 -3612.50482 55 46576.7294 -2985.29240 56 2495.8658 46576.72939 57 -88886.1533 2495.86582 58 -15896.9109 -88886.15328 59 43222.6786 -15896.91093 60 40994.7854 43222.67864 61 -11759.0173 40994.78537 62 -5381.6061 -11759.01726 63 12883.9736 -5381.60612 64 13255.9922 12883.97359 65 15237.5032 13255.99219 66 -73426.6926 15237.50319 67 -53918.2957 -73426.69259 68 -21201.0288 -53918.29569 69 -27063.9208 -21201.02883 70 -7134.2386 -27063.92076 71 -19664.4154 -7134.23859 72 1926.1930 -19664.41544 73 -8459.4279 1926.19304 74 -49475.6129 -8459.42789 75 77787.9414 -49475.61286 76 34083.0010 77787.94140 77 6744.4399 34083.00097 78 -31176.1379 6744.43991 79 -14064.0781 -31176.13791 80 8498.7461 -14064.07812 81 112577.9661 8498.74612 82 14286.5134 112577.96615 83 -41649.4234 14286.51338 84 1931.9880 -41649.42336 85 16501.4609 1931.98804 86 -32653.1218 16501.46086 87 71813.8248 -32653.12178 88 41776.5686 71813.82476 89 -102462.2449 41776.56862 90 27386.1893 -102462.24494 91 -56814.5176 27386.18926 92 -160.2221 -56814.51762 93 34879.7744 -160.22208 94 49015.2321 34879.77435 95 5493.8170 49015.23206 96 -14505.9894 5493.81704 97 -15168.4893 -14505.98942 98 -24967.7439 -15168.48934 99 15751.2300 -24967.74392 100 4454.7454 15751.22996 101 -6414.5383 4454.74543 102 -66262.8585 -6414.53825 103 -45201.8478 -66262.85846 104 13889.2839 -45201.84779 105 -109688.1572 13889.28395 106 38055.6919 -109688.15718 107 27630.9335 38055.69194 108 -28135.6506 27630.93354 109 -60159.2140 -28135.65061 110 51227.5821 -60159.21397 111 6946.9502 51227.58209 112 3343.3430 6946.95019 113 -38181.4466 3343.34303 114 -2389.6030 -38181.44658 115 -40874.5627 -2389.60305 116 48376.0179 -40874.56275 117 4229.0547 48376.01791 118 65119.2680 4229.05466 119 -29766.0692 65119.26799 120 30105.6948 -29766.06924 121 1621.6189 30105.69481 122 -28409.7215 1621.61887 123 -37389.6038 -28409.72148 124 -17561.4888 -37389.60381 125 10570.4814 -17561.48878 126 36670.8299 10570.48138 127 -53838.0626 36670.82986 128 87435.4517 -53838.06258 129 6867.4945 87435.45172 130 32378.1309 6867.49447 131 12025.6278 32378.13090 132 -29291.0851 12025.62779 133 -83814.0720 -29291.08512 134 43689.4481 -83814.07202 135 -12798.9875 43689.44812 136 67673.2526 -12798.98750 137 -34006.1350 67673.25255 138 11070.9531 -34006.13499 139 -37880.1752 11070.95313 140 -33648.2542 -37880.17524 141 89468.4540 -33648.25420 142 -61488.9335 89468.45404 143 68912.7314 -61488.93351 144 10736.0696 68912.73142 145 -82723.7247 10736.06963 146 -10421.0281 -82723.72470 147 -38573.5234 -10421.02811 148 1517.6322 -38573.52336 149 -4775.6759 1517.63220 150 7254.7357 -4775.67588 151 -3044.1062 7254.73565 152 9700.0284 -3044.10623 153 7263.4689 9700.02838 154 -17554.8274 7263.46893 155 22866.9652 -17554.82742 > 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/fisher/rcomp/tmp/7lhrs1353352791.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/fisher/rcomp/tmp/8hdsm1353352791.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/fisher/rcomp/tmp/9wx0h1353352791.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/fisher/rcomp/tmp/10o5oa1353352791.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1127fw1353352791.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/fisher/rcomp/tmp/12v00d1353352791.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/fisher/rcomp/tmp/13n1yx1353352791.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/fisher/rcomp/tmp/145qvs1353352791.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/fisher/rcomp/tmp/15ky5t1353352791.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/fisher/rcomp/tmp/16bazz1353352791.tab") + } > > try(system("convert tmp/1yqdd1353352791.ps tmp/1yqdd1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/2l8651353352791.ps tmp/2l8651353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/3u5vl1353352791.ps tmp/3u5vl1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/444mw1353352791.ps tmp/444mw1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/5qsvd1353352791.ps tmp/5qsvd1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/6fp5j1353352791.ps tmp/6fp5j1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/7lhrs1353352791.ps tmp/7lhrs1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/8hdsm1353352791.ps tmp/8hdsm1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/9wx0h1353352791.ps tmp/9wx0h1353352791.png",intern=TRUE)) character(0) > try(system("convert tmp/10o5oa1353352791.ps tmp/10o5oa1353352791.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.532 1.286 8.820