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(102 + ,122 + ,88 + ,1 + ,99 + ,114 + ,106 + ,1 + ,97 + ,140 + ,70 + ,1 + ,82 + ,143 + ,70 + ,1 + ,77 + ,122 + ,56 + ,1 + ,65 + ,127 + ,50 + ,1 + ,64 + ,113 + ,48 + ,1 + ,62 + ,118 + ,71 + ,1 + ,62 + ,161 + ,61 + ,1 + ,62 + ,134 + ,66 + ,1 + ,61 + ,96 + ,80 + ,1 + ,59 + ,104 + ,37 + ,1 + ,57 + ,135 + ,53 + ,1 + ,56 + ,110 + ,39 + ,1 + ,54 + ,128 + ,40 + ,1 + ,54 + ,142 + ,59 + ,1 + ,53 + ,117 + ,42 + ,1 + ,52 + ,94 + ,33 + ,1 + ,51 + ,135 + ,36 + ,1 + ,51 + ,121 + ,57 + ,1 + ,51 + ,103 + ,38 + ,1 + ,50 + ,118 + ,98 + ,1 + ,50 + ,127 + ,43 + ,1 + ,50 + ,116 + ,73 + ,1 + ,49 + ,129 + ,52 + ,1 + ,49 + ,115 + ,53 + ,1 + ,49 + ,135 + ,51 + ,1 + ,48 + ,133 + ,32 + ,1 + ,48 + ,113 + ,43 + ,1 + ,47 + ,111 + ,53 + ,1 + ,47 + ,92 + ,50 + ,1 + ,46 + ,118 + ,50 + ,1 + ,46 + ,134 + ,56 + ,1 + ,45 + ,106 + ,53 + ,1 + ,45 + ,137 + ,47 + ,1 + ,45 + ,100 + ,42 + ,1 + ,44 + ,102 + ,29 + ,1 + ,43 + ,134 + ,54 + ,1 + ,42 + ,130 + ,40 + ,1 + ,42 + ,144 + ,41 + ,1 + ,42 + ,120 + ,37 + ,1 + ,42 + ,91 + ,25 + ,1 + ,42 + ,100 + ,27 + ,1 + ,42 + ,134 + ,61 + ,1 + ,41 + ,161 + ,54 + ,1 + ,41 + ,128 + ,35 + ,1 + ,41 + ,124 + ,55 + ,1 + ,41 + ,115 + ,47 + ,1 + ,41 + ,123 + ,49 + ,1 + ,41 + ,117 + ,38 + ,1 + ,41 + ,111 + ,52 + ,1 + ,40 + ,146 + ,35 + ,1 + ,40 + ,101 + ,52 + ,1 + ,40 + ,131 + ,54 + ,1 + ,40 + ,122 + ,40 + ,1 + ,40 + ,78 + ,52 + ,1 + ,39 + ,120 + ,34 + ,1 + ,39 + ,115 + ,51 + ,1 + ,38 + ,142 + ,43 + ,1 + ,38 + ,94 + ,40 + ,1 + ,36 + ,114 + ,38 + ,1 + ,36 + ,108 + ,33 + ,1 + ,35 + ,119 + ,27 + ,1 + ,35 + ,117 + ,34 + ,1 + ,35 + ,86 + ,44 + ,1 + ,35 + ,138 + ,46 + ,1 + ,34 + ,119 + ,50 + ,1 + ,34 + ,117 + ,31 + ,1 + ,34 + ,117 + ,33 + ,1 + ,33 + ,76 + ,37 + ,1 + ,33 + ,119 + ,48 + ,1 + ,33 + ,119 + ,33 + ,1 + ,32 + ,124 + ,40 + ,1 + ,32 + ,116 + ,21 + ,1 + ,32 + ,118 + ,33 + ,1 + ,31 + ,102 + ,41 + ,1 + ,31 + ,116 + ,35 + ,1 + ,30 + ,103 + ,60 + ,1 + ,30 + ,117 + ,30 + ,1 + ,30 + ,108 + ,45 + ,1 + ,30 + ,122 + ,26 + ,1 + ,29 + ,90 + ,41 + ,1 + ,28 + ,133 + ,48 + ,1 + ,28 + ,116 + ,10 + ,1 + ,27 + ,110 + ,35 + ,1 + ,27 + ,90 + ,23 + ,1 + ,27 + ,74 + ,29 + ,1 + ,26 + ,75 + ,17 + ,1 + ,25 + ,107 + ,35 + ,1 + ,25 + ,90 + ,50 + ,1 + ,25 + ,96 + ,33 + ,1 + ,24 + ,115 + ,23 + ,1 + ,24 + ,91 + ,22 + ,1 + ,23 + ,77 + ,52 + ,1 + ,23 + ,108 + ,38 + ,1 + ,23 + ,83 + ,32 + ,1 + ,23 + ,77 + ,28 + ,1 + ,23 + ,99 + ,43 + ,1 + ,22 + ,115 + ,32 + ,1 + ,22 + ,99 + ,35 + ,1 + ,22 + ,106 + ,25 + ,1 + ,22 + ,77 + ,14 + ,1 + ,20 + ,115 + ,17 + ,1 + ,19 + ,67 + ,18 + ,1 + ,19 + ,8 + ,12 + ,1 + ,17 + ,69 + ,27 + ,1 + ,17 + ,88 + ,28 + ,1 + ,16 + ,107 + ,12 + ,1 + ,16 + ,120 + ,21 + ,1 + ,5 + ,3 + ,9 + ,1 + ,4 + ,1 + ,11 + ,1 + ,3 + ,0 + ,3 + ,1 + ,156 + ,111 + ,111 + ,0 + ,109 + ,69 + ,137 + ,0 + ,104 + ,116 + ,112 + ,0 + ,98 + ,103 + ,73 + ,0 + ,78 + ,139 + ,99 + ,0 + ,77 + ,135 + ,115 + ,0 + ,73 + ,113 + ,95 + ,0 + ,71 + ,99 + ,60 + ,0 + ,67 + ,76 + ,94 + ,0 + ,64 + ,110 + ,70 + ,0 + ,62 + ,121 + ,87 + ,0 + ,61 + ,95 + ,102 + ,0 + ,58 + ,66 + ,69 + ,0 + ,58 + ,111 + ,111 + ,0 + ,56 + ,77 + ,55 + ,0 + ,56 + ,101 + ,118 + ,0 + ,52 + ,108 + ,90 + ,0 + ,51 + ,135 + ,81 + ,0 + ,51 + ,70 + ,88 + ,0 + ,50 + ,124 + ,63 + ,0 + ,49 + ,92 + ,84 + ,0 + ,49 + ,104 + ,87 + ,0 + ,48 + ,113 + ,78 + ,0 + ,47 + ,95 + ,93 + ,0 + ,47 + ,89 + ,69 + ,0 + ,46 + ,83 + ,67 + ,0 + ,45 + ,96 + ,61 + ,0 + ,45 + ,95 + ,123 + ,0 + ,45 + ,110 + ,91 + ,0 + ,45 + ,106 + ,98 + ,0 + ,44 + ,78 + ,38 + ,0 + ,44 + ,115 + ,72 + ,0 + ,44 + ,74 + ,59 + ,0 + ,43 + ,93 + ,78 + ,0 + ,43 + ,88 + ,58 + ,0 + ,42 + ,104 + ,97 + ,0 + ,41 + ,86 + ,69 + ,0 + ,41 + ,104 + ,50 + ,0 + ,40 + ,99 + ,66 + ,0 + ,39 + ,101 + ,70 + ,0 + ,39 + ,53 + ,65 + ,0 + ,39 + ,96 + ,69 + ,0 + ,39 + ,58 + ,49 + ,0 + ,39 + ,117 + ,72 + ,0 + ,39 + ,82 + ,74 + ,0 + ,39 + ,57 + ,82 + ,0 + ,38 + ,71 + ,61 + ,0 + ,38 + ,105 + ,72 + ,0 + ,38 + ,60 + ,77 + ,0 + ,38 + ,77 + ,64 + ,0 + ,37 + ,73 + ,23 + ,0 + ,37 + ,78 + ,39 + ,0 + ,37 + ,81 + ,87 + ,0 + ,36 + ,101 + ,46 + ,0 + ,36 + ,118 + ,66 + ,0 + ,36 + ,59 + ,57 + ,0 + ,36 + ,101 + ,48 + ,0 + ,36 + ,22 + ,75 + ,0 + ,36 + ,77 + ,35 + ,0 + ,35 + ,100 + ,53 + ,0 + ,35 + ,39 + ,60 + ,0 + ,34 + ,42 + ,20 + ,0 + ,34 + ,80 + ,66 + ,0 + ,34 + ,48 + ,34 + ,0 + ,34 + ,131 + ,80 + ,0 + ,34 + ,46 + ,63 + ,0 + ,33 + ,89 + ,46 + ,0 + ,33 + ,51 + ,20 + ,0 + ,33 + ,108 + ,73 + ,0 + ,33 + ,86 + ,57 + ,0 + ,33 + ,105 + ,65 + ,0 + ,33 + ,85 + ,70 + ,0 + ,32 + ,103 + ,53 + ,0 + ,32 + ,83 + ,60 + ,0 + ,32 + ,77 + ,34 + ,0 + ,32 + ,26 + ,18 + ,0 + ,32 + ,73 + ,49 + ,0 + ,31 + ,42 + ,27 + ,0 + ,31 + ,71 + ,45 + ,0 + ,31 + ,105 + ,9 + ,0 + ,30 + ,73 + ,23 + ,0 + ,30 + ,98 + ,61 + ,0 + ,29 + ,108 + ,67 + ,0 + ,29 + ,57 + ,72 + ,0 + ,29 + ,37 + ,58 + ,0 + ,28 + ,70 + ,55 + ,0 + ,28 + ,73 + ,33 + ,0 + ,28 + ,47 + ,40 + ,0 + ,28 + ,73 + ,57 + ,0 + ,28 + ,91 + ,61 + ,0 + ,28 + ,110 + ,87 + ,0 + ,27 + ,78 + ,65 + ,0 + ,27 + ,92 + ,85 + ,0 + ,27 + ,52 + ,85 + ,0 + ,26 + ,88 + ,54 + ,0 + ,26 + ,100 + ,24 + ,0 + ,26 + ,33 + ,31 + ,0 + ,26 + ,42 + ,64 + ,0 + ,25 + ,81 + ,70 + ,0 + ,25 + ,67 + ,2 + ,0 + ,24 + ,8 + ,27 + ,0 + ,24 + ,46 + ,29 + ,0 + ,24 + ,83 + ,68 + ,0 + ,24 + ,87 + ,42 + ,0 + ,24 + ,82 + ,78 + ,0 + ,24 + ,63 + ,13 + ,0 + ,24 + ,27 + ,52 + ,0 + ,23 + ,14 + ,25 + ,0 + ,23 + ,83 + ,38 + ,0 + ,23 + ,168 + ,40 + ,0 + ,23 + ,67 + ,42 + ,0 + ,23 + ,21 + ,40 + ,0 + ,23 + ,55 + ,74 + ,0 + ,23 + ,54 + ,73 + ,0 + ,22 + ,118 + ,56 + ,0 + ,22 + ,69 + ,3 + ,0 + ,21 + ,77 + ,9 + ,0 + ,21 + ,72 + ,68 + ,0 + ,21 + ,53 + ,28 + ,0 + ,21 + ,40 + ,36 + ,0 + ,20 + ,102 + ,38 + ,0 + ,20 + ,25 + ,55 + ,0 + ,20 + ,31 + ,36 + ,0 + ,20 + ,77 + ,17 + ,0 + ,20 + ,38 + ,54 + ,0 + ,19 + ,23 + ,57 + ,0 + ,19 + ,91 + ,30 + ,0 + ,19 + ,58 + ,40 + ,0 + ,18 + ,42 + ,37 + ,0 + ,18 + ,44 + ,46 + ,0 + ,18 + ,58 + ,32 + ,0 + ,18 + ,35 + ,34 + ,0 + ,18 + ,88 + ,22 + ,0 + ,17 + ,25 + ,59 + ,0 + ,17 + ,39 + ,32 + ,0 + ,16 + ,48 + ,18 + ,0 + ,16 + ,64 + ,28 + ,0 + ,15 + ,65 + ,34 + ,0 + ,15 + ,95 + ,29 + ,0 + ,15 + ,29 + ,24 + ,0 + ,15 + ,2 + ,24 + ,0 + ,14 + ,83 + ,23 + ,0 + ,13 + ,11 + ,43 + ,0 + ,13 + ,16 + ,28 + ,0 + ,12 + ,9 + ,19 + ,0 + ,11 + ,46 + ,16 + ,0 + ,11 + ,41 + ,40 + ,0 + ,10 + ,14 + ,14 + ,0 + ,10 + ,63 + ,19 + ,0 + ,10 + ,9 + ,22 + ,0 + ,10 + ,0 + ,8 + ,0 + ,9 + ,58 + ,31 + ,0 + ,8 + ,18 + ,9 + ,0 + ,8 + ,42 + ,18 + ,0 + ,7 + ,26 + ,9 + ,0 + ,7 + ,38 + ,5 + ,0 + ,4 + ,1 + ,11 + ,0) + ,dim=c(4 + ,269) + ,dimnames=list(c('hours' + ,'lfm' + ,'blogs' + ,'uk') + ,1:269)) > y <- array(NA,dim=c(4,269),dimnames=list(c('hours','lfm','blogs','uk'),1:269)) > 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 = '2' > 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 lfm hours blogs uk 1 122 102 88 1 2 114 99 106 1 3 140 97 70 1 4 143 82 70 1 5 122 77 56 1 6 127 65 50 1 7 113 64 48 1 8 118 62 71 1 9 161 62 61 1 10 134 62 66 1 11 96 61 80 1 12 104 59 37 1 13 135 57 53 1 14 110 56 39 1 15 128 54 40 1 16 142 54 59 1 17 117 53 42 1 18 94 52 33 1 19 135 51 36 1 20 121 51 57 1 21 103 51 38 1 22 118 50 98 1 23 127 50 43 1 24 116 50 73 1 25 129 49 52 1 26 115 49 53 1 27 135 49 51 1 28 133 48 32 1 29 113 48 43 1 30 111 47 53 1 31 92 47 50 1 32 118 46 50 1 33 134 46 56 1 34 106 45 53 1 35 137 45 47 1 36 100 45 42 1 37 102 44 29 1 38 134 43 54 1 39 130 42 40 1 40 144 42 41 1 41 120 42 37 1 42 91 42 25 1 43 100 42 27 1 44 134 42 61 1 45 161 41 54 1 46 128 41 35 1 47 124 41 55 1 48 115 41 47 1 49 123 41 49 1 50 117 41 38 1 51 111 41 52 1 52 146 40 35 1 53 101 40 52 1 54 131 40 54 1 55 122 40 40 1 56 78 40 52 1 57 120 39 34 1 58 115 39 51 1 59 142 38 43 1 60 94 38 40 1 61 114 36 38 1 62 108 36 33 1 63 119 35 27 1 64 117 35 34 1 65 86 35 44 1 66 138 35 46 1 67 119 34 50 1 68 117 34 31 1 69 117 34 33 1 70 76 33 37 1 71 119 33 48 1 72 119 33 33 1 73 124 32 40 1 74 116 32 21 1 75 118 32 33 1 76 102 31 41 1 77 116 31 35 1 78 103 30 60 1 79 117 30 30 1 80 108 30 45 1 81 122 30 26 1 82 90 29 41 1 83 133 28 48 1 84 116 28 10 1 85 110 27 35 1 86 90 27 23 1 87 74 27 29 1 88 75 26 17 1 89 107 25 35 1 90 90 25 50 1 91 96 25 33 1 92 115 24 23 1 93 91 24 22 1 94 77 23 52 1 95 108 23 38 1 96 83 23 32 1 97 77 23 28 1 98 99 23 43 1 99 115 22 32 1 100 99 22 35 1 101 106 22 25 1 102 77 22 14 1 103 115 20 17 1 104 67 19 18 1 105 8 19 12 1 106 69 17 27 1 107 88 17 28 1 108 107 16 12 1 109 120 16 21 1 110 3 5 9 1 111 1 4 11 1 112 0 3 3 1 113 111 156 111 0 114 69 109 137 0 115 116 104 112 0 116 103 98 73 0 117 139 78 99 0 118 135 77 115 0 119 113 73 95 0 120 99 71 60 0 121 76 67 94 0 122 110 64 70 0 123 121 62 87 0 124 95 61 102 0 125 66 58 69 0 126 111 58 111 0 127 77 56 55 0 128 101 56 118 0 129 108 52 90 0 130 135 51 81 0 131 70 51 88 0 132 124 50 63 0 133 92 49 84 0 134 104 49 87 0 135 113 48 78 0 136 95 47 93 0 137 89 47 69 0 138 83 46 67 0 139 96 45 61 0 140 95 45 123 0 141 110 45 91 0 142 106 45 98 0 143 78 44 38 0 144 115 44 72 0 145 74 44 59 0 146 93 43 78 0 147 88 43 58 0 148 104 42 97 0 149 86 41 69 0 150 104 41 50 0 151 99 40 66 0 152 101 39 70 0 153 53 39 65 0 154 96 39 69 0 155 58 39 49 0 156 117 39 72 0 157 82 39 74 0 158 57 39 82 0 159 71 38 61 0 160 105 38 72 0 161 60 38 77 0 162 77 38 64 0 163 73 37 23 0 164 78 37 39 0 165 81 37 87 0 166 101 36 46 0 167 118 36 66 0 168 59 36 57 0 169 101 36 48 0 170 22 36 75 0 171 77 36 35 0 172 100 35 53 0 173 39 35 60 0 174 42 34 20 0 175 80 34 66 0 176 48 34 34 0 177 131 34 80 0 178 46 34 63 0 179 89 33 46 0 180 51 33 20 0 181 108 33 73 0 182 86 33 57 0 183 105 33 65 0 184 85 33 70 0 185 103 32 53 0 186 83 32 60 0 187 77 32 34 0 188 26 32 18 0 189 73 32 49 0 190 42 31 27 0 191 71 31 45 0 192 105 31 9 0 193 73 30 23 0 194 98 30 61 0 195 108 29 67 0 196 57 29 72 0 197 37 29 58 0 198 70 28 55 0 199 73 28 33 0 200 47 28 40 0 201 73 28 57 0 202 91 28 61 0 203 110 28 87 0 204 78 27 65 0 205 92 27 85 0 206 52 27 85 0 207 88 26 54 0 208 100 26 24 0 209 33 26 31 0 210 42 26 64 0 211 81 25 70 0 212 67 25 2 0 213 8 24 27 0 214 46 24 29 0 215 83 24 68 0 216 87 24 42 0 217 82 24 78 0 218 63 24 13 0 219 27 24 52 0 220 14 23 25 0 221 83 23 38 0 222 168 23 40 0 223 67 23 42 0 224 21 23 40 0 225 55 23 74 0 226 54 23 73 0 227 118 22 56 0 228 69 22 3 0 229 77 21 9 0 230 72 21 68 0 231 53 21 28 0 232 40 21 36 0 233 102 20 38 0 234 25 20 55 0 235 31 20 36 0 236 77 20 17 0 237 38 20 54 0 238 23 19 57 0 239 91 19 30 0 240 58 19 40 0 241 42 18 37 0 242 44 18 46 0 243 58 18 32 0 244 35 18 34 0 245 88 18 22 0 246 25 17 59 0 247 39 17 32 0 248 48 16 18 0 249 64 16 28 0 250 65 15 34 0 251 95 15 29 0 252 29 15 24 0 253 2 15 24 0 254 83 14 23 0 255 11 13 43 0 256 16 13 28 0 257 9 12 19 0 258 46 11 16 0 259 41 11 40 0 260 14 10 14 0 261 63 10 19 0 262 9 10 22 0 263 0 10 8 0 264 58 9 31 0 265 18 8 9 0 266 42 8 18 0 267 26 7 9 0 268 38 7 5 0 269 1 4 11 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) hours blogs uk 34.4159 0.5359 0.3717 38.2254 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -79.283 -15.776 2.832 16.852 106.391 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 34.4159 4.0605 8.476 1.64e-15 *** hours 0.5359 0.1167 4.592 6.80e-06 *** blogs 0.3717 0.0922 4.031 7.25e-05 *** uk 38.2254 3.5859 10.660 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25.5 on 265 degrees of freedom Multiple R-squared: 0.4998, Adjusted R-squared: 0.4941 F-statistic: 88.27 on 3 and 265 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,] 1.774652e-01 3.549304e-01 0.8225348 [2,] 8.651479e-02 1.730296e-01 0.9134852 [3,] 3.043645e-01 6.087290e-01 0.6956355 [4,] 1.977037e-01 3.954075e-01 0.8022963 [5,] 2.242277e-01 4.484555e-01 0.7757723 [6,] 2.617840e-01 5.235681e-01 0.7382160 [7,] 2.007956e-01 4.015912e-01 0.7992044 [8,] 1.634884e-01 3.269768e-01 0.8365116 [9,] 1.113624e-01 2.227247e-01 0.8886376 [10,] 1.025214e-01 2.050429e-01 0.8974786 [11,] 7.084650e-02 1.416930e-01 0.9291535 [12,] 9.228056e-02 1.845611e-01 0.9077194 [13,] 7.365499e-02 1.473100e-01 0.9263450 [14,] 4.884911e-02 9.769823e-02 0.9511509 [15,] 4.242735e-02 8.485471e-02 0.9575726 [16,] 2.817075e-02 5.634151e-02 0.9718292 [17,] 1.873452e-02 3.746904e-02 0.9812655 [18,] 1.191733e-02 2.383466e-02 0.9880827 [19,] 7.924985e-03 1.584997e-02 0.9920750 [20,] 4.905869e-03 9.811738e-03 0.9950941 [21,] 3.776304e-03 7.552608e-03 0.9962237 [22,] 2.659770e-03 5.319540e-03 0.9973402 [23,] 1.698483e-03 3.396967e-03 0.9983015 [24,] 1.105749e-03 2.211499e-03 0.9988943 [25,] 1.807309e-03 3.614618e-03 0.9981927 [26,] 1.057452e-03 2.114905e-03 0.9989425 [27,] 8.380729e-04 1.676146e-03 0.9991619 [28,] 6.049518e-04 1.209904e-03 0.9993950 [29,] 5.465188e-04 1.093038e-03 0.9994535 [30,] 5.167918e-04 1.033584e-03 0.9994832 [31,] 4.187020e-04 8.374039e-04 0.9995813 [32,] 3.425576e-04 6.851152e-04 0.9996574 [33,] 2.426915e-04 4.853830e-04 0.9997573 [34,] 3.295397e-04 6.590793e-04 0.9996705 [35,] 1.941591e-04 3.883182e-04 0.9998058 [36,] 2.852844e-04 5.705687e-04 0.9997147 [37,] 2.346290e-04 4.692580e-04 0.9997654 [38,] 1.744762e-04 3.489524e-04 0.9998255 [39,] 6.757467e-04 1.351493e-03 0.9993243 [40,] 4.738674e-04 9.477348e-04 0.9995261 [41,] 2.951499e-04 5.902997e-04 0.9997049 [42,] 1.878866e-04 3.757731e-04 0.9998121 [43,] 1.147291e-04 2.294582e-04 0.9998853 [44,] 6.928365e-05 1.385673e-04 0.9999307 [45,] 4.689887e-05 9.379775e-05 0.9999531 [46,] 7.361649e-05 1.472330e-04 0.9999264 [47,] 7.192979e-05 1.438596e-04 0.9999281 [48,] 4.873912e-05 9.747824e-05 0.9999513 [49,] 2.973923e-05 5.947845e-05 0.9999703 [50,] 1.376544e-04 2.753088e-04 0.9998623 [51,] 8.770933e-05 1.754187e-04 0.9999123 [52,] 5.535488e-05 1.107098e-04 0.9999446 [53,] 6.405375e-05 1.281075e-04 0.9999359 [54,] 7.316038e-05 1.463208e-04 0.9999268 [55,] 4.652460e-05 9.304921e-05 0.9999535 [56,] 3.119772e-05 6.239545e-05 0.9999688 [57,] 2.000460e-05 4.000920e-05 0.9999800 [58,] 1.241818e-05 2.483637e-05 0.9999876 [59,] 2.179788e-05 4.359576e-05 0.9999782 [60,] 2.233638e-05 4.467277e-05 0.9999777 [61,] 1.394045e-05 2.788089e-05 0.9999861 [62,] 8.815263e-06 1.763053e-05 0.9999912 [63,] 5.522700e-06 1.104540e-05 0.9999945 [64,] 1.768266e-05 3.536532e-05 0.9999823 [65,] 1.123971e-05 2.247942e-05 0.9999888 [66,] 7.361176e-06 1.472235e-05 0.9999926 [67,] 5.125806e-06 1.025161e-05 0.9999949 [68,] 3.362757e-06 6.725513e-06 0.9999966 [69,] 2.170991e-06 4.341983e-06 0.9999978 [70,] 1.594256e-06 3.188511e-06 0.9999984 [71,] 1.005385e-06 2.010770e-06 0.9999990 [72,] 7.333822e-07 1.466764e-06 0.9999993 [73,] 4.749682e-07 9.499364e-07 0.9999995 [74,] 2.984526e-07 5.969051e-07 0.9999997 [75,] 2.187484e-07 4.374968e-07 0.9999998 [76,] 2.472272e-07 4.944543e-07 0.9999998 [77,] 2.571256e-07 5.142512e-07 0.9999997 [78,] 1.886874e-07 3.773749e-07 0.9999998 [79,] 1.208995e-07 2.417990e-07 0.9999999 [80,] 1.253339e-07 2.506678e-07 0.9999999 [81,] 3.460115e-07 6.920229e-07 0.9999997 [82,] 6.569551e-07 1.313910e-06 0.9999993 [83,] 4.300573e-07 8.601145e-07 0.9999996 [84,] 4.119008e-07 8.238017e-07 0.9999996 [85,] 3.001070e-07 6.002140e-07 0.9999997 [86,] 2.341808e-07 4.683616e-07 0.9999998 [87,] 1.895175e-07 3.790351e-07 0.9999998 [88,] 3.139405e-07 6.278811e-07 0.9999997 [89,] 2.104821e-07 4.209641e-07 0.9999998 [90,] 2.149023e-07 4.298046e-07 0.9999998 [91,] 2.760198e-07 5.520396e-07 0.9999997 [92,] 1.821205e-07 3.642411e-07 0.9999998 [93,] 1.561514e-07 3.123028e-07 0.9999998 [94,] 1.079861e-07 2.159723e-07 0.9999999 [95,] 8.423426e-08 1.684685e-07 0.9999999 [96,] 1.010771e-07 2.021542e-07 0.9999999 [97,] 1.306738e-07 2.613477e-07 0.9999999 [98,] 2.384020e-07 4.768040e-07 0.9999998 [99,] 6.280154e-05 1.256031e-04 0.9999372 [100,] 6.895894e-05 1.379179e-04 0.9999310 [101,] 5.701012e-05 1.140202e-04 0.9999430 [102,] 8.454570e-05 1.690914e-04 0.9999155 [103,] 3.435521e-04 6.871043e-04 0.9996564 [104,] 4.478132e-03 8.956264e-03 0.9955219 [105,] 2.369665e-02 4.739330e-02 0.9763033 [106,] 6.514617e-02 1.302923e-01 0.9348538 [107,] 7.121323e-02 1.424265e-01 0.9287868 [108,] 1.272435e-01 2.544870e-01 0.8727565 [109,] 1.554367e-01 3.108734e-01 0.8445633 [110,] 1.721296e-01 3.442593e-01 0.8278704 [111,] 2.310247e-01 4.620494e-01 0.7689753 [112,] 2.404152e-01 4.808304e-01 0.7595848 [113,] 2.249283e-01 4.498565e-01 0.7750717 [114,] 2.093579e-01 4.187158e-01 0.7906421 [115,] 2.276387e-01 4.552775e-01 0.7723613 [116,] 2.174592e-01 4.349183e-01 0.7825408 [117,] 2.114292e-01 4.228584e-01 0.7885708 [118,] 1.966160e-01 3.932321e-01 0.8033840 [119,] 2.124167e-01 4.248333e-01 0.7875833 [120,] 1.923215e-01 3.846431e-01 0.8076785 [121,] 1.833363e-01 3.666727e-01 0.8166637 [122,] 1.669596e-01 3.339191e-01 0.8330404 [123,] 1.518077e-01 3.036153e-01 0.8481923 [124,] 1.844939e-01 3.689878e-01 0.8155061 [125,] 1.960322e-01 3.920644e-01 0.8039678 [126,] 2.158720e-01 4.317440e-01 0.7841280 [127,] 1.938718e-01 3.877436e-01 0.8061282 [128,] 1.730179e-01 3.460357e-01 0.8269821 [129,] 1.624859e-01 3.249719e-01 0.8375141 [130,] 1.430407e-01 2.860814e-01 0.8569593 [131,] 1.254805e-01 2.509611e-01 0.8745195 [132,] 1.109924e-01 2.219848e-01 0.8890076 [133,] 9.705053e-02 1.941011e-01 0.9029495 [134,] 8.609674e-02 1.721935e-01 0.9139033 [135,] 7.620513e-02 1.524103e-01 0.9237949 [136,] 6.513468e-02 1.302694e-01 0.9348653 [137,] 5.550916e-02 1.110183e-01 0.9444908 [138,] 5.386526e-02 1.077305e-01 0.9461347 [139,] 4.814572e-02 9.629145e-02 0.9518543 [140,] 4.007569e-02 8.015138e-02 0.9599243 [141,] 3.322262e-02 6.644525e-02 0.9667774 [142,] 2.752076e-02 5.504151e-02 0.9724792 [143,] 2.252589e-02 4.505178e-02 0.9774741 [144,] 2.084009e-02 4.168018e-02 0.9791599 [145,] 1.752041e-02 3.504081e-02 0.9824796 [146,] 1.486241e-02 2.972483e-02 0.9851376 [147,] 1.776778e-02 3.553555e-02 0.9822322 [148,] 1.457238e-02 2.914475e-02 0.9854276 [149,] 1.440311e-02 2.880621e-02 0.9855969 [150,] 1.519103e-02 3.038207e-02 0.9848090 [151,] 1.236052e-02 2.472103e-02 0.9876395 [152,] 1.513951e-02 3.027901e-02 0.9848605 [153,] 1.298333e-02 2.596665e-02 0.9870167 [154,] 1.141006e-02 2.282012e-02 0.9885899 [155,] 1.247377e-02 2.494754e-02 0.9875262 [156,] 1.022160e-02 2.044321e-02 0.9897784 [157,] 8.096069e-03 1.619214e-02 0.9919039 [158,] 6.352943e-03 1.270589e-02 0.9936471 [159,] 5.176806e-03 1.035361e-02 0.9948232 [160,] 4.799084e-03 9.598169e-03 0.9952009 [161,] 5.687563e-03 1.137513e-02 0.9943124 [162,] 5.506430e-03 1.101286e-02 0.9944936 [163,] 5.041016e-03 1.008203e-02 0.9949590 [164,] 1.973602e-02 3.947204e-02 0.9802640 [165,] 1.584429e-02 3.168858e-02 0.9841557 [166,] 1.424414e-02 2.848828e-02 0.9857559 [167,] 2.251110e-02 4.502219e-02 0.9774889 [168,] 2.447183e-02 4.894367e-02 0.9755282 [169,] 1.991161e-02 3.982321e-02 0.9800884 [170,] 2.116869e-02 4.233737e-02 0.9788313 [171,] 3.073110e-02 6.146220e-02 0.9692689 [172,] 3.973864e-02 7.947728e-02 0.9602614 [173,] 3.366983e-02 6.733965e-02 0.9663302 [174,] 3.229262e-02 6.458524e-02 0.9677074 [175,] 3.061673e-02 6.123346e-02 0.9693833 [176,] 2.495133e-02 4.990265e-02 0.9750487 [177,] 2.331143e-02 4.662286e-02 0.9766886 [178,] 1.865218e-02 3.730436e-02 0.9813478 [179,] 1.802222e-02 3.604443e-02 0.9819778 [180,] 1.429831e-02 2.859661e-02 0.9857017 [181,] 1.129133e-02 2.258266e-02 0.9887087 [182,] 1.952447e-02 3.904894e-02 0.9804755 [183,] 1.581300e-02 3.162599e-02 0.9841870 [184,] 1.881794e-02 3.763588e-02 0.9811821 [185,] 1.538016e-02 3.076032e-02 0.9846198 [186,] 1.818145e-02 3.636291e-02 0.9818185 [187,] 1.450389e-02 2.900779e-02 0.9854961 [188,] 1.277757e-02 2.555515e-02 0.9872224 [189,] 1.365975e-02 2.731950e-02 0.9863402 [190,] 1.291051e-02 2.582102e-02 0.9870895 [191,] 1.857079e-02 3.714157e-02 0.9814292 [192,] 1.478708e-02 2.957416e-02 0.9852129 [193,] 1.154551e-02 2.309102e-02 0.9884545 [194,] 1.194524e-02 2.389048e-02 0.9880548 [195,] 9.284685e-03 1.856937e-02 0.9907153 [196,] 7.570522e-03 1.514104e-02 0.9924295 [197,] 8.182043e-03 1.636409e-02 0.9918180 [198,] 6.245759e-03 1.249152e-02 0.9937542 [199,] 5.288049e-03 1.057610e-02 0.9947120 [200,] 5.217330e-03 1.043466e-02 0.9947827 [201,] 4.349997e-03 8.699995e-03 0.9956500 [202,] 5.017458e-03 1.003492e-02 0.9949825 [203,] 6.425156e-03 1.285031e-02 0.9935748 [204,] 7.267165e-03 1.453433e-02 0.9927328 [205,] 5.653017e-03 1.130603e-02 0.9943470 [206,] 4.254542e-03 8.509084e-03 0.9957455 [207,] 1.377308e-02 2.754617e-02 0.9862269 [208,] 1.317193e-02 2.634385e-02 0.9868281 [209,] 1.079916e-02 2.159833e-02 0.9892008 [210,] 9.169863e-03 1.833973e-02 0.9908301 [211,] 7.697135e-03 1.539427e-02 0.9923029 [212,] 6.028878e-03 1.205776e-02 0.9939711 [213,] 9.571940e-03 1.914388e-02 0.9904281 [214,] 2.791577e-02 5.583153e-02 0.9720842 [215,] 2.264169e-02 4.528338e-02 0.9773583 [216,] 3.318587e-01 6.637173e-01 0.6681413 [217,] 2.903373e-01 5.806746e-01 0.7096627 [218,] 3.980105e-01 7.960210e-01 0.6019895 [219,] 3.600232e-01 7.200463e-01 0.6399768 [220,] 3.241721e-01 6.483442e-01 0.6758279 [221,] 5.266373e-01 9.467255e-01 0.4733627 [222,] 4.871858e-01 9.743717e-01 0.5128142 [223,] 4.418201e-01 8.836402e-01 0.5581799 [224,] 4.481864e-01 8.963729e-01 0.5518136 [225,] 4.115536e-01 8.231073e-01 0.5884464 [226,] 4.052997e-01 8.105994e-01 0.5947003 [227,] 5.180264e-01 9.639471e-01 0.4819736 [228,] 5.168982e-01 9.662036e-01 0.4831018 [229,] 5.361728e-01 9.276544e-01 0.4638272 [230,] 4.857659e-01 9.715319e-01 0.5142341 [231,] 4.504181e-01 9.008362e-01 0.5495819 [232,] 4.626079e-01 9.252158e-01 0.5373921 [233,] 4.970186e-01 9.940371e-01 0.5029814 [234,] 4.397411e-01 8.794822e-01 0.5602589 [235,] 3.926355e-01 7.852710e-01 0.6073645 [236,] 3.418764e-01 6.837528e-01 0.6581236 [237,] 2.881064e-01 5.762128e-01 0.7118936 [238,] 2.670699e-01 5.341397e-01 0.7329301 [239,] 2.966278e-01 5.932556e-01 0.7033722 [240,] 3.097301e-01 6.194602e-01 0.6902699 [241,] 2.685302e-01 5.370605e-01 0.7314698 [242,] 2.154039e-01 4.308078e-01 0.7845961 [243,] 1.830084e-01 3.660167e-01 0.8169916 [244,] 1.603908e-01 3.207816e-01 0.8396092 [245,] 3.825956e-01 7.651913e-01 0.6174044 [246,] 3.142622e-01 6.285243e-01 0.6857378 [247,] 3.647567e-01 7.295135e-01 0.6352433 [248,] 6.497310e-01 7.005381e-01 0.3502690 [249,] 6.855050e-01 6.289901e-01 0.3144950 [250,] 6.510940e-01 6.978120e-01 0.3489060 [251,] 6.461033e-01 7.077935e-01 0.3538967 [252,] 5.854496e-01 8.291008e-01 0.4145504 [253,] 5.094012e-01 9.811975e-01 0.4905988 [254,] 4.206201e-01 8.412402e-01 0.5793799 [255,] 4.751859e-01 9.503718e-01 0.5248141 [256,] 5.104080e-01 9.791841e-01 0.4895920 > postscript(file="/var/wessaorg/rcomp/tmp/137kf1358279783.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/2snkd1358279783.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/3lcxf1358279783.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/4dg171358279783.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/5h8do1358279783.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 = 269 Frequency = 1 1 2 3 4 5 6 -38.0083890 -51.0915954 -10.6383821 0.3993689 -12.7174589 0.9429941 7 8 9 10 11 12 -11.7777385 -14.2553385 32.4617486 3.6032050 -39.0648667 -14.0096924 13 14 15 16 17 18 12.1146685 -7.1455596 11.5544318 18.4919665 0.3468645 -18.7719072 19 20 21 22 23 24 21.6488168 -0.1570659 -11.0946006 -17.8612726 11.5827060 -10.5685551 25 26 27 28 29 30 10.7731777 -3.5985310 17.1448864 22.7432018 -1.3455939 -6.5268308 31 32 33 34 35 36 -24.4117047 2.1241453 15.8938931 -10.4551307 22.7751215 -12.3663350 37 38 39 40 41 42 -4.9982718 18.2448607 19.9846326 33.6129239 11.0997587 -13.4397369 43 44 45 46 47 48 -5.1831543 16.1787499 46.3165609 20.3790262 8.9448522 2.9185218 49 50 51 52 53 54 10.1751044 8.2639001 -2.9400217 38.9148762 -12.4041717 16.8524109 55 56 57 58 59 60 13.0563327 -35.4041717 13.8224350 2.5033871 33.0129068 -13.8719671 61 62 63 64 65 66 7.9431504 3.8016939 17.5677962 12.9658353 -21.7512517 29.5053309 67 68 69 70 71 72 9.5543461 14.6168114 13.8733940 -28.0775907 10.8336136 16.4092441 73 74 75 76 77 78 19.3431333 18.4055986 15.9450942 -2.4927254 13.7375268 -8.0193406 79 80 81 82 83 84 17.1319204 2.5562899 23.6187552 -13.4210252 27.5128639 24.6377945 85 86 87 88 89 90 9.8809271 -5.6585685 -23.8888207 -17.8924662 7.9526272 -14.6230033 91 92 93 94 95 96 -2.3039554 20.9489817 -2.6793096 -27.2947205 8.9092013 -13.8605465 97 98 99 100 101 102 -18.3737117 -1.9493422 18.6753035 1.5601774 12.2772644 -12.6339399 103 104 105 106 107 108 25.3226342 -22.5132245 -79.2829723 -22.7869026 -4.1586113 21.3245779 109 110 111 112 113 114 30.9791996 -75.6659452 -77.8735126 -75.3639929 -48.2682177 -74.7476908 115 116 117 118 119 120 -15.7757229 -11.0639832 25.9885919 16.5771028 4.1546771 4.2361817 121 122 123 124 125 126 -29.2585138 15.2700452 21.0226974 -10.0170830 -25.1431457 4.2450888 127 128 129 130 131 132 -7.8675238 -7.2851719 12.2660720 43.1473003 -24.4546606 39.3739070 133 134 135 136 137 138 0.1038744 10.9887483 23.8699766 0.8301962 3.7512050 -0.9695275 139 140 141 142 143 144 14.7965747 -9.2493647 17.6453137 11.0433528 5.8817249 30.2436291 145 146 147 148 149 150 -5.9241578 6.5492270 8.9834010 11.0226117 3.9663054 29.0287707 151 152 153 154 155 156 18.6172816 19.6662968 -26.4751597 15.0380055 -15.5278205 34.9228794 157 158 159 160 161 162 -0.8205380 -28.7942076 -6.4524748 23.4587295 -23.3998140 -1.5676009 163 164 165 166 167 168 10.2083059 9.2609667 -5.5810509 30.1948558 39.7606818 -15.8939399 169 170 171 172 173 174 29.4514384 -59.5846965 10.2836516 27.1287450 -36.4732159 -18.0690178 175 176 177 178 179 180 2.8323820 -17.2729396 48.6284602 -30.0524919 19.8024060 -8.5331677 181 182 183 184 185 186 28.7662711 12.7136103 28.7399407 6.8813972 31.7362952 9.1343343 187 188 189 190 191 192 12.7987605 -32.2539003 3.2231300 -19.0634285 3.2458149 50.6273281 193 194 195 196 197 198 13.9592564 24.8343257 33.1399236 -19.7186199 -34.5146981 0.1362781 199 200 201 202 203 204 11.3138695 -17.2880914 2.3928607 18.9060259 28.2415997 4.9550411 205 206 207 208 209 210 11.5208671 -28.4791329 19.5796869 42.7309479 -26.8710130 -30.1374001 211 212 213 214 215 216 7.1681978 18.4443894 -49.3124780 -12.0558954 10.4474652 24.1118915 217 218 219 220 221 222 5.7303782 10.8914438 -39.6051956 -42.0332106 22.1345763 106.3911589 223 224 225 226 227 228 4.6477415 -40.6088411 -19.2469369 -19.8752282 50.9796698 21.6802309 229 230 231 232 233 234 27.9858288 1.0550154 -3.0766365 -19.0503061 42.7421265 -40.5769214 235 236 237 238 239 240 -27.5144561 25.5480092 -27.2052127 -42.7844887 35.2516462 -1.4654408 241 242 243 244 245 246 -15.8144646 -17.1598429 2.0440789 -21.6993385 35.7611659 -40.4562060 247 248 249 250 251 252 -16.4200711 -1.6802992 10.6026138 9.9082117 41.7667552 -22.3747013 253 254 255 256 257 258 -49.3747013 32.5328574 -46.3654665 -35.7898360 -38.9086076 -0.2576315 259 260 261 262 263 264 -14.1786403 -30.9783640 16.1630925 -38.9520336 -42.7481118 7.2384382 265 266 267 268 269 -24.0481204 -3.3934987 -15.5122703 -2.0254355 -39.6481375 > postscript(file="/var/wessaorg/rcomp/tmp/6o3w81358279783.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 = 269 Frequency = 1 lag(myerror, k = 1) myerror 0 -38.0083890 NA 1 -51.0915954 -38.0083890 2 -10.6383821 -51.0915954 3 0.3993689 -10.6383821 4 -12.7174589 0.3993689 5 0.9429941 -12.7174589 6 -11.7777385 0.9429941 7 -14.2553385 -11.7777385 8 32.4617486 -14.2553385 9 3.6032050 32.4617486 10 -39.0648667 3.6032050 11 -14.0096924 -39.0648667 12 12.1146685 -14.0096924 13 -7.1455596 12.1146685 14 11.5544318 -7.1455596 15 18.4919665 11.5544318 16 0.3468645 18.4919665 17 -18.7719072 0.3468645 18 21.6488168 -18.7719072 19 -0.1570659 21.6488168 20 -11.0946006 -0.1570659 21 -17.8612726 -11.0946006 22 11.5827060 -17.8612726 23 -10.5685551 11.5827060 24 10.7731777 -10.5685551 25 -3.5985310 10.7731777 26 17.1448864 -3.5985310 27 22.7432018 17.1448864 28 -1.3455939 22.7432018 29 -6.5268308 -1.3455939 30 -24.4117047 -6.5268308 31 2.1241453 -24.4117047 32 15.8938931 2.1241453 33 -10.4551307 15.8938931 34 22.7751215 -10.4551307 35 -12.3663350 22.7751215 36 -4.9982718 -12.3663350 37 18.2448607 -4.9982718 38 19.9846326 18.2448607 39 33.6129239 19.9846326 40 11.0997587 33.6129239 41 -13.4397369 11.0997587 42 -5.1831543 -13.4397369 43 16.1787499 -5.1831543 44 46.3165609 16.1787499 45 20.3790262 46.3165609 46 8.9448522 20.3790262 47 2.9185218 8.9448522 48 10.1751044 2.9185218 49 8.2639001 10.1751044 50 -2.9400217 8.2639001 51 38.9148762 -2.9400217 52 -12.4041717 38.9148762 53 16.8524109 -12.4041717 54 13.0563327 16.8524109 55 -35.4041717 13.0563327 56 13.8224350 -35.4041717 57 2.5033871 13.8224350 58 33.0129068 2.5033871 59 -13.8719671 33.0129068 60 7.9431504 -13.8719671 61 3.8016939 7.9431504 62 17.5677962 3.8016939 63 12.9658353 17.5677962 64 -21.7512517 12.9658353 65 29.5053309 -21.7512517 66 9.5543461 29.5053309 67 14.6168114 9.5543461 68 13.8733940 14.6168114 69 -28.0775907 13.8733940 70 10.8336136 -28.0775907 71 16.4092441 10.8336136 72 19.3431333 16.4092441 73 18.4055986 19.3431333 74 15.9450942 18.4055986 75 -2.4927254 15.9450942 76 13.7375268 -2.4927254 77 -8.0193406 13.7375268 78 17.1319204 -8.0193406 79 2.5562899 17.1319204 80 23.6187552 2.5562899 81 -13.4210252 23.6187552 82 27.5128639 -13.4210252 83 24.6377945 27.5128639 84 9.8809271 24.6377945 85 -5.6585685 9.8809271 86 -23.8888207 -5.6585685 87 -17.8924662 -23.8888207 88 7.9526272 -17.8924662 89 -14.6230033 7.9526272 90 -2.3039554 -14.6230033 91 20.9489817 -2.3039554 92 -2.6793096 20.9489817 93 -27.2947205 -2.6793096 94 8.9092013 -27.2947205 95 -13.8605465 8.9092013 96 -18.3737117 -13.8605465 97 -1.9493422 -18.3737117 98 18.6753035 -1.9493422 99 1.5601774 18.6753035 100 12.2772644 1.5601774 101 -12.6339399 12.2772644 102 25.3226342 -12.6339399 103 -22.5132245 25.3226342 104 -79.2829723 -22.5132245 105 -22.7869026 -79.2829723 106 -4.1586113 -22.7869026 107 21.3245779 -4.1586113 108 30.9791996 21.3245779 109 -75.6659452 30.9791996 110 -77.8735126 -75.6659452 111 -75.3639929 -77.8735126 112 -48.2682177 -75.3639929 113 -74.7476908 -48.2682177 114 -15.7757229 -74.7476908 115 -11.0639832 -15.7757229 116 25.9885919 -11.0639832 117 16.5771028 25.9885919 118 4.1546771 16.5771028 119 4.2361817 4.1546771 120 -29.2585138 4.2361817 121 15.2700452 -29.2585138 122 21.0226974 15.2700452 123 -10.0170830 21.0226974 124 -25.1431457 -10.0170830 125 4.2450888 -25.1431457 126 -7.8675238 4.2450888 127 -7.2851719 -7.8675238 128 12.2660720 -7.2851719 129 43.1473003 12.2660720 130 -24.4546606 43.1473003 131 39.3739070 -24.4546606 132 0.1038744 39.3739070 133 10.9887483 0.1038744 134 23.8699766 10.9887483 135 0.8301962 23.8699766 136 3.7512050 0.8301962 137 -0.9695275 3.7512050 138 14.7965747 -0.9695275 139 -9.2493647 14.7965747 140 17.6453137 -9.2493647 141 11.0433528 17.6453137 142 5.8817249 11.0433528 143 30.2436291 5.8817249 144 -5.9241578 30.2436291 145 6.5492270 -5.9241578 146 8.9834010 6.5492270 147 11.0226117 8.9834010 148 3.9663054 11.0226117 149 29.0287707 3.9663054 150 18.6172816 29.0287707 151 19.6662968 18.6172816 152 -26.4751597 19.6662968 153 15.0380055 -26.4751597 154 -15.5278205 15.0380055 155 34.9228794 -15.5278205 156 -0.8205380 34.9228794 157 -28.7942076 -0.8205380 158 -6.4524748 -28.7942076 159 23.4587295 -6.4524748 160 -23.3998140 23.4587295 161 -1.5676009 -23.3998140 162 10.2083059 -1.5676009 163 9.2609667 10.2083059 164 -5.5810509 9.2609667 165 30.1948558 -5.5810509 166 39.7606818 30.1948558 167 -15.8939399 39.7606818 168 29.4514384 -15.8939399 169 -59.5846965 29.4514384 170 10.2836516 -59.5846965 171 27.1287450 10.2836516 172 -36.4732159 27.1287450 173 -18.0690178 -36.4732159 174 2.8323820 -18.0690178 175 -17.2729396 2.8323820 176 48.6284602 -17.2729396 177 -30.0524919 48.6284602 178 19.8024060 -30.0524919 179 -8.5331677 19.8024060 180 28.7662711 -8.5331677 181 12.7136103 28.7662711 182 28.7399407 12.7136103 183 6.8813972 28.7399407 184 31.7362952 6.8813972 185 9.1343343 31.7362952 186 12.7987605 9.1343343 187 -32.2539003 12.7987605 188 3.2231300 -32.2539003 189 -19.0634285 3.2231300 190 3.2458149 -19.0634285 191 50.6273281 3.2458149 192 13.9592564 50.6273281 193 24.8343257 13.9592564 194 33.1399236 24.8343257 195 -19.7186199 33.1399236 196 -34.5146981 -19.7186199 197 0.1362781 -34.5146981 198 11.3138695 0.1362781 199 -17.2880914 11.3138695 200 2.3928607 -17.2880914 201 18.9060259 2.3928607 202 28.2415997 18.9060259 203 4.9550411 28.2415997 204 11.5208671 4.9550411 205 -28.4791329 11.5208671 206 19.5796869 -28.4791329 207 42.7309479 19.5796869 208 -26.8710130 42.7309479 209 -30.1374001 -26.8710130 210 7.1681978 -30.1374001 211 18.4443894 7.1681978 212 -49.3124780 18.4443894 213 -12.0558954 -49.3124780 214 10.4474652 -12.0558954 215 24.1118915 10.4474652 216 5.7303782 24.1118915 217 10.8914438 5.7303782 218 -39.6051956 10.8914438 219 -42.0332106 -39.6051956 220 22.1345763 -42.0332106 221 106.3911589 22.1345763 222 4.6477415 106.3911589 223 -40.6088411 4.6477415 224 -19.2469369 -40.6088411 225 -19.8752282 -19.2469369 226 50.9796698 -19.8752282 227 21.6802309 50.9796698 228 27.9858288 21.6802309 229 1.0550154 27.9858288 230 -3.0766365 1.0550154 231 -19.0503061 -3.0766365 232 42.7421265 -19.0503061 233 -40.5769214 42.7421265 234 -27.5144561 -40.5769214 235 25.5480092 -27.5144561 236 -27.2052127 25.5480092 237 -42.7844887 -27.2052127 238 35.2516462 -42.7844887 239 -1.4654408 35.2516462 240 -15.8144646 -1.4654408 241 -17.1598429 -15.8144646 242 2.0440789 -17.1598429 243 -21.6993385 2.0440789 244 35.7611659 -21.6993385 245 -40.4562060 35.7611659 246 -16.4200711 -40.4562060 247 -1.6802992 -16.4200711 248 10.6026138 -1.6802992 249 9.9082117 10.6026138 250 41.7667552 9.9082117 251 -22.3747013 41.7667552 252 -49.3747013 -22.3747013 253 32.5328574 -49.3747013 254 -46.3654665 32.5328574 255 -35.7898360 -46.3654665 256 -38.9086076 -35.7898360 257 -0.2576315 -38.9086076 258 -14.1786403 -0.2576315 259 -30.9783640 -14.1786403 260 16.1630925 -30.9783640 261 -38.9520336 16.1630925 262 -42.7481118 -38.9520336 263 7.2384382 -42.7481118 264 -24.0481204 7.2384382 265 -3.3934987 -24.0481204 266 -15.5122703 -3.3934987 267 -2.0254355 -15.5122703 268 -39.6481375 -2.0254355 269 NA -39.6481375 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -51.0915954 -38.0083890 [2,] -10.6383821 -51.0915954 [3,] 0.3993689 -10.6383821 [4,] -12.7174589 0.3993689 [5,] 0.9429941 -12.7174589 [6,] -11.7777385 0.9429941 [7,] -14.2553385 -11.7777385 [8,] 32.4617486 -14.2553385 [9,] 3.6032050 32.4617486 [10,] -39.0648667 3.6032050 [11,] -14.0096924 -39.0648667 [12,] 12.1146685 -14.0096924 [13,] -7.1455596 12.1146685 [14,] 11.5544318 -7.1455596 [15,] 18.4919665 11.5544318 [16,] 0.3468645 18.4919665 [17,] -18.7719072 0.3468645 [18,] 21.6488168 -18.7719072 [19,] -0.1570659 21.6488168 [20,] -11.0946006 -0.1570659 [21,] -17.8612726 -11.0946006 [22,] 11.5827060 -17.8612726 [23,] -10.5685551 11.5827060 [24,] 10.7731777 -10.5685551 [25,] -3.5985310 10.7731777 [26,] 17.1448864 -3.5985310 [27,] 22.7432018 17.1448864 [28,] -1.3455939 22.7432018 [29,] -6.5268308 -1.3455939 [30,] -24.4117047 -6.5268308 [31,] 2.1241453 -24.4117047 [32,] 15.8938931 2.1241453 [33,] -10.4551307 15.8938931 [34,] 22.7751215 -10.4551307 [35,] -12.3663350 22.7751215 [36,] -4.9982718 -12.3663350 [37,] 18.2448607 -4.9982718 [38,] 19.9846326 18.2448607 [39,] 33.6129239 19.9846326 [40,] 11.0997587 33.6129239 [41,] -13.4397369 11.0997587 [42,] -5.1831543 -13.4397369 [43,] 16.1787499 -5.1831543 [44,] 46.3165609 16.1787499 [45,] 20.3790262 46.3165609 [46,] 8.9448522 20.3790262 [47,] 2.9185218 8.9448522 [48,] 10.1751044 2.9185218 [49,] 8.2639001 10.1751044 [50,] -2.9400217 8.2639001 [51,] 38.9148762 -2.9400217 [52,] -12.4041717 38.9148762 [53,] 16.8524109 -12.4041717 [54,] 13.0563327 16.8524109 [55,] -35.4041717 13.0563327 [56,] 13.8224350 -35.4041717 [57,] 2.5033871 13.8224350 [58,] 33.0129068 2.5033871 [59,] -13.8719671 33.0129068 [60,] 7.9431504 -13.8719671 [61,] 3.8016939 7.9431504 [62,] 17.5677962 3.8016939 [63,] 12.9658353 17.5677962 [64,] -21.7512517 12.9658353 [65,] 29.5053309 -21.7512517 [66,] 9.5543461 29.5053309 [67,] 14.6168114 9.5543461 [68,] 13.8733940 14.6168114 [69,] -28.0775907 13.8733940 [70,] 10.8336136 -28.0775907 [71,] 16.4092441 10.8336136 [72,] 19.3431333 16.4092441 [73,] 18.4055986 19.3431333 [74,] 15.9450942 18.4055986 [75,] -2.4927254 15.9450942 [76,] 13.7375268 -2.4927254 [77,] -8.0193406 13.7375268 [78,] 17.1319204 -8.0193406 [79,] 2.5562899 17.1319204 [80,] 23.6187552 2.5562899 [81,] -13.4210252 23.6187552 [82,] 27.5128639 -13.4210252 [83,] 24.6377945 27.5128639 [84,] 9.8809271 24.6377945 [85,] -5.6585685 9.8809271 [86,] -23.8888207 -5.6585685 [87,] -17.8924662 -23.8888207 [88,] 7.9526272 -17.8924662 [89,] -14.6230033 7.9526272 [90,] -2.3039554 -14.6230033 [91,] 20.9489817 -2.3039554 [92,] -2.6793096 20.9489817 [93,] -27.2947205 -2.6793096 [94,] 8.9092013 -27.2947205 [95,] -13.8605465 8.9092013 [96,] -18.3737117 -13.8605465 [97,] -1.9493422 -18.3737117 [98,] 18.6753035 -1.9493422 [99,] 1.5601774 18.6753035 [100,] 12.2772644 1.5601774 [101,] -12.6339399 12.2772644 [102,] 25.3226342 -12.6339399 [103,] -22.5132245 25.3226342 [104,] -79.2829723 -22.5132245 [105,] -22.7869026 -79.2829723 [106,] -4.1586113 -22.7869026 [107,] 21.3245779 -4.1586113 [108,] 30.9791996 21.3245779 [109,] -75.6659452 30.9791996 [110,] -77.8735126 -75.6659452 [111,] -75.3639929 -77.8735126 [112,] -48.2682177 -75.3639929 [113,] -74.7476908 -48.2682177 [114,] -15.7757229 -74.7476908 [115,] -11.0639832 -15.7757229 [116,] 25.9885919 -11.0639832 [117,] 16.5771028 25.9885919 [118,] 4.1546771 16.5771028 [119,] 4.2361817 4.1546771 [120,] -29.2585138 4.2361817 [121,] 15.2700452 -29.2585138 [122,] 21.0226974 15.2700452 [123,] -10.0170830 21.0226974 [124,] -25.1431457 -10.0170830 [125,] 4.2450888 -25.1431457 [126,] -7.8675238 4.2450888 [127,] -7.2851719 -7.8675238 [128,] 12.2660720 -7.2851719 [129,] 43.1473003 12.2660720 [130,] -24.4546606 43.1473003 [131,] 39.3739070 -24.4546606 [132,] 0.1038744 39.3739070 [133,] 10.9887483 0.1038744 [134,] 23.8699766 10.9887483 [135,] 0.8301962 23.8699766 [136,] 3.7512050 0.8301962 [137,] -0.9695275 3.7512050 [138,] 14.7965747 -0.9695275 [139,] -9.2493647 14.7965747 [140,] 17.6453137 -9.2493647 [141,] 11.0433528 17.6453137 [142,] 5.8817249 11.0433528 [143,] 30.2436291 5.8817249 [144,] -5.9241578 30.2436291 [145,] 6.5492270 -5.9241578 [146,] 8.9834010 6.5492270 [147,] 11.0226117 8.9834010 [148,] 3.9663054 11.0226117 [149,] 29.0287707 3.9663054 [150,] 18.6172816 29.0287707 [151,] 19.6662968 18.6172816 [152,] -26.4751597 19.6662968 [153,] 15.0380055 -26.4751597 [154,] -15.5278205 15.0380055 [155,] 34.9228794 -15.5278205 [156,] -0.8205380 34.9228794 [157,] -28.7942076 -0.8205380 [158,] -6.4524748 -28.7942076 [159,] 23.4587295 -6.4524748 [160,] -23.3998140 23.4587295 [161,] -1.5676009 -23.3998140 [162,] 10.2083059 -1.5676009 [163,] 9.2609667 10.2083059 [164,] -5.5810509 9.2609667 [165,] 30.1948558 -5.5810509 [166,] 39.7606818 30.1948558 [167,] -15.8939399 39.7606818 [168,] 29.4514384 -15.8939399 [169,] -59.5846965 29.4514384 [170,] 10.2836516 -59.5846965 [171,] 27.1287450 10.2836516 [172,] -36.4732159 27.1287450 [173,] -18.0690178 -36.4732159 [174,] 2.8323820 -18.0690178 [175,] -17.2729396 2.8323820 [176,] 48.6284602 -17.2729396 [177,] -30.0524919 48.6284602 [178,] 19.8024060 -30.0524919 [179,] -8.5331677 19.8024060 [180,] 28.7662711 -8.5331677 [181,] 12.7136103 28.7662711 [182,] 28.7399407 12.7136103 [183,] 6.8813972 28.7399407 [184,] 31.7362952 6.8813972 [185,] 9.1343343 31.7362952 [186,] 12.7987605 9.1343343 [187,] -32.2539003 12.7987605 [188,] 3.2231300 -32.2539003 [189,] -19.0634285 3.2231300 [190,] 3.2458149 -19.0634285 [191,] 50.6273281 3.2458149 [192,] 13.9592564 50.6273281 [193,] 24.8343257 13.9592564 [194,] 33.1399236 24.8343257 [195,] -19.7186199 33.1399236 [196,] -34.5146981 -19.7186199 [197,] 0.1362781 -34.5146981 [198,] 11.3138695 0.1362781 [199,] -17.2880914 11.3138695 [200,] 2.3928607 -17.2880914 [201,] 18.9060259 2.3928607 [202,] 28.2415997 18.9060259 [203,] 4.9550411 28.2415997 [204,] 11.5208671 4.9550411 [205,] -28.4791329 11.5208671 [206,] 19.5796869 -28.4791329 [207,] 42.7309479 19.5796869 [208,] -26.8710130 42.7309479 [209,] -30.1374001 -26.8710130 [210,] 7.1681978 -30.1374001 [211,] 18.4443894 7.1681978 [212,] -49.3124780 18.4443894 [213,] -12.0558954 -49.3124780 [214,] 10.4474652 -12.0558954 [215,] 24.1118915 10.4474652 [216,] 5.7303782 24.1118915 [217,] 10.8914438 5.7303782 [218,] -39.6051956 10.8914438 [219,] -42.0332106 -39.6051956 [220,] 22.1345763 -42.0332106 [221,] 106.3911589 22.1345763 [222,] 4.6477415 106.3911589 [223,] -40.6088411 4.6477415 [224,] -19.2469369 -40.6088411 [225,] -19.8752282 -19.2469369 [226,] 50.9796698 -19.8752282 [227,] 21.6802309 50.9796698 [228,] 27.9858288 21.6802309 [229,] 1.0550154 27.9858288 [230,] -3.0766365 1.0550154 [231,] -19.0503061 -3.0766365 [232,] 42.7421265 -19.0503061 [233,] -40.5769214 42.7421265 [234,] -27.5144561 -40.5769214 [235,] 25.5480092 -27.5144561 [236,] -27.2052127 25.5480092 [237,] -42.7844887 -27.2052127 [238,] 35.2516462 -42.7844887 [239,] -1.4654408 35.2516462 [240,] -15.8144646 -1.4654408 [241,] -17.1598429 -15.8144646 [242,] 2.0440789 -17.1598429 [243,] -21.6993385 2.0440789 [244,] 35.7611659 -21.6993385 [245,] -40.4562060 35.7611659 [246,] -16.4200711 -40.4562060 [247,] -1.6802992 -16.4200711 [248,] 10.6026138 -1.6802992 [249,] 9.9082117 10.6026138 [250,] 41.7667552 9.9082117 [251,] -22.3747013 41.7667552 [252,] -49.3747013 -22.3747013 [253,] 32.5328574 -49.3747013 [254,] -46.3654665 32.5328574 [255,] -35.7898360 -46.3654665 [256,] -38.9086076 -35.7898360 [257,] -0.2576315 -38.9086076 [258,] -14.1786403 -0.2576315 [259,] -30.9783640 -14.1786403 [260,] 16.1630925 -30.9783640 [261,] -38.9520336 16.1630925 [262,] -42.7481118 -38.9520336 [263,] 7.2384382 -42.7481118 [264,] -24.0481204 7.2384382 [265,] -3.3934987 -24.0481204 [266,] -15.5122703 -3.3934987 [267,] -2.0254355 -15.5122703 [268,] -39.6481375 -2.0254355 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -51.0915954 -38.0083890 2 -10.6383821 -51.0915954 3 0.3993689 -10.6383821 4 -12.7174589 0.3993689 5 0.9429941 -12.7174589 6 -11.7777385 0.9429941 7 -14.2553385 -11.7777385 8 32.4617486 -14.2553385 9 3.6032050 32.4617486 10 -39.0648667 3.6032050 11 -14.0096924 -39.0648667 12 12.1146685 -14.0096924 13 -7.1455596 12.1146685 14 11.5544318 -7.1455596 15 18.4919665 11.5544318 16 0.3468645 18.4919665 17 -18.7719072 0.3468645 18 21.6488168 -18.7719072 19 -0.1570659 21.6488168 20 -11.0946006 -0.1570659 21 -17.8612726 -11.0946006 22 11.5827060 -17.8612726 23 -10.5685551 11.5827060 24 10.7731777 -10.5685551 25 -3.5985310 10.7731777 26 17.1448864 -3.5985310 27 22.7432018 17.1448864 28 -1.3455939 22.7432018 29 -6.5268308 -1.3455939 30 -24.4117047 -6.5268308 31 2.1241453 -24.4117047 32 15.8938931 2.1241453 33 -10.4551307 15.8938931 34 22.7751215 -10.4551307 35 -12.3663350 22.7751215 36 -4.9982718 -12.3663350 37 18.2448607 -4.9982718 38 19.9846326 18.2448607 39 33.6129239 19.9846326 40 11.0997587 33.6129239 41 -13.4397369 11.0997587 42 -5.1831543 -13.4397369 43 16.1787499 -5.1831543 44 46.3165609 16.1787499 45 20.3790262 46.3165609 46 8.9448522 20.3790262 47 2.9185218 8.9448522 48 10.1751044 2.9185218 49 8.2639001 10.1751044 50 -2.9400217 8.2639001 51 38.9148762 -2.9400217 52 -12.4041717 38.9148762 53 16.8524109 -12.4041717 54 13.0563327 16.8524109 55 -35.4041717 13.0563327 56 13.8224350 -35.4041717 57 2.5033871 13.8224350 58 33.0129068 2.5033871 59 -13.8719671 33.0129068 60 7.9431504 -13.8719671 61 3.8016939 7.9431504 62 17.5677962 3.8016939 63 12.9658353 17.5677962 64 -21.7512517 12.9658353 65 29.5053309 -21.7512517 66 9.5543461 29.5053309 67 14.6168114 9.5543461 68 13.8733940 14.6168114 69 -28.0775907 13.8733940 70 10.8336136 -28.0775907 71 16.4092441 10.8336136 72 19.3431333 16.4092441 73 18.4055986 19.3431333 74 15.9450942 18.4055986 75 -2.4927254 15.9450942 76 13.7375268 -2.4927254 77 -8.0193406 13.7375268 78 17.1319204 -8.0193406 79 2.5562899 17.1319204 80 23.6187552 2.5562899 81 -13.4210252 23.6187552 82 27.5128639 -13.4210252 83 24.6377945 27.5128639 84 9.8809271 24.6377945 85 -5.6585685 9.8809271 86 -23.8888207 -5.6585685 87 -17.8924662 -23.8888207 88 7.9526272 -17.8924662 89 -14.6230033 7.9526272 90 -2.3039554 -14.6230033 91 20.9489817 -2.3039554 92 -2.6793096 20.9489817 93 -27.2947205 -2.6793096 94 8.9092013 -27.2947205 95 -13.8605465 8.9092013 96 -18.3737117 -13.8605465 97 -1.9493422 -18.3737117 98 18.6753035 -1.9493422 99 1.5601774 18.6753035 100 12.2772644 1.5601774 101 -12.6339399 12.2772644 102 25.3226342 -12.6339399 103 -22.5132245 25.3226342 104 -79.2829723 -22.5132245 105 -22.7869026 -79.2829723 106 -4.1586113 -22.7869026 107 21.3245779 -4.1586113 108 30.9791996 21.3245779 109 -75.6659452 30.9791996 110 -77.8735126 -75.6659452 111 -75.3639929 -77.8735126 112 -48.2682177 -75.3639929 113 -74.7476908 -48.2682177 114 -15.7757229 -74.7476908 115 -11.0639832 -15.7757229 116 25.9885919 -11.0639832 117 16.5771028 25.9885919 118 4.1546771 16.5771028 119 4.2361817 4.1546771 120 -29.2585138 4.2361817 121 15.2700452 -29.2585138 122 21.0226974 15.2700452 123 -10.0170830 21.0226974 124 -25.1431457 -10.0170830 125 4.2450888 -25.1431457 126 -7.8675238 4.2450888 127 -7.2851719 -7.8675238 128 12.2660720 -7.2851719 129 43.1473003 12.2660720 130 -24.4546606 43.1473003 131 39.3739070 -24.4546606 132 0.1038744 39.3739070 133 10.9887483 0.1038744 134 23.8699766 10.9887483 135 0.8301962 23.8699766 136 3.7512050 0.8301962 137 -0.9695275 3.7512050 138 14.7965747 -0.9695275 139 -9.2493647 14.7965747 140 17.6453137 -9.2493647 141 11.0433528 17.6453137 142 5.8817249 11.0433528 143 30.2436291 5.8817249 144 -5.9241578 30.2436291 145 6.5492270 -5.9241578 146 8.9834010 6.5492270 147 11.0226117 8.9834010 148 3.9663054 11.0226117 149 29.0287707 3.9663054 150 18.6172816 29.0287707 151 19.6662968 18.6172816 152 -26.4751597 19.6662968 153 15.0380055 -26.4751597 154 -15.5278205 15.0380055 155 34.9228794 -15.5278205 156 -0.8205380 34.9228794 157 -28.7942076 -0.8205380 158 -6.4524748 -28.7942076 159 23.4587295 -6.4524748 160 -23.3998140 23.4587295 161 -1.5676009 -23.3998140 162 10.2083059 -1.5676009 163 9.2609667 10.2083059 164 -5.5810509 9.2609667 165 30.1948558 -5.5810509 166 39.7606818 30.1948558 167 -15.8939399 39.7606818 168 29.4514384 -15.8939399 169 -59.5846965 29.4514384 170 10.2836516 -59.5846965 171 27.1287450 10.2836516 172 -36.4732159 27.1287450 173 -18.0690178 -36.4732159 174 2.8323820 -18.0690178 175 -17.2729396 2.8323820 176 48.6284602 -17.2729396 177 -30.0524919 48.6284602 178 19.8024060 -30.0524919 179 -8.5331677 19.8024060 180 28.7662711 -8.5331677 181 12.7136103 28.7662711 182 28.7399407 12.7136103 183 6.8813972 28.7399407 184 31.7362952 6.8813972 185 9.1343343 31.7362952 186 12.7987605 9.1343343 187 -32.2539003 12.7987605 188 3.2231300 -32.2539003 189 -19.0634285 3.2231300 190 3.2458149 -19.0634285 191 50.6273281 3.2458149 192 13.9592564 50.6273281 193 24.8343257 13.9592564 194 33.1399236 24.8343257 195 -19.7186199 33.1399236 196 -34.5146981 -19.7186199 197 0.1362781 -34.5146981 198 11.3138695 0.1362781 199 -17.2880914 11.3138695 200 2.3928607 -17.2880914 201 18.9060259 2.3928607 202 28.2415997 18.9060259 203 4.9550411 28.2415997 204 11.5208671 4.9550411 205 -28.4791329 11.5208671 206 19.5796869 -28.4791329 207 42.7309479 19.5796869 208 -26.8710130 42.7309479 209 -30.1374001 -26.8710130 210 7.1681978 -30.1374001 211 18.4443894 7.1681978 212 -49.3124780 18.4443894 213 -12.0558954 -49.3124780 214 10.4474652 -12.0558954 215 24.1118915 10.4474652 216 5.7303782 24.1118915 217 10.8914438 5.7303782 218 -39.6051956 10.8914438 219 -42.0332106 -39.6051956 220 22.1345763 -42.0332106 221 106.3911589 22.1345763 222 4.6477415 106.3911589 223 -40.6088411 4.6477415 224 -19.2469369 -40.6088411 225 -19.8752282 -19.2469369 226 50.9796698 -19.8752282 227 21.6802309 50.9796698 228 27.9858288 21.6802309 229 1.0550154 27.9858288 230 -3.0766365 1.0550154 231 -19.0503061 -3.0766365 232 42.7421265 -19.0503061 233 -40.5769214 42.7421265 234 -27.5144561 -40.5769214 235 25.5480092 -27.5144561 236 -27.2052127 25.5480092 237 -42.7844887 -27.2052127 238 35.2516462 -42.7844887 239 -1.4654408 35.2516462 240 -15.8144646 -1.4654408 241 -17.1598429 -15.8144646 242 2.0440789 -17.1598429 243 -21.6993385 2.0440789 244 35.7611659 -21.6993385 245 -40.4562060 35.7611659 246 -16.4200711 -40.4562060 247 -1.6802992 -16.4200711 248 10.6026138 -1.6802992 249 9.9082117 10.6026138 250 41.7667552 9.9082117 251 -22.3747013 41.7667552 252 -49.3747013 -22.3747013 253 32.5328574 -49.3747013 254 -46.3654665 32.5328574 255 -35.7898360 -46.3654665 256 -38.9086076 -35.7898360 257 -0.2576315 -38.9086076 258 -14.1786403 -0.2576315 259 -30.9783640 -14.1786403 260 16.1630925 -30.9783640 261 -38.9520336 16.1630925 262 -42.7481118 -38.9520336 263 7.2384382 -42.7481118 264 -24.0481204 7.2384382 265 -3.3934987 -24.0481204 266 -15.5122703 -3.3934987 267 -2.0254355 -15.5122703 268 -39.6481375 -2.0254355 > 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/7nqr31358279783.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/89xfy1358279783.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/95i5n1358279783.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/10tdk91358279783.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/11dkuu1358279783.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/12267u1358279783.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/13obq61358279783.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/1413im1358279783.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/15qjix1358279783.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/16jr0q1358279783.tab") + } > > try(system("convert tmp/137kf1358279783.ps tmp/137kf1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/2snkd1358279783.ps tmp/2snkd1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/3lcxf1358279783.ps tmp/3lcxf1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/4dg171358279783.ps tmp/4dg171358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/5h8do1358279783.ps tmp/5h8do1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/6o3w81358279783.ps tmp/6o3w81358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/7nqr31358279783.ps tmp/7nqr31358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/89xfy1358279783.ps tmp/89xfy1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/95i5n1358279783.ps tmp/95i5n1358279783.png",intern=TRUE)) character(0) > try(system("convert tmp/10tdk91358279783.ps tmp/10tdk91358279783.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 10.726 0.837 11.720