R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(87.28 + ,255 + ,87.28 + ,280.2 + ,87.09 + ,299.9 + ,86.92 + ,339.2 + ,87.59 + ,374.2 + ,90.72 + ,393.5 + ,90.69 + ,389.2 + ,90.3 + ,381.7 + ,89.55 + ,375.2 + ,88.94 + ,369 + ,88.41 + ,357.4 + ,87.82 + ,352.1 + ,87.07 + ,346.5 + ,86.82 + ,342.9 + ,86.4 + ,340.3 + ,86.02 + ,328.3 + ,85.66 + ,322.9 + ,85.32 + ,314.3 + ,85 + ,308.9 + ,84.67 + ,294 + ,83.94 + ,285.6 + ,82.83 + ,281.2 + ,81.95 + ,280.3 + ,81.19 + ,278.8 + ,80.48 + ,274.5 + ,78.86 + ,270.4 + ,69.47 + ,263.4 + ,68.77 + ,259.9 + ,70.06 + ,258 + ,73.95 + ,262.7 + ,75.8 + ,284.7 + ,77.79 + ,311.3 + ,81.57 + ,322.1 + ,83.07 + ,327 + ,84.34 + ,331.3 + ,85.1 + ,333.3 + ,85.25 + ,321.4 + ,84.26 + ,327 + ,83.63 + ,320 + ,86.44 + ,314.7 + ,85.3 + ,316.7 + ,84.1 + ,314.4 + ,83.36 + ,321.3 + ,82.48 + ,318.2 + ,81.58 + ,307.2 + ,80.47 + ,301.3 + ,79.34 + ,287.5 + ,82.13 + ,277.7 + ,81.69 + ,274.4 + ,80.7 + ,258.8 + ,79.88 + ,253.3 + ,79.16 + ,251 + ,78.38 + ,248.4 + ,77.42 + ,249.5 + ,76.47 + ,246.1 + ,75.46 + ,244.5 + ,74.48 + ,243.6 + ,78.27 + ,244 + ,80.7 + ,240.8 + ,79.91 + ,249.8 + ,78.75 + ,248 + ,77.78 + ,259.4 + ,81.14 + ,260.5 + ,81.08 + ,260.8 + ,80.03 + ,261.3 + ,78.91 + ,259.5 + ,78.01 + ,256.6 + ,76.9 + ,257.9 + ,75.97 + ,256.5 + ,81.93 + ,254.2 + ,80.27 + ,253.3 + ,78.67 + ,253.8 + ,77.42 + ,255.5 + ,76.16 + ,257.1 + ,74.7 + ,257.3 + ,76.39 + ,253.2 + ,76.04 + ,252.8 + ,74.65 + ,252 + ,73.29 + ,250.7 + ,71.79 + ,252.2 + ,74.39 + ,250 + ,74.91 + ,251 + ,74.54 + ,253.4 + ,73.08 + ,251.2 + ,72.75 + ,255.6 + ,71.32 + ,261.1 + ,70.38 + ,258.9 + ,70.35 + ,259.9 + ,70.01 + ,261.2 + ,69.36 + ,264.7 + ,67.77 + ,267.1 + ,69.26 + ,266.4 + ,69.8 + ,267.7 + ,68.38 + ,268.6 + ,67.62 + ,267.5 + ,68.39 + ,268.5 + ,66.95 + ,268.5 + ,65.21 + ,270.5 + ,66.64 + ,270.9 + ,63.45 + ,270.1 + ,60.66 + ,269.3 + ,62.34 + ,269.8 + ,60.32 + ,270.1 + ,58.64 + ,264.9 + ,60.46 + ,263.7 + ,58.59 + ,264.8 + ,61.87 + ,263.7 + ,61.85 + ,255.9 + ,67.44 + ,276.2 + ,77.06 + ,360.1 + ,91.74 + ,380.5 + ,93.15 + ,373.7 + ,94.15 + ,369.8 + ,93.11 + ,366.6 + ,91.51 + ,359.3 + ,89.96 + ,345.8 + ,88.16 + ,326.2 + ,86.98 + ,324.5 + ,88.03 + ,328.1 + ,86.24 + ,327.5 + ,84.65 + ,324.4 + ,83.23 + ,316.5 + ,81.7 + ,310.9 + ,80.25 + ,301.5 + ,78.8 + ,291.7 + ,77.51 + ,290.4 + ,76.2 + ,287.4 + ,75.04 + ,277.7 + ,74 + ,281.6 + ,75.49 + ,288 + ,77.14 + ,276 + ,76.15 + ,272.9 + ,76.27 + ,283 + ,78.19 + ,283.3 + ,76.49 + ,276.8 + ,77.31 + ,284.5 + ,76.65 + ,282.7 + ,74.99 + ,281.2 + ,73.51 + ,287.4 + ,72.07 + ,283.1 + ,70.59 + ,284 + ,71.96 + ,285.5 + ,76.29 + ,289.2 + ,74.86 + ,292.5 + ,74.93 + ,296.4 + ,71.9 + ,305.2 + ,71.01 + ,303.9 + ,77.47 + ,311.5 + ,75.78 + ,316.3 + ,76.6 + ,316.7 + ,76.07 + ,322.5 + ,74.57 + ,317.1 + ,73.02 + ,309.8 + ,72.65 + ,303.8 + ,73.16 + ,290.3 + ,71.53 + ,293.7 + ,69.78 + ,291.7 + ,67.98 + ,296.5 + ,69.96 + ,289.1 + ,72.16 + ,288.5 + ,70.47 + ,293.8 + ,68.86 + ,297.7 + ,67.37 + ,305.4 + ,65.87 + ,302.7 + ,72.16 + ,302.5 + ,71.34 + ,303 + ,69.93 + ,294.5 + ,68.44 + ,294.1 + ,67.16 + ,294.5 + ,66.01 + ,297.1 + ,67.25 + ,289.4 + ,70.91 + ,292.4 + ,69.75 + ,287.9 + ,68.59 + ,286.6 + ,67.48 + ,280.5 + ,66.31 + ,272.4 + ,64.81 + ,269.2 + ,66.58 + ,270.6 + ,65.97 + ,267.3 + ,64.7 + ,262.5 + ,64.7 + ,266.8 + ,60.94 + ,268.8 + ,59.08 + ,263.1 + ,58.42 + ,261.2 + ,57.77 + ,266 + ,57.11 + ,262.5 + ,53.31 + ,265.2 + ,49.96 + ,261.3 + ,49.4 + ,253.7 + ,48.84 + ,249.2 + ,48.3 + ,239.1 + ,47.74 + ,236.4 + ,47.24 + ,235.2 + ,46.76 + ,245.2 + ,46.29 + ,246.2 + ,48.9 + ,247.7 + ,49.23 + ,251.4 + ,48.53 + ,253.3 + ,48.03 + ,254.8 + ,54.34 + ,250 + ,53.79 + ,249.3 + ,53.24 + ,241.5 + ,52.96 + ,243.3 + ,52.17 + ,248 + ,51.7 + ,253 + ,58.55 + ,252.9 + ,78.2 + ,251.5 + ,77.03 + ,251.6 + ,76.19 + ,253.5 + ,77.15 + ,259.8 + ,75.87 + ,334.1 + ,95.47 + ,448 + ,109.67 + ,445.8 + ,112.28 + ,445 + ,112.01 + ,448.2 + ,107.93 + ,438.2 + ,105.96 + ,439.8 + ,105.06 + ,423.4 + ,102.98 + ,410.8 + ,102.2 + ,408.4 + ,105.23 + ,406.7 + ,101.85 + ,405.9 + ,99.89 + ,402.7 + ,96.23 + ,405.1 + ,94.76 + ,399.6 + ,91.51 + ,386.5 + ,91.63 + ,381.4 + ,91.54 + ,375.2 + ,85.23 + ,357.7 + ,87.83 + ,359 + ,87.38 + ,355 + ,84.44 + ,352.7 + ,85.19 + ,344.4 + ,84.03 + ,343.8 + ,86.73 + ,338 + ,102.52 + ,339 + ,104.45 + ,333.3 + ,106.98 + ,334.4 + ,107.02 + ,328.3 + ,99.26 + ,330.7 + ,94.45 + ,330 + ,113.44 + ,331.6 + ,157.33 + ,351.2 + ,147.38 + ,389.4 + ,171.89 + ,410.9 + ,171.95 + ,442.8 + ,132.71 + ,462.8 + ,126.02 + ,466.9 + ,121.18 + ,461.7 + ,115.45 + ,439.2 + ,110.48 + ,430.3 + ,117.85 + ,416.1 + ,117.63 + ,402.5 + ,124.65 + ,397.3 + ,109.59 + ,403.3 + ,111.27 + ,395.9 + ,99.78 + ,387.8 + ,98.21 + ,378.6 + ,99.2 + ,377.1 + ,97.97 + ,370.4 + ,89.55 + ,362 + ,87.91 + ,350.3 + ,93.34 + ,348.2 + ,94.42 + ,344.6 + ,93.2 + ,343.5 + ,90.29 + ,342.8 + ,91.46 + ,347.6 + ,89.98 + ,346.6 + ,88.35 + ,349.5 + ,88.41 + ,342.1 + ,82.44 + ,342 + ,79.89 + ,342.8 + ,75.69 + ,339.3 + ,75.66 + ,348.2 + ,84.5 + ,333.7 + ,96.73 + ,334.7 + ,87.48 + ,354 + ,82.39 + ,367.7 + ,83.48 + ,363.3 + ,79.31 + ,358.4 + ,78.16 + ,353.1 + ,72.77 + ,343.1 + ,72.45 + ,344.6 + ,68.46 + ,344.4 + ,67.62 + ,333.9 + ,68.76 + ,331.7 + ,70.07 + ,324.3 + ,68.55 + ,321.2 + ,65.3 + ,322.4 + ,58.96 + ,321.7 + ,59.17 + ,320.5 + ,62.37 + ,312.8 + ,66.28 + ,309.7 + ,55.62 + ,315.6 + ,55.23 + ,309.7 + ,55.85 + ,304.6 + ,56.75 + ,302.5 + ,50.89 + ,301.5 + ,53.88 + ,298.8 + ,52.95 + ,291.3 + ,55.08 + ,293.6 + ,53.61 + ,294.6 + ,58.78 + ,285.9 + ,61.85 + ,297.6 + ,55.91 + ,301.1 + ,53.32 + ,293.8 + ,46.41 + ,297.7 + ,44.57 + ,292.9 + ,50 + ,292.1 + ,50 + ,287.2 + ,53.36 + ,288.2 + ,46.23 + ,283.8 + ,50.45 + ,299.9 + ,49.07 + ,292.4 + ,45.85 + ,293.3 + ,48.45 + ,300.8 + ,49.96 + ,293.7 + ,46.53 + ,293.1 + ,50.51 + ,294.4 + ,47.58 + ,292.1 + ,48.05 + ,291.9 + ,46.84 + ,282.5 + ,47.67 + ,277.9 + ,49.16 + ,287.5 + ,55.54 + ,289.2 + ,55.82 + ,285.6 + ,58.22 + ,293.2 + ,56.19 + ,290.8 + ,57.77 + ,283.1 + ,63.19 + ,275 + ,54.76 + ,287.8 + ,55.74 + ,287.8 + ,62.54 + ,287.4 + ,61.39 + ,284 + ,69.6 + ,277.8 + ,79.23 + ,277.6 + ,80 + ,304.9 + ,93.68 + ,294 + ,107.63 + ,300.9 + ,100.18 + ,324 + ,97.3 + ,332.9 + ,90.45 + ,341.6 + ,80.64 + ,333.4 + ,80.58 + ,348.2 + ,75.82 + ,344.7 + ,85.59 + ,344.7 + ,89.35 + ,329.3 + ,89.42 + ,323.5 + ,104.73 + ,323.2 + ,95.32 + ,317.4 + ,89.27 + ,330.1 + ,90.44 + ,329.2 + ,86.97 + ,334.9 + ,79.98 + ,315.8 + ,81.22 + ,315.4 + ,87.35 + ,319.6 + ,83.64 + ,317.3 + ,82.22 + ,313.8 + ,94.4 + ,315.8 + ,102.18 + ,311.3) + ,dim=c(2 + ,360) + ,dimnames=list(c('Colombia' + ,'USA') + ,1:360)) > y <- array(NA,dim=c(2,360),dimnames=list(c('Colombia','USA'),1:360)) > 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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 Colombia USA 1 87.28 255.0 2 87.28 280.2 3 87.09 299.9 4 86.92 339.2 5 87.59 374.2 6 90.72 393.5 7 90.69 389.2 8 90.30 381.7 9 89.55 375.2 10 88.94 369.0 11 88.41 357.4 12 87.82 352.1 13 87.07 346.5 14 86.82 342.9 15 86.40 340.3 16 86.02 328.3 17 85.66 322.9 18 85.32 314.3 19 85.00 308.9 20 84.67 294.0 21 83.94 285.6 22 82.83 281.2 23 81.95 280.3 24 81.19 278.8 25 80.48 274.5 26 78.86 270.4 27 69.47 263.4 28 68.77 259.9 29 70.06 258.0 30 73.95 262.7 31 75.80 284.7 32 77.79 311.3 33 81.57 322.1 34 83.07 327.0 35 84.34 331.3 36 85.10 333.3 37 85.25 321.4 38 84.26 327.0 39 83.63 320.0 40 86.44 314.7 41 85.30 316.7 42 84.10 314.4 43 83.36 321.3 44 82.48 318.2 45 81.58 307.2 46 80.47 301.3 47 79.34 287.5 48 82.13 277.7 49 81.69 274.4 50 80.70 258.8 51 79.88 253.3 52 79.16 251.0 53 78.38 248.4 54 77.42 249.5 55 76.47 246.1 56 75.46 244.5 57 74.48 243.6 58 78.27 244.0 59 80.70 240.8 60 79.91 249.8 61 78.75 248.0 62 77.78 259.4 63 81.14 260.5 64 81.08 260.8 65 80.03 261.3 66 78.91 259.5 67 78.01 256.6 68 76.90 257.9 69 75.97 256.5 70 81.93 254.2 71 80.27 253.3 72 78.67 253.8 73 77.42 255.5 74 76.16 257.1 75 74.70 257.3 76 76.39 253.2 77 76.04 252.8 78 74.65 252.0 79 73.29 250.7 80 71.79 252.2 81 74.39 250.0 82 74.91 251.0 83 74.54 253.4 84 73.08 251.2 85 72.75 255.6 86 71.32 261.1 87 70.38 258.9 88 70.35 259.9 89 70.01 261.2 90 69.36 264.7 91 67.77 267.1 92 69.26 266.4 93 69.80 267.7 94 68.38 268.6 95 67.62 267.5 96 68.39 268.5 97 66.95 268.5 98 65.21 270.5 99 66.64 270.9 100 63.45 270.1 101 60.66 269.3 102 62.34 269.8 103 60.32 270.1 104 58.64 264.9 105 60.46 263.7 106 58.59 264.8 107 61.87 263.7 108 61.85 255.9 109 67.44 276.2 110 77.06 360.1 111 91.74 380.5 112 93.15 373.7 113 94.15 369.8 114 93.11 366.6 115 91.51 359.3 116 89.96 345.8 117 88.16 326.2 118 86.98 324.5 119 88.03 328.1 120 86.24 327.5 121 84.65 324.4 122 83.23 316.5 123 81.70 310.9 124 80.25 301.5 125 78.80 291.7 126 77.51 290.4 127 76.20 287.4 128 75.04 277.7 129 74.00 281.6 130 75.49 288.0 131 77.14 276.0 132 76.15 272.9 133 76.27 283.0 134 78.19 283.3 135 76.49 276.8 136 77.31 284.5 137 76.65 282.7 138 74.99 281.2 139 73.51 287.4 140 72.07 283.1 141 70.59 284.0 142 71.96 285.5 143 76.29 289.2 144 74.86 292.5 145 74.93 296.4 146 71.90 305.2 147 71.01 303.9 148 77.47 311.5 149 75.78 316.3 150 76.60 316.7 151 76.07 322.5 152 74.57 317.1 153 73.02 309.8 154 72.65 303.8 155 73.16 290.3 156 71.53 293.7 157 69.78 291.7 158 67.98 296.5 159 69.96 289.1 160 72.16 288.5 161 70.47 293.8 162 68.86 297.7 163 67.37 305.4 164 65.87 302.7 165 72.16 302.5 166 71.34 303.0 167 69.93 294.5 168 68.44 294.1 169 67.16 294.5 170 66.01 297.1 171 67.25 289.4 172 70.91 292.4 173 69.75 287.9 174 68.59 286.6 175 67.48 280.5 176 66.31 272.4 177 64.81 269.2 178 66.58 270.6 179 65.97 267.3 180 64.70 262.5 181 64.70 266.8 182 60.94 268.8 183 59.08 263.1 184 58.42 261.2 185 57.77 266.0 186 57.11 262.5 187 53.31 265.2 188 49.96 261.3 189 49.40 253.7 190 48.84 249.2 191 48.30 239.1 192 47.74 236.4 193 47.24 235.2 194 46.76 245.2 195 46.29 246.2 196 48.90 247.7 197 49.23 251.4 198 48.53 253.3 199 48.03 254.8 200 54.34 250.0 201 53.79 249.3 202 53.24 241.5 203 52.96 243.3 204 52.17 248.0 205 51.70 253.0 206 58.55 252.9 207 78.20 251.5 208 77.03 251.6 209 76.19 253.5 210 77.15 259.8 211 75.87 334.1 212 95.47 448.0 213 109.67 445.8 214 112.28 445.0 215 112.01 448.2 216 107.93 438.2 217 105.96 439.8 218 105.06 423.4 219 102.98 410.8 220 102.20 408.4 221 105.23 406.7 222 101.85 405.9 223 99.89 402.7 224 96.23 405.1 225 94.76 399.6 226 91.51 386.5 227 91.63 381.4 228 91.54 375.2 229 85.23 357.7 230 87.83 359.0 231 87.38 355.0 232 84.44 352.7 233 85.19 344.4 234 84.03 343.8 235 86.73 338.0 236 102.52 339.0 237 104.45 333.3 238 106.98 334.4 239 107.02 328.3 240 99.26 330.7 241 94.45 330.0 242 113.44 331.6 243 157.33 351.2 244 147.38 389.4 245 171.89 410.9 246 171.95 442.8 247 132.71 462.8 248 126.02 466.9 249 121.18 461.7 250 115.45 439.2 251 110.48 430.3 252 117.85 416.1 253 117.63 402.5 254 124.65 397.3 255 109.59 403.3 256 111.27 395.9 257 99.78 387.8 258 98.21 378.6 259 99.20 377.1 260 97.97 370.4 261 89.55 362.0 262 87.91 350.3 263 93.34 348.2 264 94.42 344.6 265 93.20 343.5 266 90.29 342.8 267 91.46 347.6 268 89.98 346.6 269 88.35 349.5 270 88.41 342.1 271 82.44 342.0 272 79.89 342.8 273 75.69 339.3 274 75.66 348.2 275 84.50 333.7 276 96.73 334.7 277 87.48 354.0 278 82.39 367.7 279 83.48 363.3 280 79.31 358.4 281 78.16 353.1 282 72.77 343.1 283 72.45 344.6 284 68.46 344.4 285 67.62 333.9 286 68.76 331.7 287 70.07 324.3 288 68.55 321.2 289 65.30 322.4 290 58.96 321.7 291 59.17 320.5 292 62.37 312.8 293 66.28 309.7 294 55.62 315.6 295 55.23 309.7 296 55.85 304.6 297 56.75 302.5 298 50.89 301.5 299 53.88 298.8 300 52.95 291.3 301 55.08 293.6 302 53.61 294.6 303 58.78 285.9 304 61.85 297.6 305 55.91 301.1 306 53.32 293.8 307 46.41 297.7 308 44.57 292.9 309 50.00 292.1 310 50.00 287.2 311 53.36 288.2 312 46.23 283.8 313 50.45 299.9 314 49.07 292.4 315 45.85 293.3 316 48.45 300.8 317 49.96 293.7 318 46.53 293.1 319 50.51 294.4 320 47.58 292.1 321 48.05 291.9 322 46.84 282.5 323 47.67 277.9 324 49.16 287.5 325 55.54 289.2 326 55.82 285.6 327 58.22 293.2 328 56.19 290.8 329 57.77 283.1 330 63.19 275.0 331 54.76 287.8 332 55.74 287.8 333 62.54 287.4 334 61.39 284.0 335 69.60 277.8 336 79.23 277.6 337 80.00 304.9 338 93.68 294.0 339 107.63 300.9 340 100.18 324.0 341 97.30 332.9 342 90.45 341.6 343 80.64 333.4 344 80.58 348.2 345 75.82 344.7 346 85.59 344.7 347 89.35 329.3 348 89.42 323.5 349 104.73 323.2 350 95.32 317.4 351 89.27 330.1 352 90.44 329.2 353 86.97 334.9 354 79.98 315.8 355 81.22 315.4 356 87.35 319.6 357 83.64 317.3 358 82.22 313.8 359 94.40 315.8 360 102.18 311.3 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) USA -6.4567 0.2724 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -28.759 -7.333 -0.128 6.677 68.120 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -6.45667 4.47982 -1.441 0.15 USA 0.27240 0.01435 18.984 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.33 on 358 degrees of freedom Multiple R-squared: 0.5017, Adjusted R-squared: 0.5003 F-statistic: 360.4 on 1 and 358 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.299419e-05 2.598838e-05 0.999987006 [2,] 1.431804e-04 2.863609e-04 0.999856820 [3,] 2.369193e-05 4.738387e-05 0.999976308 [4,] 2.589656e-06 5.179312e-06 0.999997410 [5,] 2.132928e-07 4.265855e-07 0.999999787 [6,] 1.692576e-08 3.385153e-08 0.999999983 [7,] 1.380321e-09 2.760642e-09 0.999999999 [8,] 1.445737e-10 2.891474e-10 1.000000000 [9,] 2.686751e-11 5.373501e-11 1.000000000 [10,] 5.175308e-12 1.035062e-11 1.000000000 [11,] 1.307558e-12 2.615116e-12 1.000000000 [12,] 2.972897e-13 5.945795e-13 1.000000000 [13,] 7.199794e-14 1.439959e-13 1.000000000 [14,] 1.609484e-14 3.218968e-14 1.000000000 [15,] 3.535456e-15 7.070913e-15 1.000000000 [16,] 5.833987e-16 1.166797e-15 1.000000000 [17,] 1.190099e-16 2.380198e-16 1.000000000 [18,] 4.899911e-17 9.799823e-17 1.000000000 [19,] 3.429349e-17 6.858698e-17 1.000000000 [20,] 3.055435e-17 6.110869e-17 1.000000000 [21,] 2.611074e-17 5.222149e-17 1.000000000 [22,] 5.534633e-17 1.106927e-16 1.000000000 [23,] 1.730052e-12 3.460105e-12 1.000000000 [24,] 7.883243e-11 1.576649e-10 1.000000000 [25,] 2.325645e-10 4.651289e-10 1.000000000 [26,] 1.279987e-10 2.559975e-10 1.000000000 [27,] 7.170682e-11 1.434136e-10 1.000000000 [28,] 4.754948e-11 9.509896e-11 1.000000000 [29,] 1.721522e-11 3.443044e-11 1.000000000 [30,] 5.452783e-12 1.090557e-11 1.000000000 [31,] 1.605028e-12 3.210056e-12 1.000000000 [32,] 4.568828e-13 9.137657e-13 1.000000000 [33,] 1.333938e-13 2.667876e-13 1.000000000 [34,] 3.706313e-14 7.412626e-14 1.000000000 [35,] 1.013603e-14 2.027207e-14 1.000000000 [36,] 3.702676e-15 7.405353e-15 1.000000000 [37,] 1.083112e-15 2.166224e-15 1.000000000 [38,] 2.912362e-16 5.824723e-16 1.000000000 [39,] 7.787341e-17 1.557468e-16 1.000000000 [40,] 2.146864e-17 4.293729e-17 1.000000000 [41,] 5.736680e-18 1.147336e-17 1.000000000 [42,] 1.589140e-18 3.178280e-18 1.000000000 [43,] 4.253094e-19 8.506188e-19 1.000000000 [44,] 1.466229e-19 2.932459e-19 1.000000000 [45,] 4.881278e-20 9.762556e-20 1.000000000 [46,] 1.875877e-20 3.751754e-20 1.000000000 [47,] 6.662469e-21 1.332494e-20 1.000000000 [48,] 2.126402e-21 4.252803e-21 1.000000000 [49,] 6.289725e-22 1.257945e-21 1.000000000 [50,] 1.718856e-22 3.437711e-22 1.000000000 [51,] 4.739694e-23 9.479388e-23 1.000000000 [52,] 1.378122e-23 2.756245e-23 1.000000000 [53,] 4.460865e-24 8.921730e-24 1.000000000 [54,] 1.437241e-24 2.874482e-24 1.000000000 [55,] 9.859657e-25 1.971931e-24 1.000000000 [56,] 3.721947e-25 7.443895e-25 1.000000000 [57,] 1.170058e-25 2.340117e-25 1.000000000 [58,] 3.203616e-26 6.407231e-26 1.000000000 [59,] 1.211795e-26 2.423589e-26 1.000000000 [60,] 4.443110e-27 8.886221e-27 1.000000000 [61,] 1.323180e-27 2.646361e-27 1.000000000 [62,] 3.654169e-28 7.308338e-28 1.000000000 [63,] 1.014888e-28 2.029776e-28 1.000000000 [64,] 3.077439e-29 6.154878e-29 1.000000000 [65,] 1.071415e-29 2.142831e-29 1.000000000 [66,] 6.868025e-30 1.373605e-29 1.000000000 [67,] 2.650445e-30 5.300890e-30 1.000000000 [68,] 7.943364e-31 1.588673e-30 1.000000000 [69,] 2.365290e-31 4.730580e-31 1.000000000 [70,] 8.499455e-32 1.699891e-31 1.000000000 [71,] 4.567636e-32 9.135271e-32 1.000000000 [72,] 1.499869e-32 2.999738e-32 1.000000000 [73,] 5.174585e-33 1.034917e-32 1.000000000 [74,] 2.405528e-33 4.811056e-33 1.000000000 [75,] 1.691719e-33 3.383437e-33 1.000000000 [76,] 2.415196e-33 4.830392e-33 1.000000000 [77,] 1.085534e-33 2.171067e-33 1.000000000 [78,] 4.389155e-34 8.778310e-34 1.000000000 [79,] 2.002385e-34 4.004769e-34 1.000000000 [80,] 1.347975e-34 2.695950e-34 1.000000000 [81,] 1.163019e-34 2.326038e-34 1.000000000 [82,] 2.519007e-34 5.038014e-34 1.000000000 [83,] 7.298982e-34 1.459796e-33 1.000000000 [84,] 1.934221e-33 3.868442e-33 1.000000000 [85,] 5.747513e-33 1.149503e-32 1.000000000 [86,] 2.596263e-32 5.192526e-32 1.000000000 [87,] 2.980406e-31 5.960812e-31 1.000000000 [88,] 9.880962e-31 1.976192e-30 1.000000000 [89,] 2.304477e-30 4.608954e-30 1.000000000 [90,] 1.004085e-29 2.008170e-29 1.000000000 [91,] 5.021394e-29 1.004279e-28 1.000000000 [92,] 1.503716e-28 3.007433e-28 1.000000000 [93,] 7.637001e-28 1.527400e-27 1.000000000 [94,] 8.437595e-27 1.687519e-26 1.000000000 [95,] 3.576130e-26 7.152260e-26 1.000000000 [96,] 5.369938e-25 1.073988e-24 1.000000000 [97,] 2.171176e-23 4.342352e-23 1.000000000 [98,] 2.354065e-22 4.708129e-22 1.000000000 [99,] 4.498091e-21 8.996182e-21 1.000000000 [100,] 8.648076e-20 1.729615e-19 1.000000000 [101,] 5.360194e-19 1.072039e-18 1.000000000 [102,] 5.204911e-18 1.040982e-17 1.000000000 [103,] 1.402555e-17 2.805111e-17 1.000000000 [104,] 2.710476e-17 5.420951e-17 1.000000000 [105,] 2.765128e-17 5.530256e-17 1.000000000 [106,] 4.407369e-17 8.814738e-17 1.000000000 [107,] 2.152942e-17 4.305884e-17 1.000000000 [108,] 1.122411e-17 2.244822e-17 1.000000000 [109,] 6.423385e-18 1.284677e-17 1.000000000 [110,] 3.415347e-18 6.830694e-18 1.000000000 [111,] 1.712436e-18 3.424872e-18 1.000000000 [112,] 8.754680e-19 1.750936e-18 1.000000000 [113,] 5.039500e-19 1.007900e-18 1.000000000 [114,] 2.654307e-19 5.308614e-19 1.000000000 [115,] 1.441186e-19 2.882372e-19 1.000000000 [116,] 6.861904e-20 1.372381e-19 1.000000000 [117,] 3.110597e-20 6.221194e-20 1.000000000 [118,] 1.417404e-20 2.834807e-20 1.000000000 [119,] 6.425781e-21 1.285156e-20 1.000000000 [120,] 2.988911e-21 5.977822e-21 1.000000000 [121,] 1.443698e-21 2.887397e-21 1.000000000 [122,] 6.933342e-22 1.386668e-21 1.000000000 [123,] 3.404844e-22 6.809689e-22 1.000000000 [124,] 1.744761e-22 3.489523e-22 1.000000000 [125,] 9.216473e-23 1.843295e-22 1.000000000 [126,] 4.600787e-23 9.201573e-23 1.000000000 [127,] 2.486372e-23 4.972744e-23 1.000000000 [128,] 1.349444e-23 2.698889e-23 1.000000000 [129,] 6.708117e-24 1.341623e-23 1.000000000 [130,] 3.475711e-24 6.951422e-24 1.000000000 [131,] 1.837300e-24 3.674601e-24 1.000000000 [132,] 9.159586e-25 1.831917e-24 1.000000000 [133,] 4.597424e-25 9.194848e-25 1.000000000 [134,] 2.353209e-25 4.706419e-25 1.000000000 [135,] 1.328581e-25 2.657161e-25 1.000000000 [136,] 8.245861e-26 1.649172e-25 1.000000000 [137,] 6.204535e-26 1.240907e-25 1.000000000 [138,] 3.961122e-26 7.922245e-26 1.000000000 [139,] 1.919059e-26 3.838118e-26 1.000000000 [140,] 9.922052e-27 1.984410e-26 1.000000000 [141,] 5.222476e-27 1.044495e-26 1.000000000 [142,] 4.927359e-27 9.854718e-27 1.000000000 [143,] 5.252630e-27 1.050526e-26 1.000000000 [144,] 2.518216e-27 5.036432e-27 1.000000000 [145,] 1.541085e-27 3.082169e-27 1.000000000 [146,] 8.456539e-28 1.691308e-27 1.000000000 [147,] 5.530526e-28 1.106105e-27 1.000000000 [148,] 4.006033e-28 8.012067e-28 1.000000000 [149,] 3.126504e-28 6.253009e-28 1.000000000 [150,] 2.235634e-28 4.471268e-28 1.000000000 [151,] 1.229629e-28 2.459258e-28 1.000000000 [152,] 8.465998e-29 1.693200e-28 1.000000000 [153,] 7.332669e-29 1.466534e-28 1.000000000 [154,] 1.029216e-28 2.058431e-28 1.000000000 [155,] 7.938332e-29 1.587666e-28 1.000000000 [156,] 4.579134e-29 9.158269e-29 1.000000000 [157,] 3.502281e-29 7.004562e-29 1.000000000 [158,] 3.892753e-29 7.785507e-29 1.000000000 [159,] 7.762452e-29 1.552490e-28 1.000000000 [160,] 1.976911e-28 3.953821e-28 1.000000000 [161,] 1.296106e-28 2.592212e-28 1.000000000 [162,] 9.552728e-29 1.910546e-28 1.000000000 [163,] 7.321301e-29 1.464260e-28 1.000000000 [164,] 7.036942e-29 1.407388e-28 1.000000000 [165,] 8.588184e-29 1.717637e-28 1.000000000 [166,] 1.421019e-28 2.842037e-28 1.000000000 [167,] 1.419612e-28 2.839224e-28 1.000000000 [168,] 8.744972e-29 1.748994e-28 1.000000000 [169,] 5.778001e-29 1.155600e-28 1.000000000 [170,] 4.301977e-29 8.603954e-29 1.000000000 [171,] 3.367676e-29 6.735351e-29 1.000000000 [172,] 2.734261e-29 5.468522e-29 1.000000000 [173,] 2.581109e-29 5.162218e-29 1.000000000 [174,] 1.950425e-29 3.900850e-29 1.000000000 [175,] 1.520412e-29 3.040824e-29 1.000000000 [176,] 1.301763e-29 2.603526e-29 1.000000000 [177,] 1.154927e-29 2.309854e-29 1.000000000 [178,] 1.982345e-29 3.964690e-29 1.000000000 [179,] 4.125739e-29 8.251478e-29 1.000000000 [180,] 8.836009e-29 1.767202e-28 1.000000000 [181,] 2.378653e-28 4.757307e-28 1.000000000 [182,] 6.157330e-28 1.231466e-27 1.000000000 [183,] 4.322167e-27 8.644334e-27 1.000000000 [184,] 5.727742e-26 1.145548e-25 1.000000000 [185,] 4.856378e-25 9.712756e-25 1.000000000 [186,] 3.193997e-24 6.387993e-24 1.000000000 [187,] 1.357655e-23 2.715310e-23 1.000000000 [188,] 5.097776e-23 1.019555e-22 1.000000000 [189,] 1.766465e-22 3.532930e-22 1.000000000 [190,] 8.404869e-22 1.680974e-21 1.000000000 [191,] 3.940752e-21 7.881504e-21 1.000000000 [192,] 1.024568e-20 2.049136e-20 1.000000000 [193,] 2.601638e-20 5.203276e-20 1.000000000 [194,] 7.340304e-20 1.468061e-19 1.000000000 [195,] 2.187145e-19 4.374289e-19 1.000000000 [196,] 2.251017e-19 4.502033e-19 1.000000000 [197,] 2.365605e-19 4.731210e-19 1.000000000 [198,] 2.284180e-19 4.568361e-19 1.000000000 [199,] 2.271717e-19 4.543434e-19 1.000000000 [200,] 2.574577e-19 5.149153e-19 1.000000000 [201,] 3.325502e-19 6.651004e-19 1.000000000 [202,] 2.431480e-19 4.862961e-19 1.000000000 [203,] 6.797203e-19 1.359441e-18 1.000000000 [204,] 1.670699e-18 3.341398e-18 1.000000000 [205,] 3.553709e-18 7.107418e-18 1.000000000 [206,] 7.011402e-18 1.402280e-17 1.000000000 [207,] 4.632806e-18 9.265612e-18 1.000000000 [208,] 1.621865e-17 3.243729e-17 1.000000000 [209,] 1.496725e-17 2.993449e-17 1.000000000 [210,] 1.365307e-17 2.730613e-17 1.000000000 [211,] 1.327257e-17 2.654514e-17 1.000000000 [212,] 1.237378e-17 2.474756e-17 1.000000000 [213,] 1.411709e-17 2.823418e-17 1.000000000 [214,] 1.181212e-17 2.362425e-17 1.000000000 [215,] 8.566423e-18 1.713285e-17 1.000000000 [216,] 6.166027e-18 1.233205e-17 1.000000000 [217,] 4.347671e-18 8.695343e-18 1.000000000 [218,] 3.095571e-18 6.191142e-18 1.000000000 [219,] 2.236462e-18 4.472923e-18 1.000000000 [220,] 2.215016e-18 4.430033e-18 1.000000000 [221,] 2.128974e-18 4.257948e-18 1.000000000 [222,] 1.764927e-18 3.529854e-18 1.000000000 [223,] 1.267760e-18 2.535520e-18 1.000000000 [224,] 7.971636e-19 1.594327e-18 1.000000000 [225,] 4.828265e-19 9.656530e-19 1.000000000 [226,] 2.655128e-19 5.310256e-19 1.000000000 [227,] 1.403180e-19 2.806361e-19 1.000000000 [228,] 7.987500e-20 1.597500e-19 1.000000000 [229,] 4.007925e-20 8.015849e-20 1.000000000 [230,] 2.036998e-20 4.073996e-20 1.000000000 [231,] 1.029411e-20 2.058822e-20 1.000000000 [232,] 3.166506e-20 6.333011e-20 1.000000000 [233,] 2.111487e-19 4.222974e-19 1.000000000 [234,] 2.229845e-18 4.459691e-18 1.000000000 [235,] 3.541822e-17 7.083645e-17 1.000000000 [236,] 8.223277e-17 1.644655e-16 1.000000000 [237,] 9.652813e-17 1.930563e-16 1.000000000 [238,] 5.485528e-15 1.097106e-14 1.000000000 [239,] 1.613084e-07 3.226168e-07 0.999999839 [240,] 2.451702e-05 4.903403e-05 0.999975483 [241,] 1.875730e-02 3.751460e-02 0.981242700 [242,] 2.098359e-01 4.196717e-01 0.790164125 [243,] 1.956638e-01 3.913276e-01 0.804336221 [244,] 1.880189e-01 3.760379e-01 0.811981066 [245,] 1.916886e-01 3.833772e-01 0.808311375 [246,] 1.873475e-01 3.746949e-01 0.812652542 [247,] 1.901462e-01 3.802924e-01 0.809853821 [248,] 1.731677e-01 3.463354e-01 0.826832307 [249,] 1.613291e-01 3.226581e-01 0.838670926 [250,] 1.799103e-01 3.598206e-01 0.820089708 [251,] 1.605555e-01 3.211110e-01 0.839444509 [252,] 1.437734e-01 2.875469e-01 0.856226572 [253,] 1.285693e-01 2.571387e-01 0.871430652 [254,] 1.127845e-01 2.255691e-01 0.887215468 [255,] 9.788822e-02 1.957764e-01 0.902111785 [256,] 8.437215e-02 1.687443e-01 0.915627847 [257,] 7.382507e-02 1.476501e-01 0.926174931 [258,] 6.326481e-02 1.265296e-01 0.936735190 [259,] 5.550960e-02 1.110192e-01 0.944490401 [260,] 5.067433e-02 1.013487e-01 0.949325669 [261,] 4.575367e-02 9.150734e-02 0.954246331 [262,] 3.980183e-02 7.960366e-02 0.960198170 [263,] 3.414391e-02 6.828783e-02 0.965856087 [264,] 2.892900e-02 5.785801e-02 0.971070996 [265,] 2.402310e-02 4.804620e-02 0.975976902 [266,] 2.029827e-02 4.059654e-02 0.979701729 [267,] 1.687758e-02 3.375515e-02 0.983122425 [268,] 1.436227e-02 2.872455e-02 0.985637727 [269,] 1.287114e-02 2.574227e-02 0.987128864 [270,] 1.268919e-02 2.537838e-02 0.987310810 [271,] 1.049101e-02 2.098201e-02 0.989508994 [272,] 1.188913e-02 2.377826e-02 0.988110871 [273,] 9.578823e-03 1.915765e-02 0.990421177 [274,] 9.689243e-03 1.937849e-02 0.990310757 [275,] 9.071360e-03 1.814272e-02 0.990928640 [276,] 9.389046e-03 1.877809e-02 0.990610954 [277,] 9.543262e-03 1.908652e-02 0.990456738 [278,] 1.032729e-02 2.065458e-02 0.989672708 [279,] 1.197064e-02 2.394127e-02 0.988029363 [280,] 1.771957e-02 3.543914e-02 0.982280428 [281,] 2.137385e-02 4.274770e-02 0.978626152 [282,] 2.370038e-02 4.740076e-02 0.976299622 [283,] 2.222571e-02 4.445143e-02 0.977774286 [284,] 2.086823e-02 4.173645e-02 0.979131773 [285,] 2.242024e-02 4.484049e-02 0.977579757 [286,] 3.212345e-02 6.424690e-02 0.967876548 [287,] 4.391365e-02 8.782731e-02 0.956086347 [288,] 4.444711e-02 8.889421e-02 0.955552893 [289,] 3.932313e-02 7.864626e-02 0.960676870 [290,] 5.640787e-02 1.128157e-01 0.943592131 [291,] 6.988253e-02 1.397651e-01 0.930117473 [292,] 7.576546e-02 1.515309e-01 0.924234538 [293,] 7.710898e-02 1.542180e-01 0.922891022 [294,] 9.361149e-02 1.872230e-01 0.906388515 [295,] 9.745646e-02 1.949129e-01 0.902543541 [296,] 9.411259e-02 1.882252e-01 0.905887413 [297,] 8.891808e-02 1.778362e-01 0.911081923 [298,] 8.760421e-02 1.752084e-01 0.912395786 [299,] 7.636471e-02 1.527294e-01 0.923635288 [300,] 6.620864e-02 1.324173e-01 0.933791360 [301,] 6.705154e-02 1.341031e-01 0.932948464 [302,] 6.537240e-02 1.307448e-01 0.934627605 [303,] 8.818732e-02 1.763746e-01 0.911812681 [304,] 1.133890e-01 2.267781e-01 0.886610964 [305,] 1.187480e-01 2.374961e-01 0.881251959 [306,] 1.164187e-01 2.328374e-01 0.883581280 [307,] 1.076325e-01 2.152651e-01 0.892367454 [308,] 1.114327e-01 2.228655e-01 0.888567263 [309,] 1.345895e-01 2.691791e-01 0.865410456 [310,] 1.483753e-01 2.967507e-01 0.851624652 [311,] 1.868506e-01 3.737012e-01 0.813149409 [312,] 2.478726e-01 4.957452e-01 0.752127392 [313,] 2.756358e-01 5.512715e-01 0.724364248 [314,] 3.375132e-01 6.750264e-01 0.662486788 [315,] 3.776036e-01 7.552072e-01 0.622396378 [316,] 4.438485e-01 8.876970e-01 0.556151521 [317,] 5.148805e-01 9.702389e-01 0.485119469 [318,] 5.585642e-01 8.828715e-01 0.441435754 [319,] 5.830638e-01 8.338724e-01 0.416936213 [320,] 6.485810e-01 7.028380e-01 0.351418988 [321,] 6.664382e-01 6.671236e-01 0.333561822 [322,] 6.766311e-01 6.467378e-01 0.323368895 [323,] 6.999623e-01 6.000754e-01 0.300037689 [324,] 7.427531e-01 5.144939e-01 0.257246926 [325,] 7.573460e-01 4.853080e-01 0.242654005 [326,] 7.288787e-01 5.422426e-01 0.271121319 [327,] 8.164488e-01 3.671025e-01 0.183551238 [328,] 9.023168e-01 1.953665e-01 0.097683246 [329,] 9.377658e-01 1.244683e-01 0.062234168 [330,] 9.784963e-01 4.300730e-02 0.021503652 [331,] 9.915241e-01 1.695174e-02 0.008475868 [332,] 9.956503e-01 8.699377e-03 0.004349689 [333,] 9.973965e-01 5.207029e-03 0.002603514 [334,] 9.962318e-01 7.536492e-03 0.003768246 [335,] 9.971349e-01 5.730113e-03 0.002865057 [336,] 9.975531e-01 4.893858e-03 0.002446929 [337,] 9.978010e-01 4.397915e-03 0.002198957 [338,] 9.967960e-01 6.407941e-03 0.003203970 [339,] 9.949117e-01 1.017667e-02 0.005088336 [340,] 9.907456e-01 1.850874e-02 0.009254368 [341,] 9.908400e-01 1.832000e-02 0.009160000 [342,] 9.837565e-01 3.248703e-02 0.016243516 [343,] 9.703902e-01 5.921952e-02 0.029609759 [344,] 9.480540e-01 1.038919e-01 0.051945973 [345,] 9.783286e-01 4.334272e-02 0.021671358 [346,] 9.701519e-01 5.969623e-02 0.029848117 [347,] 9.424525e-01 1.150950e-01 0.057547525 [348,] 9.020695e-01 1.958610e-01 0.097930476 [349,] 8.810963e-01 2.378073e-01 0.118903657 [350,] 8.362123e-01 3.275754e-01 0.163787718 [351,] 7.840126e-01 4.319748e-01 0.215987379 > postscript(file="/var/wessaorg/rcomp/tmp/1s1mo1322154116.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/2nhuq1322154116.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/3j07k1322154116.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/44xd01322154116.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/53dhv1322154116.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 = 360 Frequency = 1 1 2 3 4 5 6 24.27461187 17.41012642 11.85384216 0.97851366 -7.88549391 -10.01281809 7 8 9 10 11 12 -8.87149716 -7.21849553 -6.19789413 -5.11901279 -2.48917028 -1.63544913 13 14 15 16 17 18 -0.86000792 -0.12936714 0.15887342 3.04767602 4.15863719 6.16127905 19 20 21 22 23 24 7.31224021 11.04100344 12.59916525 12.68772621 12.05288640 11.70148673 25 26 27 28 29 30 12.16280766 11.65964854 4.17645006 4.42985081 6.23741123 8.84713021 31 32 33 34 35 36 4.70432545 -0.55152030 0.28655736 0.45179630 0.55047537 0.76567494 37 38 39 40 41 42 4.15723751 1.64179630 2.91859781 7.17231896 5.48751853 4.91403902 43 44 45 46 47 48 2.29447753 2.25891820 4.35532058 4.85248186 7.48160484 12.94112696 49 50 51 52 53 54 13.40004768 16.65949105 17.33769224 17.24421274 17.17245330 15.91281306 55 56 57 58 59 60 15.88897380 15.31481415 14.57997434 18.26101425 21.56269495 18.32109300 61 62 63 64 65 66 17.65141339 13.57605092 16.63641068 16.49469062 15.30849051 14.67881090 67 68 69 70 71 72 14.56877153 13.10465125 12.55601155 19.14253205 17.72769224 15.99149213 73 74 75 76 77 78 14.27841177 12.58257142 11.06809138 13.87493226 13.63389235 12.46181252 79 80 81 82 83 84 11.45593280 9.54733248 12.74661296 12.99421274 11.97045222 11.10973270 85 86 87 88 89 90 9.58117174 6.65297055 6.31225103 6.00985081 5.31573053 3.71232978 91 92 93 94 95 96 1.46856926 3.14924941 3.33512913 1.66996893 1.20960917 1.70720895 97 98 99 100 101 102 0.26720895 -2.01759148 -0.69655157 -3.66863139 -6.24071122 -4.69691133 103 104 105 106 107 108 -6.79863139 -7.06215027 -4.91527001 -7.08491025 -3.50527001 -1.40054832 109 110 111 112 113 114 -1.34027271 -14.57465086 -5.45161527 -2.18929380 -0.12693296 -0.29525227 115 116 117 118 119 120 0.09326931 2.22067223 5.75971647 5.04279684 5.11215606 3.48559619 121 122 123 124 125 126 2.74003686 3.47199857 3.46743978 4.57800182 5.79752394 4.86164422 127 128 129 130 131 132 4.36884487 5.85112696 3.74876612 3.49540474 8.41420733 8.26864800 133 134 135 136 137 138 5.63740582 7.47568575 7.54628716 6.26880549 6.09912588 4.84772621 139 140 141 142 143 144 1.67884487 1.41016580 -0.31499440 0.64640528 3.96852448 1.63960376 145 146 147 148 149 150 0.64724292 -4.77987899 -5.31575870 -0.92600035 -3.92352139 -3.21248147 151 152 153 154 155 156 -5.32240273 -5.35144156 -4.91291998 -3.64851868 0.53888424 -2.01727650 157 158 159 160 161 162 -3.22247606 -6.32999710 -2.33423550 0.02920463 -3.10451652 -5.77687736 163 164 165 166 167 168 -9.36435903 -10.12887844 -3.78439840 -4.74059851 -3.83519667 -5.21623658 169 170 171 172 173 174 -6.60519667 -8.46343723 -5.12595557 -2.28315622 -2.21735524 -3.02323496 175 176 177 178 179 180 -2.47159364 -1.43515189 -2.06347120 -0.67483150 -0.38591079 -0.34838975 181 182 183 184 185 186 -1.51971068 -5.82451111 -6.13182988 -6.27426947 -8.23179051 -7.93838975 187 188 189 190 191 192 -12.47387033 -14.76150949 -13.25126784 -12.58546687 -10.37422469 -10.19874410 193 194 195 196 197 198 -10.37186384 -13.57586601 -14.31826622 -12.11686655 -12.79474735 -14.01230776 199 200 201 202 203 204 -14.92090808 -7.30338704 -7.66270689 -6.08798521 -6.85830559 -8.92858661 205 206 207 208 209 210 -10.76058769 -3.88334767 16.14801263 14.95077261 13.59321220 12.83709084 211 212 213 214 215 216 -8.68224524 -20.10862988 -5.30934940 -2.48142923 -3.62310992 -4.97910776 217 218 219 220 221 222 -7.38494810 -3.81758455 -2.46534183 -2.59158131 0.90149906 -2.26058077 223 224 225 226 227 228 -3.34890008 -7.66266060 -7.63445941 -7.31601657 -5.80677547 -4.20789413 229 230 231 232 233 234 -5.75089034 -3.50501062 -2.86540976 -5.17888926 -2.16796746 -3.16452734 235 236 237 238 239 240 1.11539392 16.63299370 20.11567494 22.34603470 24.04767602 15.63391550 241 242 243 244 245 246 11.01459565 29.56875530 68.11971106 47.76402280 66.41741815 57.78785125 247 248 249 250 251 252 13.09984692 5.29300604 1.86948716 2.26849203 -0.27714605 10.96093702 253 254 255 256 257 258 14.44557997 22.88206109 6.18765979 9.88342139 0.59986315 1.53594514 259 260 261 262 263 264 2.93454546 3.52962691 -2.60221127 -1.05512874 4.94691171 7.00755249 265 266 267 268 269 270 6.08719273 3.36787288 3.23035184 2.02275206 -0.39720857 1.67855303 271 272 273 274 275 276 -4.26420695 -7.03212712 -10.27872636 -12.73308829 0.05671485 12.01431463 277 278 279 280 281 282 -2.49300954 -11.31489251 -9.02633155 -11.86157049 -11.56784935 -14.23384718 283 284 285 286 287 288 -14.96244751 -18.89796746 -16.87776519 -15.13848472 -11.81272312 -12.48828245 289 290 291 292 293 294 -16.06516271 -22.21448255 -21.67760229 -16.38012063 -11.62567996 -23.89284123 295 296 297 298 299 300 -22.67567996 -20.66643886 -19.19439840 -24.78199818 -21.05651760 -19.94351598 301 302 303 304 305 306 -18.44003648 -20.18243669 -12.64255481 -12.75963734 -19.65303810 -20.25451652 307 308 309 310 311 312 -28.22687736 -28.75935632 -23.11143615 -21.77667509 -18.68907531 -24.62051436 313 314 315 316 317 318 -24.78615784 -24.12315622 -27.58831641 -27.03131803 -23.58727650 -26.85383637 319 320 321 322 323 324 -23.22795665 -25.53143615 -25.00695611 -23.65639407 -21.57335308 -22.69839516 325 326 327 328 329 330 -16.78147552 -15.52083475 -15.19107639 -16.56731587 -12.88983420 -5.26339245 331 332 333 334 335 336 -17.18011522 -16.20011522 -9.29115513 -9.51499440 0.38388694 10.06836699 337 338 339 340 341 342 3.40184108 20.05100344 32.12144195 18.37899695 13.07463502 3.85475314 343 344 345 346 347 348 -3.72156509 -7.81308829 -11.61968753 -1.84968753 6.10527580 7.75519706 349 350 351 352 353 354 23.14691712 15.31683838 5.80735563 7.22251582 2.19983459 0.41267872 355 356 357 358 359 360 1.76163881 6.74755790 3.66407840 3.19747915 14.83267872 23.83847970 > postscript(file="/var/wessaorg/rcomp/tmp/67dsn1322154116.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 = 360 Frequency = 1 lag(myerror, k = 1) myerror 0 24.27461187 NA 1 17.41012642 24.27461187 2 11.85384216 17.41012642 3 0.97851366 11.85384216 4 -7.88549391 0.97851366 5 -10.01281809 -7.88549391 6 -8.87149716 -10.01281809 7 -7.21849553 -8.87149716 8 -6.19789413 -7.21849553 9 -5.11901279 -6.19789413 10 -2.48917028 -5.11901279 11 -1.63544913 -2.48917028 12 -0.86000792 -1.63544913 13 -0.12936714 -0.86000792 14 0.15887342 -0.12936714 15 3.04767602 0.15887342 16 4.15863719 3.04767602 17 6.16127905 4.15863719 18 7.31224021 6.16127905 19 11.04100344 7.31224021 20 12.59916525 11.04100344 21 12.68772621 12.59916525 22 12.05288640 12.68772621 23 11.70148673 12.05288640 24 12.16280766 11.70148673 25 11.65964854 12.16280766 26 4.17645006 11.65964854 27 4.42985081 4.17645006 28 6.23741123 4.42985081 29 8.84713021 6.23741123 30 4.70432545 8.84713021 31 -0.55152030 4.70432545 32 0.28655736 -0.55152030 33 0.45179630 0.28655736 34 0.55047537 0.45179630 35 0.76567494 0.55047537 36 4.15723751 0.76567494 37 1.64179630 4.15723751 38 2.91859781 1.64179630 39 7.17231896 2.91859781 40 5.48751853 7.17231896 41 4.91403902 5.48751853 42 2.29447753 4.91403902 43 2.25891820 2.29447753 44 4.35532058 2.25891820 45 4.85248186 4.35532058 46 7.48160484 4.85248186 47 12.94112696 7.48160484 48 13.40004768 12.94112696 49 16.65949105 13.40004768 50 17.33769224 16.65949105 51 17.24421274 17.33769224 52 17.17245330 17.24421274 53 15.91281306 17.17245330 54 15.88897380 15.91281306 55 15.31481415 15.88897380 56 14.57997434 15.31481415 57 18.26101425 14.57997434 58 21.56269495 18.26101425 59 18.32109300 21.56269495 60 17.65141339 18.32109300 61 13.57605092 17.65141339 62 16.63641068 13.57605092 63 16.49469062 16.63641068 64 15.30849051 16.49469062 65 14.67881090 15.30849051 66 14.56877153 14.67881090 67 13.10465125 14.56877153 68 12.55601155 13.10465125 69 19.14253205 12.55601155 70 17.72769224 19.14253205 71 15.99149213 17.72769224 72 14.27841177 15.99149213 73 12.58257142 14.27841177 74 11.06809138 12.58257142 75 13.87493226 11.06809138 76 13.63389235 13.87493226 77 12.46181252 13.63389235 78 11.45593280 12.46181252 79 9.54733248 11.45593280 80 12.74661296 9.54733248 81 12.99421274 12.74661296 82 11.97045222 12.99421274 83 11.10973270 11.97045222 84 9.58117174 11.10973270 85 6.65297055 9.58117174 86 6.31225103 6.65297055 87 6.00985081 6.31225103 88 5.31573053 6.00985081 89 3.71232978 5.31573053 90 1.46856926 3.71232978 91 3.14924941 1.46856926 92 3.33512913 3.14924941 93 1.66996893 3.33512913 94 1.20960917 1.66996893 95 1.70720895 1.20960917 96 0.26720895 1.70720895 97 -2.01759148 0.26720895 98 -0.69655157 -2.01759148 99 -3.66863139 -0.69655157 100 -6.24071122 -3.66863139 101 -4.69691133 -6.24071122 102 -6.79863139 -4.69691133 103 -7.06215027 -6.79863139 104 -4.91527001 -7.06215027 105 -7.08491025 -4.91527001 106 -3.50527001 -7.08491025 107 -1.40054832 -3.50527001 108 -1.34027271 -1.40054832 109 -14.57465086 -1.34027271 110 -5.45161527 -14.57465086 111 -2.18929380 -5.45161527 112 -0.12693296 -2.18929380 113 -0.29525227 -0.12693296 114 0.09326931 -0.29525227 115 2.22067223 0.09326931 116 5.75971647 2.22067223 117 5.04279684 5.75971647 118 5.11215606 5.04279684 119 3.48559619 5.11215606 120 2.74003686 3.48559619 121 3.47199857 2.74003686 122 3.46743978 3.47199857 123 4.57800182 3.46743978 124 5.79752394 4.57800182 125 4.86164422 5.79752394 126 4.36884487 4.86164422 127 5.85112696 4.36884487 128 3.74876612 5.85112696 129 3.49540474 3.74876612 130 8.41420733 3.49540474 131 8.26864800 8.41420733 132 5.63740582 8.26864800 133 7.47568575 5.63740582 134 7.54628716 7.47568575 135 6.26880549 7.54628716 136 6.09912588 6.26880549 137 4.84772621 6.09912588 138 1.67884487 4.84772621 139 1.41016580 1.67884487 140 -0.31499440 1.41016580 141 0.64640528 -0.31499440 142 3.96852448 0.64640528 143 1.63960376 3.96852448 144 0.64724292 1.63960376 145 -4.77987899 0.64724292 146 -5.31575870 -4.77987899 147 -0.92600035 -5.31575870 148 -3.92352139 -0.92600035 149 -3.21248147 -3.92352139 150 -5.32240273 -3.21248147 151 -5.35144156 -5.32240273 152 -4.91291998 -5.35144156 153 -3.64851868 -4.91291998 154 0.53888424 -3.64851868 155 -2.01727650 0.53888424 156 -3.22247606 -2.01727650 157 -6.32999710 -3.22247606 158 -2.33423550 -6.32999710 159 0.02920463 -2.33423550 160 -3.10451652 0.02920463 161 -5.77687736 -3.10451652 162 -9.36435903 -5.77687736 163 -10.12887844 -9.36435903 164 -3.78439840 -10.12887844 165 -4.74059851 -3.78439840 166 -3.83519667 -4.74059851 167 -5.21623658 -3.83519667 168 -6.60519667 -5.21623658 169 -8.46343723 -6.60519667 170 -5.12595557 -8.46343723 171 -2.28315622 -5.12595557 172 -2.21735524 -2.28315622 173 -3.02323496 -2.21735524 174 -2.47159364 -3.02323496 175 -1.43515189 -2.47159364 176 -2.06347120 -1.43515189 177 -0.67483150 -2.06347120 178 -0.38591079 -0.67483150 179 -0.34838975 -0.38591079 180 -1.51971068 -0.34838975 181 -5.82451111 -1.51971068 182 -6.13182988 -5.82451111 183 -6.27426947 -6.13182988 184 -8.23179051 -6.27426947 185 -7.93838975 -8.23179051 186 -12.47387033 -7.93838975 187 -14.76150949 -12.47387033 188 -13.25126784 -14.76150949 189 -12.58546687 -13.25126784 190 -10.37422469 -12.58546687 191 -10.19874410 -10.37422469 192 -10.37186384 -10.19874410 193 -13.57586601 -10.37186384 194 -14.31826622 -13.57586601 195 -12.11686655 -14.31826622 196 -12.79474735 -12.11686655 197 -14.01230776 -12.79474735 198 -14.92090808 -14.01230776 199 -7.30338704 -14.92090808 200 -7.66270689 -7.30338704 201 -6.08798521 -7.66270689 202 -6.85830559 -6.08798521 203 -8.92858661 -6.85830559 204 -10.76058769 -8.92858661 205 -3.88334767 -10.76058769 206 16.14801263 -3.88334767 207 14.95077261 16.14801263 208 13.59321220 14.95077261 209 12.83709084 13.59321220 210 -8.68224524 12.83709084 211 -20.10862988 -8.68224524 212 -5.30934940 -20.10862988 213 -2.48142923 -5.30934940 214 -3.62310992 -2.48142923 215 -4.97910776 -3.62310992 216 -7.38494810 -4.97910776 217 -3.81758455 -7.38494810 218 -2.46534183 -3.81758455 219 -2.59158131 -2.46534183 220 0.90149906 -2.59158131 221 -2.26058077 0.90149906 222 -3.34890008 -2.26058077 223 -7.66266060 -3.34890008 224 -7.63445941 -7.66266060 225 -7.31601657 -7.63445941 226 -5.80677547 -7.31601657 227 -4.20789413 -5.80677547 228 -5.75089034 -4.20789413 229 -3.50501062 -5.75089034 230 -2.86540976 -3.50501062 231 -5.17888926 -2.86540976 232 -2.16796746 -5.17888926 233 -3.16452734 -2.16796746 234 1.11539392 -3.16452734 235 16.63299370 1.11539392 236 20.11567494 16.63299370 237 22.34603470 20.11567494 238 24.04767602 22.34603470 239 15.63391550 24.04767602 240 11.01459565 15.63391550 241 29.56875530 11.01459565 242 68.11971106 29.56875530 243 47.76402280 68.11971106 244 66.41741815 47.76402280 245 57.78785125 66.41741815 246 13.09984692 57.78785125 247 5.29300604 13.09984692 248 1.86948716 5.29300604 249 2.26849203 1.86948716 250 -0.27714605 2.26849203 251 10.96093702 -0.27714605 252 14.44557997 10.96093702 253 22.88206109 14.44557997 254 6.18765979 22.88206109 255 9.88342139 6.18765979 256 0.59986315 9.88342139 257 1.53594514 0.59986315 258 2.93454546 1.53594514 259 3.52962691 2.93454546 260 -2.60221127 3.52962691 261 -1.05512874 -2.60221127 262 4.94691171 -1.05512874 263 7.00755249 4.94691171 264 6.08719273 7.00755249 265 3.36787288 6.08719273 266 3.23035184 3.36787288 267 2.02275206 3.23035184 268 -0.39720857 2.02275206 269 1.67855303 -0.39720857 270 -4.26420695 1.67855303 271 -7.03212712 -4.26420695 272 -10.27872636 -7.03212712 273 -12.73308829 -10.27872636 274 0.05671485 -12.73308829 275 12.01431463 0.05671485 276 -2.49300954 12.01431463 277 -11.31489251 -2.49300954 278 -9.02633155 -11.31489251 279 -11.86157049 -9.02633155 280 -11.56784935 -11.86157049 281 -14.23384718 -11.56784935 282 -14.96244751 -14.23384718 283 -18.89796746 -14.96244751 284 -16.87776519 -18.89796746 285 -15.13848472 -16.87776519 286 -11.81272312 -15.13848472 287 -12.48828245 -11.81272312 288 -16.06516271 -12.48828245 289 -22.21448255 -16.06516271 290 -21.67760229 -22.21448255 291 -16.38012063 -21.67760229 292 -11.62567996 -16.38012063 293 -23.89284123 -11.62567996 294 -22.67567996 -23.89284123 295 -20.66643886 -22.67567996 296 -19.19439840 -20.66643886 297 -24.78199818 -19.19439840 298 -21.05651760 -24.78199818 299 -19.94351598 -21.05651760 300 -18.44003648 -19.94351598 301 -20.18243669 -18.44003648 302 -12.64255481 -20.18243669 303 -12.75963734 -12.64255481 304 -19.65303810 -12.75963734 305 -20.25451652 -19.65303810 306 -28.22687736 -20.25451652 307 -28.75935632 -28.22687736 308 -23.11143615 -28.75935632 309 -21.77667509 -23.11143615 310 -18.68907531 -21.77667509 311 -24.62051436 -18.68907531 312 -24.78615784 -24.62051436 313 -24.12315622 -24.78615784 314 -27.58831641 -24.12315622 315 -27.03131803 -27.58831641 316 -23.58727650 -27.03131803 317 -26.85383637 -23.58727650 318 -23.22795665 -26.85383637 319 -25.53143615 -23.22795665 320 -25.00695611 -25.53143615 321 -23.65639407 -25.00695611 322 -21.57335308 -23.65639407 323 -22.69839516 -21.57335308 324 -16.78147552 -22.69839516 325 -15.52083475 -16.78147552 326 -15.19107639 -15.52083475 327 -16.56731587 -15.19107639 328 -12.88983420 -16.56731587 329 -5.26339245 -12.88983420 330 -17.18011522 -5.26339245 331 -16.20011522 -17.18011522 332 -9.29115513 -16.20011522 333 -9.51499440 -9.29115513 334 0.38388694 -9.51499440 335 10.06836699 0.38388694 336 3.40184108 10.06836699 337 20.05100344 3.40184108 338 32.12144195 20.05100344 339 18.37899695 32.12144195 340 13.07463502 18.37899695 341 3.85475314 13.07463502 342 -3.72156509 3.85475314 343 -7.81308829 -3.72156509 344 -11.61968753 -7.81308829 345 -1.84968753 -11.61968753 346 6.10527580 -1.84968753 347 7.75519706 6.10527580 348 23.14691712 7.75519706 349 15.31683838 23.14691712 350 5.80735563 15.31683838 351 7.22251582 5.80735563 352 2.19983459 7.22251582 353 0.41267872 2.19983459 354 1.76163881 0.41267872 355 6.74755790 1.76163881 356 3.66407840 6.74755790 357 3.19747915 3.66407840 358 14.83267872 3.19747915 359 23.83847970 14.83267872 360 NA 23.83847970 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 17.41012642 24.27461187 [2,] 11.85384216 17.41012642 [3,] 0.97851366 11.85384216 [4,] -7.88549391 0.97851366 [5,] -10.01281809 -7.88549391 [6,] -8.87149716 -10.01281809 [7,] -7.21849553 -8.87149716 [8,] -6.19789413 -7.21849553 [9,] -5.11901279 -6.19789413 [10,] -2.48917028 -5.11901279 [11,] -1.63544913 -2.48917028 [12,] -0.86000792 -1.63544913 [13,] -0.12936714 -0.86000792 [14,] 0.15887342 -0.12936714 [15,] 3.04767602 0.15887342 [16,] 4.15863719 3.04767602 [17,] 6.16127905 4.15863719 [18,] 7.31224021 6.16127905 [19,] 11.04100344 7.31224021 [20,] 12.59916525 11.04100344 [21,] 12.68772621 12.59916525 [22,] 12.05288640 12.68772621 [23,] 11.70148673 12.05288640 [24,] 12.16280766 11.70148673 [25,] 11.65964854 12.16280766 [26,] 4.17645006 11.65964854 [27,] 4.42985081 4.17645006 [28,] 6.23741123 4.42985081 [29,] 8.84713021 6.23741123 [30,] 4.70432545 8.84713021 [31,] -0.55152030 4.70432545 [32,] 0.28655736 -0.55152030 [33,] 0.45179630 0.28655736 [34,] 0.55047537 0.45179630 [35,] 0.76567494 0.55047537 [36,] 4.15723751 0.76567494 [37,] 1.64179630 4.15723751 [38,] 2.91859781 1.64179630 [39,] 7.17231896 2.91859781 [40,] 5.48751853 7.17231896 [41,] 4.91403902 5.48751853 [42,] 2.29447753 4.91403902 [43,] 2.25891820 2.29447753 [44,] 4.35532058 2.25891820 [45,] 4.85248186 4.35532058 [46,] 7.48160484 4.85248186 [47,] 12.94112696 7.48160484 [48,] 13.40004768 12.94112696 [49,] 16.65949105 13.40004768 [50,] 17.33769224 16.65949105 [51,] 17.24421274 17.33769224 [52,] 17.17245330 17.24421274 [53,] 15.91281306 17.17245330 [54,] 15.88897380 15.91281306 [55,] 15.31481415 15.88897380 [56,] 14.57997434 15.31481415 [57,] 18.26101425 14.57997434 [58,] 21.56269495 18.26101425 [59,] 18.32109300 21.56269495 [60,] 17.65141339 18.32109300 [61,] 13.57605092 17.65141339 [62,] 16.63641068 13.57605092 [63,] 16.49469062 16.63641068 [64,] 15.30849051 16.49469062 [65,] 14.67881090 15.30849051 [66,] 14.56877153 14.67881090 [67,] 13.10465125 14.56877153 [68,] 12.55601155 13.10465125 [69,] 19.14253205 12.55601155 [70,] 17.72769224 19.14253205 [71,] 15.99149213 17.72769224 [72,] 14.27841177 15.99149213 [73,] 12.58257142 14.27841177 [74,] 11.06809138 12.58257142 [75,] 13.87493226 11.06809138 [76,] 13.63389235 13.87493226 [77,] 12.46181252 13.63389235 [78,] 11.45593280 12.46181252 [79,] 9.54733248 11.45593280 [80,] 12.74661296 9.54733248 [81,] 12.99421274 12.74661296 [82,] 11.97045222 12.99421274 [83,] 11.10973270 11.97045222 [84,] 9.58117174 11.10973270 [85,] 6.65297055 9.58117174 [86,] 6.31225103 6.65297055 [87,] 6.00985081 6.31225103 [88,] 5.31573053 6.00985081 [89,] 3.71232978 5.31573053 [90,] 1.46856926 3.71232978 [91,] 3.14924941 1.46856926 [92,] 3.33512913 3.14924941 [93,] 1.66996893 3.33512913 [94,] 1.20960917 1.66996893 [95,] 1.70720895 1.20960917 [96,] 0.26720895 1.70720895 [97,] -2.01759148 0.26720895 [98,] -0.69655157 -2.01759148 [99,] -3.66863139 -0.69655157 [100,] -6.24071122 -3.66863139 [101,] -4.69691133 -6.24071122 [102,] -6.79863139 -4.69691133 [103,] -7.06215027 -6.79863139 [104,] -4.91527001 -7.06215027 [105,] -7.08491025 -4.91527001 [106,] -3.50527001 -7.08491025 [107,] -1.40054832 -3.50527001 [108,] -1.34027271 -1.40054832 [109,] -14.57465086 -1.34027271 [110,] -5.45161527 -14.57465086 [111,] -2.18929380 -5.45161527 [112,] -0.12693296 -2.18929380 [113,] -0.29525227 -0.12693296 [114,] 0.09326931 -0.29525227 [115,] 2.22067223 0.09326931 [116,] 5.75971647 2.22067223 [117,] 5.04279684 5.75971647 [118,] 5.11215606 5.04279684 [119,] 3.48559619 5.11215606 [120,] 2.74003686 3.48559619 [121,] 3.47199857 2.74003686 [122,] 3.46743978 3.47199857 [123,] 4.57800182 3.46743978 [124,] 5.79752394 4.57800182 [125,] 4.86164422 5.79752394 [126,] 4.36884487 4.86164422 [127,] 5.85112696 4.36884487 [128,] 3.74876612 5.85112696 [129,] 3.49540474 3.74876612 [130,] 8.41420733 3.49540474 [131,] 8.26864800 8.41420733 [132,] 5.63740582 8.26864800 [133,] 7.47568575 5.63740582 [134,] 7.54628716 7.47568575 [135,] 6.26880549 7.54628716 [136,] 6.09912588 6.26880549 [137,] 4.84772621 6.09912588 [138,] 1.67884487 4.84772621 [139,] 1.41016580 1.67884487 [140,] -0.31499440 1.41016580 [141,] 0.64640528 -0.31499440 [142,] 3.96852448 0.64640528 [143,] 1.63960376 3.96852448 [144,] 0.64724292 1.63960376 [145,] -4.77987899 0.64724292 [146,] -5.31575870 -4.77987899 [147,] -0.92600035 -5.31575870 [148,] -3.92352139 -0.92600035 [149,] -3.21248147 -3.92352139 [150,] -5.32240273 -3.21248147 [151,] -5.35144156 -5.32240273 [152,] -4.91291998 -5.35144156 [153,] -3.64851868 -4.91291998 [154,] 0.53888424 -3.64851868 [155,] -2.01727650 0.53888424 [156,] -3.22247606 -2.01727650 [157,] -6.32999710 -3.22247606 [158,] -2.33423550 -6.32999710 [159,] 0.02920463 -2.33423550 [160,] -3.10451652 0.02920463 [161,] -5.77687736 -3.10451652 [162,] -9.36435903 -5.77687736 [163,] -10.12887844 -9.36435903 [164,] -3.78439840 -10.12887844 [165,] -4.74059851 -3.78439840 [166,] -3.83519667 -4.74059851 [167,] -5.21623658 -3.83519667 [168,] -6.60519667 -5.21623658 [169,] -8.46343723 -6.60519667 [170,] -5.12595557 -8.46343723 [171,] -2.28315622 -5.12595557 [172,] -2.21735524 -2.28315622 [173,] -3.02323496 -2.21735524 [174,] -2.47159364 -3.02323496 [175,] -1.43515189 -2.47159364 [176,] -2.06347120 -1.43515189 [177,] -0.67483150 -2.06347120 [178,] -0.38591079 -0.67483150 [179,] -0.34838975 -0.38591079 [180,] -1.51971068 -0.34838975 [181,] -5.82451111 -1.51971068 [182,] -6.13182988 -5.82451111 [183,] -6.27426947 -6.13182988 [184,] -8.23179051 -6.27426947 [185,] -7.93838975 -8.23179051 [186,] -12.47387033 -7.93838975 [187,] -14.76150949 -12.47387033 [188,] -13.25126784 -14.76150949 [189,] -12.58546687 -13.25126784 [190,] -10.37422469 -12.58546687 [191,] -10.19874410 -10.37422469 [192,] -10.37186384 -10.19874410 [193,] -13.57586601 -10.37186384 [194,] -14.31826622 -13.57586601 [195,] -12.11686655 -14.31826622 [196,] -12.79474735 -12.11686655 [197,] -14.01230776 -12.79474735 [198,] -14.92090808 -14.01230776 [199,] -7.30338704 -14.92090808 [200,] -7.66270689 -7.30338704 [201,] -6.08798521 -7.66270689 [202,] -6.85830559 -6.08798521 [203,] -8.92858661 -6.85830559 [204,] -10.76058769 -8.92858661 [205,] -3.88334767 -10.76058769 [206,] 16.14801263 -3.88334767 [207,] 14.95077261 16.14801263 [208,] 13.59321220 14.95077261 [209,] 12.83709084 13.59321220 [210,] -8.68224524 12.83709084 [211,] -20.10862988 -8.68224524 [212,] -5.30934940 -20.10862988 [213,] -2.48142923 -5.30934940 [214,] -3.62310992 -2.48142923 [215,] -4.97910776 -3.62310992 [216,] -7.38494810 -4.97910776 [217,] -3.81758455 -7.38494810 [218,] -2.46534183 -3.81758455 [219,] -2.59158131 -2.46534183 [220,] 0.90149906 -2.59158131 [221,] -2.26058077 0.90149906 [222,] -3.34890008 -2.26058077 [223,] -7.66266060 -3.34890008 [224,] -7.63445941 -7.66266060 [225,] -7.31601657 -7.63445941 [226,] -5.80677547 -7.31601657 [227,] -4.20789413 -5.80677547 [228,] -5.75089034 -4.20789413 [229,] -3.50501062 -5.75089034 [230,] -2.86540976 -3.50501062 [231,] -5.17888926 -2.86540976 [232,] -2.16796746 -5.17888926 [233,] -3.16452734 -2.16796746 [234,] 1.11539392 -3.16452734 [235,] 16.63299370 1.11539392 [236,] 20.11567494 16.63299370 [237,] 22.34603470 20.11567494 [238,] 24.04767602 22.34603470 [239,] 15.63391550 24.04767602 [240,] 11.01459565 15.63391550 [241,] 29.56875530 11.01459565 [242,] 68.11971106 29.56875530 [243,] 47.76402280 68.11971106 [244,] 66.41741815 47.76402280 [245,] 57.78785125 66.41741815 [246,] 13.09984692 57.78785125 [247,] 5.29300604 13.09984692 [248,] 1.86948716 5.29300604 [249,] 2.26849203 1.86948716 [250,] -0.27714605 2.26849203 [251,] 10.96093702 -0.27714605 [252,] 14.44557997 10.96093702 [253,] 22.88206109 14.44557997 [254,] 6.18765979 22.88206109 [255,] 9.88342139 6.18765979 [256,] 0.59986315 9.88342139 [257,] 1.53594514 0.59986315 [258,] 2.93454546 1.53594514 [259,] 3.52962691 2.93454546 [260,] -2.60221127 3.52962691 [261,] -1.05512874 -2.60221127 [262,] 4.94691171 -1.05512874 [263,] 7.00755249 4.94691171 [264,] 6.08719273 7.00755249 [265,] 3.36787288 6.08719273 [266,] 3.23035184 3.36787288 [267,] 2.02275206 3.23035184 [268,] -0.39720857 2.02275206 [269,] 1.67855303 -0.39720857 [270,] -4.26420695 1.67855303 [271,] -7.03212712 -4.26420695 [272,] -10.27872636 -7.03212712 [273,] -12.73308829 -10.27872636 [274,] 0.05671485 -12.73308829 [275,] 12.01431463 0.05671485 [276,] -2.49300954 12.01431463 [277,] -11.31489251 -2.49300954 [278,] -9.02633155 -11.31489251 [279,] -11.86157049 -9.02633155 [280,] -11.56784935 -11.86157049 [281,] -14.23384718 -11.56784935 [282,] -14.96244751 -14.23384718 [283,] -18.89796746 -14.96244751 [284,] -16.87776519 -18.89796746 [285,] -15.13848472 -16.87776519 [286,] -11.81272312 -15.13848472 [287,] -12.48828245 -11.81272312 [288,] -16.06516271 -12.48828245 [289,] -22.21448255 -16.06516271 [290,] -21.67760229 -22.21448255 [291,] -16.38012063 -21.67760229 [292,] -11.62567996 -16.38012063 [293,] -23.89284123 -11.62567996 [294,] -22.67567996 -23.89284123 [295,] -20.66643886 -22.67567996 [296,] -19.19439840 -20.66643886 [297,] -24.78199818 -19.19439840 [298,] -21.05651760 -24.78199818 [299,] -19.94351598 -21.05651760 [300,] -18.44003648 -19.94351598 [301,] -20.18243669 -18.44003648 [302,] -12.64255481 -20.18243669 [303,] -12.75963734 -12.64255481 [304,] -19.65303810 -12.75963734 [305,] -20.25451652 -19.65303810 [306,] -28.22687736 -20.25451652 [307,] -28.75935632 -28.22687736 [308,] -23.11143615 -28.75935632 [309,] -21.77667509 -23.11143615 [310,] -18.68907531 -21.77667509 [311,] -24.62051436 -18.68907531 [312,] -24.78615784 -24.62051436 [313,] -24.12315622 -24.78615784 [314,] -27.58831641 -24.12315622 [315,] -27.03131803 -27.58831641 [316,] -23.58727650 -27.03131803 [317,] -26.85383637 -23.58727650 [318,] -23.22795665 -26.85383637 [319,] -25.53143615 -23.22795665 [320,] -25.00695611 -25.53143615 [321,] -23.65639407 -25.00695611 [322,] -21.57335308 -23.65639407 [323,] -22.69839516 -21.57335308 [324,] -16.78147552 -22.69839516 [325,] -15.52083475 -16.78147552 [326,] -15.19107639 -15.52083475 [327,] -16.56731587 -15.19107639 [328,] -12.88983420 -16.56731587 [329,] -5.26339245 -12.88983420 [330,] -17.18011522 -5.26339245 [331,] -16.20011522 -17.18011522 [332,] -9.29115513 -16.20011522 [333,] -9.51499440 -9.29115513 [334,] 0.38388694 -9.51499440 [335,] 10.06836699 0.38388694 [336,] 3.40184108 10.06836699 [337,] 20.05100344 3.40184108 [338,] 32.12144195 20.05100344 [339,] 18.37899695 32.12144195 [340,] 13.07463502 18.37899695 [341,] 3.85475314 13.07463502 [342,] -3.72156509 3.85475314 [343,] -7.81308829 -3.72156509 [344,] -11.61968753 -7.81308829 [345,] -1.84968753 -11.61968753 [346,] 6.10527580 -1.84968753 [347,] 7.75519706 6.10527580 [348,] 23.14691712 7.75519706 [349,] 15.31683838 23.14691712 [350,] 5.80735563 15.31683838 [351,] 7.22251582 5.80735563 [352,] 2.19983459 7.22251582 [353,] 0.41267872 2.19983459 [354,] 1.76163881 0.41267872 [355,] 6.74755790 1.76163881 [356,] 3.66407840 6.74755790 [357,] 3.19747915 3.66407840 [358,] 14.83267872 3.19747915 [359,] 23.83847970 14.83267872 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 17.41012642 24.27461187 2 11.85384216 17.41012642 3 0.97851366 11.85384216 4 -7.88549391 0.97851366 5 -10.01281809 -7.88549391 6 -8.87149716 -10.01281809 7 -7.21849553 -8.87149716 8 -6.19789413 -7.21849553 9 -5.11901279 -6.19789413 10 -2.48917028 -5.11901279 11 -1.63544913 -2.48917028 12 -0.86000792 -1.63544913 13 -0.12936714 -0.86000792 14 0.15887342 -0.12936714 15 3.04767602 0.15887342 16 4.15863719 3.04767602 17 6.16127905 4.15863719 18 7.31224021 6.16127905 19 11.04100344 7.31224021 20 12.59916525 11.04100344 21 12.68772621 12.59916525 22 12.05288640 12.68772621 23 11.70148673 12.05288640 24 12.16280766 11.70148673 25 11.65964854 12.16280766 26 4.17645006 11.65964854 27 4.42985081 4.17645006 28 6.23741123 4.42985081 29 8.84713021 6.23741123 30 4.70432545 8.84713021 31 -0.55152030 4.70432545 32 0.28655736 -0.55152030 33 0.45179630 0.28655736 34 0.55047537 0.45179630 35 0.76567494 0.55047537 36 4.15723751 0.76567494 37 1.64179630 4.15723751 38 2.91859781 1.64179630 39 7.17231896 2.91859781 40 5.48751853 7.17231896 41 4.91403902 5.48751853 42 2.29447753 4.91403902 43 2.25891820 2.29447753 44 4.35532058 2.25891820 45 4.85248186 4.35532058 46 7.48160484 4.85248186 47 12.94112696 7.48160484 48 13.40004768 12.94112696 49 16.65949105 13.40004768 50 17.33769224 16.65949105 51 17.24421274 17.33769224 52 17.17245330 17.24421274 53 15.91281306 17.17245330 54 15.88897380 15.91281306 55 15.31481415 15.88897380 56 14.57997434 15.31481415 57 18.26101425 14.57997434 58 21.56269495 18.26101425 59 18.32109300 21.56269495 60 17.65141339 18.32109300 61 13.57605092 17.65141339 62 16.63641068 13.57605092 63 16.49469062 16.63641068 64 15.30849051 16.49469062 65 14.67881090 15.30849051 66 14.56877153 14.67881090 67 13.10465125 14.56877153 68 12.55601155 13.10465125 69 19.14253205 12.55601155 70 17.72769224 19.14253205 71 15.99149213 17.72769224 72 14.27841177 15.99149213 73 12.58257142 14.27841177 74 11.06809138 12.58257142 75 13.87493226 11.06809138 76 13.63389235 13.87493226 77 12.46181252 13.63389235 78 11.45593280 12.46181252 79 9.54733248 11.45593280 80 12.74661296 9.54733248 81 12.99421274 12.74661296 82 11.97045222 12.99421274 83 11.10973270 11.97045222 84 9.58117174 11.10973270 85 6.65297055 9.58117174 86 6.31225103 6.65297055 87 6.00985081 6.31225103 88 5.31573053 6.00985081 89 3.71232978 5.31573053 90 1.46856926 3.71232978 91 3.14924941 1.46856926 92 3.33512913 3.14924941 93 1.66996893 3.33512913 94 1.20960917 1.66996893 95 1.70720895 1.20960917 96 0.26720895 1.70720895 97 -2.01759148 0.26720895 98 -0.69655157 -2.01759148 99 -3.66863139 -0.69655157 100 -6.24071122 -3.66863139 101 -4.69691133 -6.24071122 102 -6.79863139 -4.69691133 103 -7.06215027 -6.79863139 104 -4.91527001 -7.06215027 105 -7.08491025 -4.91527001 106 -3.50527001 -7.08491025 107 -1.40054832 -3.50527001 108 -1.34027271 -1.40054832 109 -14.57465086 -1.34027271 110 -5.45161527 -14.57465086 111 -2.18929380 -5.45161527 112 -0.12693296 -2.18929380 113 -0.29525227 -0.12693296 114 0.09326931 -0.29525227 115 2.22067223 0.09326931 116 5.75971647 2.22067223 117 5.04279684 5.75971647 118 5.11215606 5.04279684 119 3.48559619 5.11215606 120 2.74003686 3.48559619 121 3.47199857 2.74003686 122 3.46743978 3.47199857 123 4.57800182 3.46743978 124 5.79752394 4.57800182 125 4.86164422 5.79752394 126 4.36884487 4.86164422 127 5.85112696 4.36884487 128 3.74876612 5.85112696 129 3.49540474 3.74876612 130 8.41420733 3.49540474 131 8.26864800 8.41420733 132 5.63740582 8.26864800 133 7.47568575 5.63740582 134 7.54628716 7.47568575 135 6.26880549 7.54628716 136 6.09912588 6.26880549 137 4.84772621 6.09912588 138 1.67884487 4.84772621 139 1.41016580 1.67884487 140 -0.31499440 1.41016580 141 0.64640528 -0.31499440 142 3.96852448 0.64640528 143 1.63960376 3.96852448 144 0.64724292 1.63960376 145 -4.77987899 0.64724292 146 -5.31575870 -4.77987899 147 -0.92600035 -5.31575870 148 -3.92352139 -0.92600035 149 -3.21248147 -3.92352139 150 -5.32240273 -3.21248147 151 -5.35144156 -5.32240273 152 -4.91291998 -5.35144156 153 -3.64851868 -4.91291998 154 0.53888424 -3.64851868 155 -2.01727650 0.53888424 156 -3.22247606 -2.01727650 157 -6.32999710 -3.22247606 158 -2.33423550 -6.32999710 159 0.02920463 -2.33423550 160 -3.10451652 0.02920463 161 -5.77687736 -3.10451652 162 -9.36435903 -5.77687736 163 -10.12887844 -9.36435903 164 -3.78439840 -10.12887844 165 -4.74059851 -3.78439840 166 -3.83519667 -4.74059851 167 -5.21623658 -3.83519667 168 -6.60519667 -5.21623658 169 -8.46343723 -6.60519667 170 -5.12595557 -8.46343723 171 -2.28315622 -5.12595557 172 -2.21735524 -2.28315622 173 -3.02323496 -2.21735524 174 -2.47159364 -3.02323496 175 -1.43515189 -2.47159364 176 -2.06347120 -1.43515189 177 -0.67483150 -2.06347120 178 -0.38591079 -0.67483150 179 -0.34838975 -0.38591079 180 -1.51971068 -0.34838975 181 -5.82451111 -1.51971068 182 -6.13182988 -5.82451111 183 -6.27426947 -6.13182988 184 -8.23179051 -6.27426947 185 -7.93838975 -8.23179051 186 -12.47387033 -7.93838975 187 -14.76150949 -12.47387033 188 -13.25126784 -14.76150949 189 -12.58546687 -13.25126784 190 -10.37422469 -12.58546687 191 -10.19874410 -10.37422469 192 -10.37186384 -10.19874410 193 -13.57586601 -10.37186384 194 -14.31826622 -13.57586601 195 -12.11686655 -14.31826622 196 -12.79474735 -12.11686655 197 -14.01230776 -12.79474735 198 -14.92090808 -14.01230776 199 -7.30338704 -14.92090808 200 -7.66270689 -7.30338704 201 -6.08798521 -7.66270689 202 -6.85830559 -6.08798521 203 -8.92858661 -6.85830559 204 -10.76058769 -8.92858661 205 -3.88334767 -10.76058769 206 16.14801263 -3.88334767 207 14.95077261 16.14801263 208 13.59321220 14.95077261 209 12.83709084 13.59321220 210 -8.68224524 12.83709084 211 -20.10862988 -8.68224524 212 -5.30934940 -20.10862988 213 -2.48142923 -5.30934940 214 -3.62310992 -2.48142923 215 -4.97910776 -3.62310992 216 -7.38494810 -4.97910776 217 -3.81758455 -7.38494810 218 -2.46534183 -3.81758455 219 -2.59158131 -2.46534183 220 0.90149906 -2.59158131 221 -2.26058077 0.90149906 222 -3.34890008 -2.26058077 223 -7.66266060 -3.34890008 224 -7.63445941 -7.66266060 225 -7.31601657 -7.63445941 226 -5.80677547 -7.31601657 227 -4.20789413 -5.80677547 228 -5.75089034 -4.20789413 229 -3.50501062 -5.75089034 230 -2.86540976 -3.50501062 231 -5.17888926 -2.86540976 232 -2.16796746 -5.17888926 233 -3.16452734 -2.16796746 234 1.11539392 -3.16452734 235 16.63299370 1.11539392 236 20.11567494 16.63299370 237 22.34603470 20.11567494 238 24.04767602 22.34603470 239 15.63391550 24.04767602 240 11.01459565 15.63391550 241 29.56875530 11.01459565 242 68.11971106 29.56875530 243 47.76402280 68.11971106 244 66.41741815 47.76402280 245 57.78785125 66.41741815 246 13.09984692 57.78785125 247 5.29300604 13.09984692 248 1.86948716 5.29300604 249 2.26849203 1.86948716 250 -0.27714605 2.26849203 251 10.96093702 -0.27714605 252 14.44557997 10.96093702 253 22.88206109 14.44557997 254 6.18765979 22.88206109 255 9.88342139 6.18765979 256 0.59986315 9.88342139 257 1.53594514 0.59986315 258 2.93454546 1.53594514 259 3.52962691 2.93454546 260 -2.60221127 3.52962691 261 -1.05512874 -2.60221127 262 4.94691171 -1.05512874 263 7.00755249 4.94691171 264 6.08719273 7.00755249 265 3.36787288 6.08719273 266 3.23035184 3.36787288 267 2.02275206 3.23035184 268 -0.39720857 2.02275206 269 1.67855303 -0.39720857 270 -4.26420695 1.67855303 271 -7.03212712 -4.26420695 272 -10.27872636 -7.03212712 273 -12.73308829 -10.27872636 274 0.05671485 -12.73308829 275 12.01431463 0.05671485 276 -2.49300954 12.01431463 277 -11.31489251 -2.49300954 278 -9.02633155 -11.31489251 279 -11.86157049 -9.02633155 280 -11.56784935 -11.86157049 281 -14.23384718 -11.56784935 282 -14.96244751 -14.23384718 283 -18.89796746 -14.96244751 284 -16.87776519 -18.89796746 285 -15.13848472 -16.87776519 286 -11.81272312 -15.13848472 287 -12.48828245 -11.81272312 288 -16.06516271 -12.48828245 289 -22.21448255 -16.06516271 290 -21.67760229 -22.21448255 291 -16.38012063 -21.67760229 292 -11.62567996 -16.38012063 293 -23.89284123 -11.62567996 294 -22.67567996 -23.89284123 295 -20.66643886 -22.67567996 296 -19.19439840 -20.66643886 297 -24.78199818 -19.19439840 298 -21.05651760 -24.78199818 299 -19.94351598 -21.05651760 300 -18.44003648 -19.94351598 301 -20.18243669 -18.44003648 302 -12.64255481 -20.18243669 303 -12.75963734 -12.64255481 304 -19.65303810 -12.75963734 305 -20.25451652 -19.65303810 306 -28.22687736 -20.25451652 307 -28.75935632 -28.22687736 308 -23.11143615 -28.75935632 309 -21.77667509 -23.11143615 310 -18.68907531 -21.77667509 311 -24.62051436 -18.68907531 312 -24.78615784 -24.62051436 313 -24.12315622 -24.78615784 314 -27.58831641 -24.12315622 315 -27.03131803 -27.58831641 316 -23.58727650 -27.03131803 317 -26.85383637 -23.58727650 318 -23.22795665 -26.85383637 319 -25.53143615 -23.22795665 320 -25.00695611 -25.53143615 321 -23.65639407 -25.00695611 322 -21.57335308 -23.65639407 323 -22.69839516 -21.57335308 324 -16.78147552 -22.69839516 325 -15.52083475 -16.78147552 326 -15.19107639 -15.52083475 327 -16.56731587 -15.19107639 328 -12.88983420 -16.56731587 329 -5.26339245 -12.88983420 330 -17.18011522 -5.26339245 331 -16.20011522 -17.18011522 332 -9.29115513 -16.20011522 333 -9.51499440 -9.29115513 334 0.38388694 -9.51499440 335 10.06836699 0.38388694 336 3.40184108 10.06836699 337 20.05100344 3.40184108 338 32.12144195 20.05100344 339 18.37899695 32.12144195 340 13.07463502 18.37899695 341 3.85475314 13.07463502 342 -3.72156509 3.85475314 343 -7.81308829 -3.72156509 344 -11.61968753 -7.81308829 345 -1.84968753 -11.61968753 346 6.10527580 -1.84968753 347 7.75519706 6.10527580 348 23.14691712 7.75519706 349 15.31683838 23.14691712 350 5.80735563 15.31683838 351 7.22251582 5.80735563 352 2.19983459 7.22251582 353 0.41267872 2.19983459 354 1.76163881 0.41267872 355 6.74755790 1.76163881 356 3.66407840 6.74755790 357 3.19747915 3.66407840 358 14.83267872 3.19747915 359 23.83847970 14.83267872 > 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/7sz0f1322154116.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/84ymx1322154116.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/9z8lm1322154116.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/10qgda1322154116.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/11hlul1322154116.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/12i8ll1322154116.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/13m2ht1322154116.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/14gag91322154116.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/15ahof1322154116.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/16fbcf1322154116.tab") + } > > try(system("convert tmp/1s1mo1322154116.ps tmp/1s1mo1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/2nhuq1322154116.ps tmp/2nhuq1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/3j07k1322154116.ps tmp/3j07k1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/44xd01322154116.ps tmp/44xd01322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/53dhv1322154116.ps tmp/53dhv1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/67dsn1322154116.ps tmp/67dsn1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/7sz0f1322154116.ps tmp/7sz0f1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/84ymx1322154116.ps tmp/84ymx1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/9z8lm1322154116.ps tmp/9z8lm1322154116.png",intern=TRUE)) character(0) > try(system("convert tmp/10qgda1322154116.ps tmp/10qgda1322154116.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.003 0.538 9.683