R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(184 + ,0 + ,155 + ,0 + ,201.8 + ,0 + ,224.6 + ,0 + ,204.9 + ,0 + ,190.8 + ,0 + ,199 + ,0 + ,179.9 + ,0 + ,211.9 + ,0 + ,200.1 + ,0 + ,208.6 + ,0 + ,232.6 + ,0 + ,199.5 + ,0 + ,169.1 + ,0 + ,194.4 + ,0 + ,227.9 + ,0 + ,224 + ,0 + ,258.1 + ,0 + ,207.6 + ,0 + ,228 + ,0 + ,221 + ,0 + ,247.3 + ,0 + ,214.3 + ,0 + ,252.5 + ,0 + ,256.7 + ,0 + ,194.9 + ,0 + ,264.6 + ,0 + ,277.1 + ,0 + ,236.6 + ,0 + ,271.6 + ,0 + ,216.3 + ,0 + ,241.1 + ,0 + ,265.8 + ,0 + ,280.6 + ,0 + ,276.8 + ,0 + ,263.7 + ,0 + ,231.3 + ,0 + ,190.9 + ,0 + ,250.9 + ,0 + ,252.8 + ,0 + ,214.4 + ,0 + ,268.2 + ,0 + ,178 + ,0 + ,215.6 + ,0 + ,241.3 + ,0 + ,228.3 + ,0 + ,236.5 + ,0 + ,263.5 + ,0 + ,238.8 + ,0 + ,215.1 + ,0 + ,244.6 + ,0 + ,263.5 + ,0 + ,242.7 + ,0 + ,253.4 + ,0 + ,197.3 + ,0 + ,250.5 + ,0 + ,290.8 + ,0 + ,245.9 + ,0 + ,299.5 + ,0 + ,295.8 + ,0 + ,264.1 + ,0 + ,262.7 + ,0 + ,297.1 + ,0 + ,345.1 + ,0 + ,293.9 + ,0 + ,269.4 + ,0 + ,244.9 + ,0 + ,274.2 + ,0 + ,312.5 + ,0 + ,279 + ,0 + ,327.3 + ,0 + ,289.2 + ,0 + ,285.4 + ,0 + ,248.9 + ,0 + ,240.6 + ,0 + ,308.5 + ,0 + ,285.6 + ,0 + ,284.4 + ,0 + ,253.6 + ,0 + ,286.3 + ,0 + ,302.2 + ,0 + ,278 + ,0 + ,304.3 + ,0 + ,304.6 + ,0 + ,283.7 + ,0 + ,253.8 + ,0 + ,266.6 + ,0 + ,345.7 + ,0 + ,287 + ,0 + ,282.1 + ,0 + ,268.1 + ,0 + ,274.6 + ,0 + ,275.9 + ,0 + ,287.5 + ,0 + ,276 + ,0 + ,270.8 + ,0 + ,295.3 + ,0 + ,246.5 + ,0 + ,271.8 + ,0 + ,335.2 + ,0 + ,253.3 + ,0 + ,297.2 + ,0 + ,245.4 + ,0 + ,271.6 + ,0 + ,316.1 + ,0 + ,304.4 + ,0 + ,289.1 + ,0 + ,370.6 + ,0 + ,300 + ,0 + ,269.6 + ,0 + ,346.3 + ,0 + ,348.2 + ,0 + ,317.9 + ,0 + ,365.8 + ,0 + ,260.4 + ,0 + ,292.8 + ,0 + ,404.3 + ,1 + ,341.4 + ,1 + ,351.1 + ,1 + ,384.7 + ,1 + ,358.8 + ,1 + ,332.8 + ,1 + ,381.1 + ,1 + ,340.8 + ,1 + ,348.6 + ,1 + ,356.9 + ,1 + ,321.7 + ,1 + ,360.1 + ,1 + ,399.4 + ,1 + ,340.4 + ,1 + ,430.4 + ,1 + ,463.1 + ,1 + ,423 + ,1 + ,416.1 + ,1 + ,364 + ,1 + ,379.9 + ,1 + ,395.8 + ,1 + ,418.8 + ,1 + ,396.4 + ,1 + ,407.9 + ,1 + ,487.9 + ,1 + ,458.2 + ,1 + ,432.1 + ,1 + ,498.5 + ,1 + ,448.3 + ,1 + ,410.8 + ,1 + ,406 + ,1 + ,441 + ,1 + ,388.9 + ,1 + ,390.5 + ,1 + ,427.8 + ,1 + ,442.1 + ,1 + ,427 + ,1 + ,526.7 + ,1 + ,464.4 + ,1 + ,574.4 + ,1 + ,727 + ,1 + ,506 + ,1 + ,581.2 + ,1) + ,dim=c(2 + ,159) + ,dimnames=list(c('Uitvoer' + ,'X') + ,1:159)) > y <- array(NA,dim=c(2,159),dimnames=list(c('Uitvoer','X'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : 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 Uitvoer X M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 184.0 0 1 0 0 0 0 0 0 0 0 0 0 1 2 155.0 0 0 1 0 0 0 0 0 0 0 0 0 2 3 201.8 0 0 0 1 0 0 0 0 0 0 0 0 3 4 224.6 0 0 0 0 1 0 0 0 0 0 0 0 4 5 204.9 0 0 0 0 0 1 0 0 0 0 0 0 5 6 190.8 0 0 0 0 0 0 1 0 0 0 0 0 6 7 199.0 0 0 0 0 0 0 0 1 0 0 0 0 7 8 179.9 0 0 0 0 0 0 0 0 1 0 0 0 8 9 211.9 0 0 0 0 0 0 0 0 0 1 0 0 9 10 200.1 0 0 0 0 0 0 0 0 0 0 1 0 10 11 208.6 0 0 0 0 0 0 0 0 0 0 0 1 11 12 232.6 0 0 0 0 0 0 0 0 0 0 0 0 12 13 199.5 0 1 0 0 0 0 0 0 0 0 0 0 13 14 169.1 0 0 1 0 0 0 0 0 0 0 0 0 14 15 194.4 0 0 0 1 0 0 0 0 0 0 0 0 15 16 227.9 0 0 0 0 1 0 0 0 0 0 0 0 16 17 224.0 0 0 0 0 0 1 0 0 0 0 0 0 17 18 258.1 0 0 0 0 0 0 1 0 0 0 0 0 18 19 207.6 0 0 0 0 0 0 0 1 0 0 0 0 19 20 228.0 0 0 0 0 0 0 0 0 1 0 0 0 20 21 221.0 0 0 0 0 0 0 0 0 0 1 0 0 21 22 247.3 0 0 0 0 0 0 0 0 0 0 1 0 22 23 214.3 0 0 0 0 0 0 0 0 0 0 0 1 23 24 252.5 0 0 0 0 0 0 0 0 0 0 0 0 24 25 256.7 0 1 0 0 0 0 0 0 0 0 0 0 25 26 194.9 0 0 1 0 0 0 0 0 0 0 0 0 26 27 264.6 0 0 0 1 0 0 0 0 0 0 0 0 27 28 277.1 0 0 0 0 1 0 0 0 0 0 0 0 28 29 236.6 0 0 0 0 0 1 0 0 0 0 0 0 29 30 271.6 0 0 0 0 0 0 1 0 0 0 0 0 30 31 216.3 0 0 0 0 0 0 0 1 0 0 0 0 31 32 241.1 0 0 0 0 0 0 0 0 1 0 0 0 32 33 265.8 0 0 0 0 0 0 0 0 0 1 0 0 33 34 280.6 0 0 0 0 0 0 0 0 0 0 1 0 34 35 276.8 0 0 0 0 0 0 0 0 0 0 0 1 35 36 263.7 0 0 0 0 0 0 0 0 0 0 0 0 36 37 231.3 0 1 0 0 0 0 0 0 0 0 0 0 37 38 190.9 0 0 1 0 0 0 0 0 0 0 0 0 38 39 250.9 0 0 0 1 0 0 0 0 0 0 0 0 39 40 252.8 0 0 0 0 1 0 0 0 0 0 0 0 40 41 214.4 0 0 0 0 0 1 0 0 0 0 0 0 41 42 268.2 0 0 0 0 0 0 1 0 0 0 0 0 42 43 178.0 0 0 0 0 0 0 0 1 0 0 0 0 43 44 215.6 0 0 0 0 0 0 0 0 1 0 0 0 44 45 241.3 0 0 0 0 0 0 0 0 0 1 0 0 45 46 228.3 0 0 0 0 0 0 0 0 0 0 1 0 46 47 236.5 0 0 0 0 0 0 0 0 0 0 0 1 47 48 263.5 0 0 0 0 0 0 0 0 0 0 0 0 48 49 238.8 0 1 0 0 0 0 0 0 0 0 0 0 49 50 215.1 0 0 1 0 0 0 0 0 0 0 0 0 50 51 244.6 0 0 0 1 0 0 0 0 0 0 0 0 51 52 263.5 0 0 0 0 1 0 0 0 0 0 0 0 52 53 242.7 0 0 0 0 0 1 0 0 0 0 0 0 53 54 253.4 0 0 0 0 0 0 1 0 0 0 0 0 54 55 197.3 0 0 0 0 0 0 0 1 0 0 0 0 55 56 250.5 0 0 0 0 0 0 0 0 1 0 0 0 56 57 290.8 0 0 0 0 0 0 0 0 0 1 0 0 57 58 245.9 0 0 0 0 0 0 0 0 0 0 1 0 58 59 299.5 0 0 0 0 0 0 0 0 0 0 0 1 59 60 295.8 0 0 0 0 0 0 0 0 0 0 0 0 60 61 264.1 0 1 0 0 0 0 0 0 0 0 0 0 61 62 262.7 0 0 1 0 0 0 0 0 0 0 0 0 62 63 297.1 0 0 0 1 0 0 0 0 0 0 0 0 63 64 345.1 0 0 0 0 1 0 0 0 0 0 0 0 64 65 293.9 0 0 0 0 0 1 0 0 0 0 0 0 65 66 269.4 0 0 0 0 0 0 1 0 0 0 0 0 66 67 244.9 0 0 0 0 0 0 0 1 0 0 0 0 67 68 274.2 0 0 0 0 0 0 0 0 1 0 0 0 68 69 312.5 0 0 0 0 0 0 0 0 0 1 0 0 69 70 279.0 0 0 0 0 0 0 0 0 0 0 1 0 70 71 327.3 0 0 0 0 0 0 0 0 0 0 0 1 71 72 289.2 0 0 0 0 0 0 0 0 0 0 0 0 72 73 285.4 0 1 0 0 0 0 0 0 0 0 0 0 73 74 248.9 0 0 1 0 0 0 0 0 0 0 0 0 74 75 240.6 0 0 0 1 0 0 0 0 0 0 0 0 75 76 308.5 0 0 0 0 1 0 0 0 0 0 0 0 76 77 285.6 0 0 0 0 0 1 0 0 0 0 0 0 77 78 284.4 0 0 0 0 0 0 1 0 0 0 0 0 78 79 253.6 0 0 0 0 0 0 0 1 0 0 0 0 79 80 286.3 0 0 0 0 0 0 0 0 1 0 0 0 80 81 302.2 0 0 0 0 0 0 0 0 0 1 0 0 81 82 278.0 0 0 0 0 0 0 0 0 0 0 1 0 82 83 304.3 0 0 0 0 0 0 0 0 0 0 0 1 83 84 304.6 0 0 0 0 0 0 0 0 0 0 0 0 84 85 283.7 0 1 0 0 0 0 0 0 0 0 0 0 85 86 253.8 0 0 1 0 0 0 0 0 0 0 0 0 86 87 266.6 0 0 0 1 0 0 0 0 0 0 0 0 87 88 345.7 0 0 0 0 1 0 0 0 0 0 0 0 88 89 287.0 0 0 0 0 0 1 0 0 0 0 0 0 89 90 282.1 0 0 0 0 0 0 1 0 0 0 0 0 90 91 268.1 0 0 0 0 0 0 0 1 0 0 0 0 91 92 274.6 0 0 0 0 0 0 0 0 1 0 0 0 92 93 275.9 0 0 0 0 0 0 0 0 0 1 0 0 93 94 287.5 0 0 0 0 0 0 0 0 0 0 1 0 94 95 276.0 0 0 0 0 0 0 0 0 0 0 0 1 95 96 270.8 0 0 0 0 0 0 0 0 0 0 0 0 96 97 295.3 0 1 0 0 0 0 0 0 0 0 0 0 97 98 246.5 0 0 1 0 0 0 0 0 0 0 0 0 98 99 271.8 0 0 0 1 0 0 0 0 0 0 0 0 99 100 335.2 0 0 0 0 1 0 0 0 0 0 0 0 100 101 253.3 0 0 0 0 0 1 0 0 0 0 0 0 101 102 297.2 0 0 0 0 0 0 1 0 0 0 0 0 102 103 245.4 0 0 0 0 0 0 0 1 0 0 0 0 103 104 271.6 0 0 0 0 0 0 0 0 1 0 0 0 104 105 316.1 0 0 0 0 0 0 0 0 0 1 0 0 105 106 304.4 0 0 0 0 0 0 0 0 0 0 1 0 106 107 289.1 0 0 0 0 0 0 0 0 0 0 0 1 107 108 370.6 0 0 0 0 0 0 0 0 0 0 0 0 108 109 300.0 0 1 0 0 0 0 0 0 0 0 0 0 109 110 269.6 0 0 1 0 0 0 0 0 0 0 0 0 110 111 346.3 0 0 0 1 0 0 0 0 0 0 0 0 111 112 348.2 0 0 0 0 1 0 0 0 0 0 0 0 112 113 317.9 0 0 0 0 0 1 0 0 0 0 0 0 113 114 365.8 0 0 0 0 0 0 1 0 0 0 0 0 114 115 260.4 0 0 0 0 0 0 0 1 0 0 0 0 115 116 292.8 0 0 0 0 0 0 0 0 1 0 0 0 116 117 404.3 1 0 0 0 0 0 0 0 0 1 0 0 117 118 341.4 1 0 0 0 0 0 0 0 0 0 1 0 118 119 351.1 1 0 0 0 0 0 0 0 0 0 0 1 119 120 384.7 1 0 0 0 0 0 0 0 0 0 0 0 120 121 358.8 1 1 0 0 0 0 0 0 0 0 0 0 121 122 332.8 1 0 1 0 0 0 0 0 0 0 0 0 122 123 381.1 1 0 0 1 0 0 0 0 0 0 0 0 123 124 340.8 1 0 0 0 1 0 0 0 0 0 0 0 124 125 348.6 1 0 0 0 0 1 0 0 0 0 0 0 125 126 356.9 1 0 0 0 0 0 1 0 0 0 0 0 126 127 321.7 1 0 0 0 0 0 0 1 0 0 0 0 127 128 360.1 1 0 0 0 0 0 0 0 1 0 0 0 128 129 399.4 1 0 0 0 0 0 0 0 0 1 0 0 129 130 340.4 1 0 0 0 0 0 0 0 0 0 1 0 130 131 430.4 1 0 0 0 0 0 0 0 0 0 0 1 131 132 463.1 1 0 0 0 0 0 0 0 0 0 0 0 132 133 423.0 1 1 0 0 0 0 0 0 0 0 0 0 133 134 416.1 1 0 1 0 0 0 0 0 0 0 0 0 134 135 364.0 1 0 0 1 0 0 0 0 0 0 0 0 135 136 379.9 1 0 0 0 1 0 0 0 0 0 0 0 136 137 395.8 1 0 0 0 0 1 0 0 0 0 0 0 137 138 418.8 1 0 0 0 0 0 1 0 0 0 0 0 138 139 396.4 1 0 0 0 0 0 0 1 0 0 0 0 139 140 407.9 1 0 0 0 0 0 0 0 1 0 0 0 140 141 487.9 1 0 0 0 0 0 0 0 0 1 0 0 141 142 458.2 1 0 0 0 0 0 0 0 0 0 1 0 142 143 432.1 1 0 0 0 0 0 0 0 0 0 0 1 143 144 498.5 1 0 0 0 0 0 0 0 0 0 0 0 144 145 448.3 1 1 0 0 0 0 0 0 0 0 0 0 145 146 410.8 1 0 1 0 0 0 0 0 0 0 0 0 146 147 406.0 1 0 0 1 0 0 0 0 0 0 0 0 147 148 441.0 1 0 0 0 1 0 0 0 0 0 0 0 148 149 388.9 1 0 0 0 0 1 0 0 0 0 0 0 149 150 390.5 1 0 0 0 0 0 1 0 0 0 0 0 150 151 427.8 1 0 0 0 0 0 0 1 0 0 0 0 151 152 442.1 1 0 0 0 0 0 0 0 1 0 0 0 152 153 427.0 1 0 0 0 0 0 0 0 0 1 0 0 153 154 526.7 1 0 0 0 0 0 0 0 0 0 1 0 154 155 464.4 1 0 0 0 0 0 0 0 0 0 0 1 155 156 574.4 1 0 0 0 0 0 0 0 0 0 0 0 156 157 727.0 1 1 0 0 0 0 0 0 0 0 0 0 157 158 506.0 1 0 1 0 0 0 0 0 0 0 0 0 158 159 581.2 1 0 0 1 0 0 0 0 0 0 0 0 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X M1 M2 M3 M4 226.348 71.239 -15.021 -60.704 -30.493 -14.207 M5 M6 M7 M8 M9 M10 -45.855 -30.557 -69.435 -46.860 -20.288 -32.058 M11 t -26.068 1.132 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -82.990 -21.247 -4.494 18.331 266.656 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 226.3479 13.0524 17.341 < 2e-16 *** X 71.2389 11.2441 6.336 2.80e-09 *** M1 -15.0215 15.4516 -0.972 0.332588 M2 -60.7038 15.4495 -3.929 0.000131 *** M3 -30.4933 15.4482 -1.974 0.050292 . M4 -14.2075 15.7412 -0.903 0.368254 M5 -45.8552 15.7402 -2.913 0.004144 ** M6 -30.5568 15.7399 -1.941 0.054154 . M7 -69.4353 15.7404 -4.411 1.99e-05 *** M8 -46.8599 15.7416 -2.977 0.003414 ** M9 -20.2876 15.7336 -1.289 0.199297 M10 -32.0584 15.7317 -2.038 0.043386 * M11 -26.0677 15.7306 -1.657 0.099655 . t 1.1323 0.1086 10.424 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 40.1 on 145 degrees of freedom Multiple R-squared: 0.8198, Adjusted R-squared: 0.8036 F-statistic: 50.73 on 13 and 145 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.239555e-02 2.479109e-02 0.9876045 [2,] 8.039653e-02 1.607931e-01 0.9196035 [3,] 3.423030e-02 6.846060e-02 0.9657697 [4,] 2.277877e-02 4.555755e-02 0.9772212 [5,] 9.646445e-03 1.929289e-02 0.9903536 [6,] 5.953803e-03 1.190761e-02 0.9940462 [7,] 2.709741e-03 5.419482e-03 0.9972903 [8,] 9.877734e-04 1.975547e-03 0.9990122 [9,] 9.216874e-04 1.843375e-03 0.9990783 [10,] 3.469604e-04 6.939207e-04 0.9996530 [11,] 2.819194e-04 5.638389e-04 0.9997181 [12,] 1.169692e-04 2.339383e-04 0.9998830 [13,] 6.475536e-05 1.295107e-04 0.9999352 [14,] 2.649119e-05 5.298239e-05 0.9999735 [15,] 2.182448e-05 4.364896e-05 0.9999782 [16,] 8.228686e-06 1.645737e-05 0.9999918 [17,] 3.407054e-06 6.814108e-06 0.9999966 [18,] 1.970340e-06 3.940681e-06 0.9999980 [19,] 1.519472e-06 3.038944e-06 0.9999985 [20,] 8.640121e-07 1.728024e-06 0.9999991 [21,] 1.318490e-06 2.636980e-06 0.9999987 [22,] 1.401702e-06 2.803404e-06 0.9999986 [23,] 7.181292e-07 1.436258e-06 0.9999993 [24,] 9.414905e-07 1.882981e-06 0.9999991 [25,] 2.997976e-06 5.995951e-06 0.9999970 [26,] 1.560665e-06 3.121329e-06 0.9999984 [27,] 1.455132e-05 2.910264e-05 0.9999854 [28,] 1.320181e-05 2.640361e-05 0.9999868 [29,] 8.280907e-06 1.656181e-05 0.9999917 [30,] 1.134523e-05 2.269046e-05 0.9999887 [31,] 7.346407e-06 1.469281e-05 0.9999927 [32,] 3.754335e-06 7.508670e-06 0.9999962 [33,] 1.920252e-06 3.840504e-06 0.9999981 [34,] 8.976727e-07 1.795345e-06 0.9999991 [35,] 4.648639e-07 9.297279e-07 0.9999995 [36,] 2.297639e-07 4.595279e-07 0.9999998 [37,] 1.077927e-07 2.155853e-07 0.9999999 [38,] 6.939938e-08 1.387988e-07 0.9999999 [39,] 5.670579e-08 1.134116e-07 0.9999999 [40,] 2.702322e-08 5.404645e-08 1.0000000 [41,] 2.242668e-08 4.485336e-08 1.0000000 [42,] 1.306495e-08 2.612991e-08 1.0000000 [43,] 1.829721e-08 3.659441e-08 1.0000000 [44,] 9.129594e-09 1.825919e-08 1.0000000 [45,] 4.020204e-09 8.040408e-09 1.0000000 [46,] 6.482886e-09 1.296577e-08 1.0000000 [47,] 6.198411e-09 1.239682e-08 1.0000000 [48,] 4.134628e-08 8.269255e-08 1.0000000 [49,] 5.156175e-08 1.031235e-07 0.9999999 [50,] 3.787097e-08 7.574195e-08 1.0000000 [51,] 2.285558e-08 4.571116e-08 1.0000000 [52,] 1.588859e-08 3.177717e-08 1.0000000 [53,] 1.557625e-08 3.115249e-08 1.0000000 [54,] 9.102962e-09 1.820592e-08 1.0000000 [55,] 2.438323e-08 4.876646e-08 1.0000000 [56,] 1.394594e-08 2.789187e-08 1.0000000 [57,] 6.726883e-09 1.345377e-08 1.0000000 [58,] 3.667088e-09 7.334176e-09 1.0000000 [59,] 8.992138e-09 1.798428e-08 1.0000000 [60,] 7.196114e-09 1.439223e-08 1.0000000 [61,] 7.330711e-09 1.466142e-08 1.0000000 [62,] 6.593214e-09 1.318643e-08 1.0000000 [63,] 5.516271e-09 1.103254e-08 1.0000000 [64,] 6.520634e-09 1.304127e-08 1.0000000 [65,] 4.797893e-09 9.595787e-09 1.0000000 [66,] 3.493780e-09 6.987561e-09 1.0000000 [67,] 3.753984e-09 7.507968e-09 1.0000000 [68,] 2.002870e-09 4.005741e-09 1.0000000 [69,] 9.574602e-10 1.914920e-09 1.0000000 [70,] 5.559598e-10 1.111920e-09 1.0000000 [71,] 4.739948e-10 9.479895e-10 1.0000000 [72,] 1.932801e-09 3.865601e-09 1.0000000 [73,] 2.946812e-09 5.893624e-09 1.0000000 [74,] 3.642868e-09 7.285735e-09 1.0000000 [75,] 5.302095e-09 1.060419e-08 1.0000000 [76,] 6.417624e-09 1.283525e-08 1.0000000 [77,] 7.659965e-09 1.531993e-08 1.0000000 [78,] 5.173742e-09 1.034748e-08 1.0000000 [79,] 7.067477e-09 1.413495e-08 1.0000000 [80,] 1.967289e-08 3.934578e-08 1.0000000 [81,] 1.016627e-08 2.033254e-08 1.0000000 [82,] 5.822876e-09 1.164575e-08 1.0000000 [83,] 3.986139e-09 7.972277e-09 1.0000000 [84,] 5.805598e-09 1.161120e-08 1.0000000 [85,] 8.706729e-09 1.741346e-08 1.0000000 [86,] 5.658557e-09 1.131711e-08 1.0000000 [87,] 3.823096e-09 7.646192e-09 1.0000000 [88,] 2.385759e-09 4.771517e-09 1.0000000 [89,] 1.099746e-09 2.199492e-09 1.0000000 [90,] 4.981708e-10 9.963416e-10 1.0000000 [91,] 3.506617e-10 7.013235e-10 1.0000000 [92,] 5.533012e-10 1.106602e-09 1.0000000 [93,] 1.184446e-09 2.368892e-09 1.0000000 [94,] 9.346201e-10 1.869240e-09 1.0000000 [95,] 1.024116e-09 2.048233e-09 1.0000000 [96,] 6.243784e-10 1.248757e-09 1.0000000 [97,] 3.293627e-10 6.587253e-10 1.0000000 [98,] 1.563167e-09 3.126334e-09 1.0000000 [99,] 8.495690e-10 1.699138e-09 1.0000000 [100,] 3.901500e-10 7.803000e-10 1.0000000 [101,] 7.652193e-10 1.530439e-09 1.0000000 [102,] 6.418870e-10 1.283774e-09 1.0000000 [103,] 3.797186e-10 7.594372e-10 1.0000000 [104,] 1.669808e-10 3.339617e-10 1.0000000 [105,] 2.251799e-10 4.503598e-10 1.0000000 [106,] 9.338649e-11 1.867730e-10 1.0000000 [107,] 6.655572e-11 1.331114e-10 1.0000000 [108,] 1.137399e-10 2.274798e-10 1.0000000 [109,] 7.338496e-11 1.467699e-10 1.0000000 [110,] 5.002918e-11 1.000584e-10 1.0000000 [111,] 1.863333e-11 3.726665e-11 1.0000000 [112,] 8.584931e-12 1.716986e-11 1.0000000 [113,] 5.213834e-12 1.042767e-11 1.0000000 [114,] 6.844681e-12 1.368936e-11 1.0000000 [115,] 5.070288e-11 1.014058e-10 1.0000000 [116,] 1.335423e-10 2.670847e-10 1.0000000 [117,] 4.413774e-10 8.827547e-10 1.0000000 [118,] 1.857479e-09 3.714957e-09 1.0000000 [119,] 9.497104e-10 1.899421e-09 1.0000000 [120,] 3.975105e-10 7.950211e-10 1.0000000 [121,] 5.037906e-10 1.007581e-09 1.0000000 [122,] 2.761783e-09 5.523565e-09 1.0000000 [123,] 2.802851e-09 5.605701e-09 1.0000000 [124,] 2.238080e-09 4.476160e-09 1.0000000 [125,] 6.781001e-06 1.356200e-05 0.9999932 [126,] 9.081345e-06 1.816269e-05 0.9999909 > postscript(file="/var/www/html/rcomp/tmp/182gr1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2u1cm1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/39zv11230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4ziuq1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5a4gf1230036616.ps",horizontal=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 = 159 Frequency = 1 1 2 3 4 5 6 -28.4587943 -12.9087943 2.5483486 7.9301586 18.7455433 -11.7852260 7 8 9 10 11 12 34.1609279 -8.6467644 -4.3514607 -5.5129992 -4.1360761 -7.3360761 13 14 15 16 17 18 -26.5469381 -12.3969381 -18.4397952 -2.3579852 24.2573994 41.9266302 19 20 21 22 23 24 29.1727841 25.8650917 -8.8396046 28.0988570 -12.0242199 -1.0242199 25 26 27 28 29 30 17.0649181 -0.1850819 38.1720609 33.2538710 23.2692556 41.8384864 31 32 33 34 35 36 24.2846402 25.3769479 22.3722516 47.8107132 36.8876362 -3.4123638 37 38 39 40 41 42 -21.9232257 -17.7732257 10.8839171 -4.6342728 -12.5188882 24.8503426 43 44 45 46 47 48 -27.6035036 -13.7111959 -15.7158922 -18.0774306 -17.0005076 -17.2005076 49 50 51 52 53 54 -28.0113696 -7.1613696 -9.0042267 -7.5224166 2.1929680 -3.5378012 55 56 57 58 59 60 -21.8916474 7.6006603 20.1959640 -14.0655745 32.4113486 1.5113486 61 62 63 64 65 66 -16.2995134 26.8504866 29.9076295 60.4894395 39.8048242 -1.1259451 67 68 69 70 71 72 12.1202088 17.7125165 28.3078202 5.4462817 46.6232048 -18.6767952 73 74 75 76 77 78 -8.5876572 -0.5376572 -40.1805143 10.3012957 17.9166803 0.2859111 79 80 81 82 83 84 7.2320650 16.2243727 4.4196764 -9.1418621 10.0350610 -16.8649390 85 86 87 88 89 90 -23.8758010 -9.2258010 -27.7686581 33.9131519 5.7285365 -15.6022327 91 92 93 94 95 96 8.1439211 -9.0637712 -35.4684675 -13.2300059 -31.8530828 -64.2530828 97 98 99 100 101 102 -25.8639448 -30.1139448 -36.1568020 9.8250081 -41.5596073 -14.0903765 103 104 105 106 107 108 -28.1442227 -25.6519150 -8.8566113 -9.9181497 -32.3412267 21.9587733 109 110 111 112 113 114 -34.7520886 -20.6020886 24.7550542 9.2368643 9.4522489 40.9214797 115 116 117 118 119 120 -26.7323665 -18.0400588 -5.4837033 -57.7452417 -55.1683186 -48.7683186 121 122 123 124 125 126 -60.7791806 -42.2291806 -25.2720378 -82.9902277 -44.6748431 -52.8056123 127 128 129 130 131 132 -50.2594585 -35.5671508 -23.9718471 -72.3333855 10.5435375 16.0435375 133 134 135 136 137 138 -10.1673244 27.4826756 -55.9601816 -57.4783715 -11.0629869 -4.4937561 139 140 141 142 143 144 10.8523977 -1.3552946 50.9400091 31.8784706 -1.3446063 37.8553937 145 146 147 148 149 150 1.5445317 8.5945317 -27.5483254 -9.9665153 -31.5511307 -46.3819000 151 152 153 154 155 156 28.6642539 19.2565616 -23.5481347 86.7903268 17.3672499 100.1672499 157 158 159 266.6563879 90.2063879 134.0635308 > postscript(file="/var/www/html/rcomp/tmp/6l4b91230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 -28.4587943 NA 1 -12.9087943 -28.4587943 2 2.5483486 -12.9087943 3 7.9301586 2.5483486 4 18.7455433 7.9301586 5 -11.7852260 18.7455433 6 34.1609279 -11.7852260 7 -8.6467644 34.1609279 8 -4.3514607 -8.6467644 9 -5.5129992 -4.3514607 10 -4.1360761 -5.5129992 11 -7.3360761 -4.1360761 12 -26.5469381 -7.3360761 13 -12.3969381 -26.5469381 14 -18.4397952 -12.3969381 15 -2.3579852 -18.4397952 16 24.2573994 -2.3579852 17 41.9266302 24.2573994 18 29.1727841 41.9266302 19 25.8650917 29.1727841 20 -8.8396046 25.8650917 21 28.0988570 -8.8396046 22 -12.0242199 28.0988570 23 -1.0242199 -12.0242199 24 17.0649181 -1.0242199 25 -0.1850819 17.0649181 26 38.1720609 -0.1850819 27 33.2538710 38.1720609 28 23.2692556 33.2538710 29 41.8384864 23.2692556 30 24.2846402 41.8384864 31 25.3769479 24.2846402 32 22.3722516 25.3769479 33 47.8107132 22.3722516 34 36.8876362 47.8107132 35 -3.4123638 36.8876362 36 -21.9232257 -3.4123638 37 -17.7732257 -21.9232257 38 10.8839171 -17.7732257 39 -4.6342728 10.8839171 40 -12.5188882 -4.6342728 41 24.8503426 -12.5188882 42 -27.6035036 24.8503426 43 -13.7111959 -27.6035036 44 -15.7158922 -13.7111959 45 -18.0774306 -15.7158922 46 -17.0005076 -18.0774306 47 -17.2005076 -17.0005076 48 -28.0113696 -17.2005076 49 -7.1613696 -28.0113696 50 -9.0042267 -7.1613696 51 -7.5224166 -9.0042267 52 2.1929680 -7.5224166 53 -3.5378012 2.1929680 54 -21.8916474 -3.5378012 55 7.6006603 -21.8916474 56 20.1959640 7.6006603 57 -14.0655745 20.1959640 58 32.4113486 -14.0655745 59 1.5113486 32.4113486 60 -16.2995134 1.5113486 61 26.8504866 -16.2995134 62 29.9076295 26.8504866 63 60.4894395 29.9076295 64 39.8048242 60.4894395 65 -1.1259451 39.8048242 66 12.1202088 -1.1259451 67 17.7125165 12.1202088 68 28.3078202 17.7125165 69 5.4462817 28.3078202 70 46.6232048 5.4462817 71 -18.6767952 46.6232048 72 -8.5876572 -18.6767952 73 -0.5376572 -8.5876572 74 -40.1805143 -0.5376572 75 10.3012957 -40.1805143 76 17.9166803 10.3012957 77 0.2859111 17.9166803 78 7.2320650 0.2859111 79 16.2243727 7.2320650 80 4.4196764 16.2243727 81 -9.1418621 4.4196764 82 10.0350610 -9.1418621 83 -16.8649390 10.0350610 84 -23.8758010 -16.8649390 85 -9.2258010 -23.8758010 86 -27.7686581 -9.2258010 87 33.9131519 -27.7686581 88 5.7285365 33.9131519 89 -15.6022327 5.7285365 90 8.1439211 -15.6022327 91 -9.0637712 8.1439211 92 -35.4684675 -9.0637712 93 -13.2300059 -35.4684675 94 -31.8530828 -13.2300059 95 -64.2530828 -31.8530828 96 -25.8639448 -64.2530828 97 -30.1139448 -25.8639448 98 -36.1568020 -30.1139448 99 9.8250081 -36.1568020 100 -41.5596073 9.8250081 101 -14.0903765 -41.5596073 102 -28.1442227 -14.0903765 103 -25.6519150 -28.1442227 104 -8.8566113 -25.6519150 105 -9.9181497 -8.8566113 106 -32.3412267 -9.9181497 107 21.9587733 -32.3412267 108 -34.7520886 21.9587733 109 -20.6020886 -34.7520886 110 24.7550542 -20.6020886 111 9.2368643 24.7550542 112 9.4522489 9.2368643 113 40.9214797 9.4522489 114 -26.7323665 40.9214797 115 -18.0400588 -26.7323665 116 -5.4837033 -18.0400588 117 -57.7452417 -5.4837033 118 -55.1683186 -57.7452417 119 -48.7683186 -55.1683186 120 -60.7791806 -48.7683186 121 -42.2291806 -60.7791806 122 -25.2720378 -42.2291806 123 -82.9902277 -25.2720378 124 -44.6748431 -82.9902277 125 -52.8056123 -44.6748431 126 -50.2594585 -52.8056123 127 -35.5671508 -50.2594585 128 -23.9718471 -35.5671508 129 -72.3333855 -23.9718471 130 10.5435375 -72.3333855 131 16.0435375 10.5435375 132 -10.1673244 16.0435375 133 27.4826756 -10.1673244 134 -55.9601816 27.4826756 135 -57.4783715 -55.9601816 136 -11.0629869 -57.4783715 137 -4.4937561 -11.0629869 138 10.8523977 -4.4937561 139 -1.3552946 10.8523977 140 50.9400091 -1.3552946 141 31.8784706 50.9400091 142 -1.3446063 31.8784706 143 37.8553937 -1.3446063 144 1.5445317 37.8553937 145 8.5945317 1.5445317 146 -27.5483254 8.5945317 147 -9.9665153 -27.5483254 148 -31.5511307 -9.9665153 149 -46.3819000 -31.5511307 150 28.6642539 -46.3819000 151 19.2565616 28.6642539 152 -23.5481347 19.2565616 153 86.7903268 -23.5481347 154 17.3672499 86.7903268 155 100.1672499 17.3672499 156 266.6563879 100.1672499 157 90.2063879 266.6563879 158 134.0635308 90.2063879 159 NA 134.0635308 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -12.9087943 -28.4587943 [2,] 2.5483486 -12.9087943 [3,] 7.9301586 2.5483486 [4,] 18.7455433 7.9301586 [5,] -11.7852260 18.7455433 [6,] 34.1609279 -11.7852260 [7,] -8.6467644 34.1609279 [8,] -4.3514607 -8.6467644 [9,] -5.5129992 -4.3514607 [10,] -4.1360761 -5.5129992 [11,] -7.3360761 -4.1360761 [12,] -26.5469381 -7.3360761 [13,] -12.3969381 -26.5469381 [14,] -18.4397952 -12.3969381 [15,] -2.3579852 -18.4397952 [16,] 24.2573994 -2.3579852 [17,] 41.9266302 24.2573994 [18,] 29.1727841 41.9266302 [19,] 25.8650917 29.1727841 [20,] -8.8396046 25.8650917 [21,] 28.0988570 -8.8396046 [22,] -12.0242199 28.0988570 [23,] -1.0242199 -12.0242199 [24,] 17.0649181 -1.0242199 [25,] -0.1850819 17.0649181 [26,] 38.1720609 -0.1850819 [27,] 33.2538710 38.1720609 [28,] 23.2692556 33.2538710 [29,] 41.8384864 23.2692556 [30,] 24.2846402 41.8384864 [31,] 25.3769479 24.2846402 [32,] 22.3722516 25.3769479 [33,] 47.8107132 22.3722516 [34,] 36.8876362 47.8107132 [35,] -3.4123638 36.8876362 [36,] -21.9232257 -3.4123638 [37,] -17.7732257 -21.9232257 [38,] 10.8839171 -17.7732257 [39,] -4.6342728 10.8839171 [40,] -12.5188882 -4.6342728 [41,] 24.8503426 -12.5188882 [42,] -27.6035036 24.8503426 [43,] -13.7111959 -27.6035036 [44,] -15.7158922 -13.7111959 [45,] -18.0774306 -15.7158922 [46,] -17.0005076 -18.0774306 [47,] -17.2005076 -17.0005076 [48,] -28.0113696 -17.2005076 [49,] -7.1613696 -28.0113696 [50,] -9.0042267 -7.1613696 [51,] -7.5224166 -9.0042267 [52,] 2.1929680 -7.5224166 [53,] -3.5378012 2.1929680 [54,] -21.8916474 -3.5378012 [55,] 7.6006603 -21.8916474 [56,] 20.1959640 7.6006603 [57,] -14.0655745 20.1959640 [58,] 32.4113486 -14.0655745 [59,] 1.5113486 32.4113486 [60,] -16.2995134 1.5113486 [61,] 26.8504866 -16.2995134 [62,] 29.9076295 26.8504866 [63,] 60.4894395 29.9076295 [64,] 39.8048242 60.4894395 [65,] -1.1259451 39.8048242 [66,] 12.1202088 -1.1259451 [67,] 17.7125165 12.1202088 [68,] 28.3078202 17.7125165 [69,] 5.4462817 28.3078202 [70,] 46.6232048 5.4462817 [71,] -18.6767952 46.6232048 [72,] -8.5876572 -18.6767952 [73,] -0.5376572 -8.5876572 [74,] -40.1805143 -0.5376572 [75,] 10.3012957 -40.1805143 [76,] 17.9166803 10.3012957 [77,] 0.2859111 17.9166803 [78,] 7.2320650 0.2859111 [79,] 16.2243727 7.2320650 [80,] 4.4196764 16.2243727 [81,] -9.1418621 4.4196764 [82,] 10.0350610 -9.1418621 [83,] -16.8649390 10.0350610 [84,] -23.8758010 -16.8649390 [85,] -9.2258010 -23.8758010 [86,] -27.7686581 -9.2258010 [87,] 33.9131519 -27.7686581 [88,] 5.7285365 33.9131519 [89,] -15.6022327 5.7285365 [90,] 8.1439211 -15.6022327 [91,] -9.0637712 8.1439211 [92,] -35.4684675 -9.0637712 [93,] -13.2300059 -35.4684675 [94,] -31.8530828 -13.2300059 [95,] -64.2530828 -31.8530828 [96,] -25.8639448 -64.2530828 [97,] -30.1139448 -25.8639448 [98,] -36.1568020 -30.1139448 [99,] 9.8250081 -36.1568020 [100,] -41.5596073 9.8250081 [101,] -14.0903765 -41.5596073 [102,] -28.1442227 -14.0903765 [103,] -25.6519150 -28.1442227 [104,] -8.8566113 -25.6519150 [105,] -9.9181497 -8.8566113 [106,] -32.3412267 -9.9181497 [107,] 21.9587733 -32.3412267 [108,] -34.7520886 21.9587733 [109,] -20.6020886 -34.7520886 [110,] 24.7550542 -20.6020886 [111,] 9.2368643 24.7550542 [112,] 9.4522489 9.2368643 [113,] 40.9214797 9.4522489 [114,] -26.7323665 40.9214797 [115,] -18.0400588 -26.7323665 [116,] -5.4837033 -18.0400588 [117,] -57.7452417 -5.4837033 [118,] -55.1683186 -57.7452417 [119,] -48.7683186 -55.1683186 [120,] -60.7791806 -48.7683186 [121,] -42.2291806 -60.7791806 [122,] -25.2720378 -42.2291806 [123,] -82.9902277 -25.2720378 [124,] -44.6748431 -82.9902277 [125,] -52.8056123 -44.6748431 [126,] -50.2594585 -52.8056123 [127,] -35.5671508 -50.2594585 [128,] -23.9718471 -35.5671508 [129,] -72.3333855 -23.9718471 [130,] 10.5435375 -72.3333855 [131,] 16.0435375 10.5435375 [132,] -10.1673244 16.0435375 [133,] 27.4826756 -10.1673244 [134,] -55.9601816 27.4826756 [135,] -57.4783715 -55.9601816 [136,] -11.0629869 -57.4783715 [137,] -4.4937561 -11.0629869 [138,] 10.8523977 -4.4937561 [139,] -1.3552946 10.8523977 [140,] 50.9400091 -1.3552946 [141,] 31.8784706 50.9400091 [142,] -1.3446063 31.8784706 [143,] 37.8553937 -1.3446063 [144,] 1.5445317 37.8553937 [145,] 8.5945317 1.5445317 [146,] -27.5483254 8.5945317 [147,] -9.9665153 -27.5483254 [148,] -31.5511307 -9.9665153 [149,] -46.3819000 -31.5511307 [150,] 28.6642539 -46.3819000 [151,] 19.2565616 28.6642539 [152,] -23.5481347 19.2565616 [153,] 86.7903268 -23.5481347 [154,] 17.3672499 86.7903268 [155,] 100.1672499 17.3672499 [156,] 266.6563879 100.1672499 [157,] 90.2063879 266.6563879 [158,] 134.0635308 90.2063879 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -12.9087943 -28.4587943 2 2.5483486 -12.9087943 3 7.9301586 2.5483486 4 18.7455433 7.9301586 5 -11.7852260 18.7455433 6 34.1609279 -11.7852260 7 -8.6467644 34.1609279 8 -4.3514607 -8.6467644 9 -5.5129992 -4.3514607 10 -4.1360761 -5.5129992 11 -7.3360761 -4.1360761 12 -26.5469381 -7.3360761 13 -12.3969381 -26.5469381 14 -18.4397952 -12.3969381 15 -2.3579852 -18.4397952 16 24.2573994 -2.3579852 17 41.9266302 24.2573994 18 29.1727841 41.9266302 19 25.8650917 29.1727841 20 -8.8396046 25.8650917 21 28.0988570 -8.8396046 22 -12.0242199 28.0988570 23 -1.0242199 -12.0242199 24 17.0649181 -1.0242199 25 -0.1850819 17.0649181 26 38.1720609 -0.1850819 27 33.2538710 38.1720609 28 23.2692556 33.2538710 29 41.8384864 23.2692556 30 24.2846402 41.8384864 31 25.3769479 24.2846402 32 22.3722516 25.3769479 33 47.8107132 22.3722516 34 36.8876362 47.8107132 35 -3.4123638 36.8876362 36 -21.9232257 -3.4123638 37 -17.7732257 -21.9232257 38 10.8839171 -17.7732257 39 -4.6342728 10.8839171 40 -12.5188882 -4.6342728 41 24.8503426 -12.5188882 42 -27.6035036 24.8503426 43 -13.7111959 -27.6035036 44 -15.7158922 -13.7111959 45 -18.0774306 -15.7158922 46 -17.0005076 -18.0774306 47 -17.2005076 -17.0005076 48 -28.0113696 -17.2005076 49 -7.1613696 -28.0113696 50 -9.0042267 -7.1613696 51 -7.5224166 -9.0042267 52 2.1929680 -7.5224166 53 -3.5378012 2.1929680 54 -21.8916474 -3.5378012 55 7.6006603 -21.8916474 56 20.1959640 7.6006603 57 -14.0655745 20.1959640 58 32.4113486 -14.0655745 59 1.5113486 32.4113486 60 -16.2995134 1.5113486 61 26.8504866 -16.2995134 62 29.9076295 26.8504866 63 60.4894395 29.9076295 64 39.8048242 60.4894395 65 -1.1259451 39.8048242 66 12.1202088 -1.1259451 67 17.7125165 12.1202088 68 28.3078202 17.7125165 69 5.4462817 28.3078202 70 46.6232048 5.4462817 71 -18.6767952 46.6232048 72 -8.5876572 -18.6767952 73 -0.5376572 -8.5876572 74 -40.1805143 -0.5376572 75 10.3012957 -40.1805143 76 17.9166803 10.3012957 77 0.2859111 17.9166803 78 7.2320650 0.2859111 79 16.2243727 7.2320650 80 4.4196764 16.2243727 81 -9.1418621 4.4196764 82 10.0350610 -9.1418621 83 -16.8649390 10.0350610 84 -23.8758010 -16.8649390 85 -9.2258010 -23.8758010 86 -27.7686581 -9.2258010 87 33.9131519 -27.7686581 88 5.7285365 33.9131519 89 -15.6022327 5.7285365 90 8.1439211 -15.6022327 91 -9.0637712 8.1439211 92 -35.4684675 -9.0637712 93 -13.2300059 -35.4684675 94 -31.8530828 -13.2300059 95 -64.2530828 -31.8530828 96 -25.8639448 -64.2530828 97 -30.1139448 -25.8639448 98 -36.1568020 -30.1139448 99 9.8250081 -36.1568020 100 -41.5596073 9.8250081 101 -14.0903765 -41.5596073 102 -28.1442227 -14.0903765 103 -25.6519150 -28.1442227 104 -8.8566113 -25.6519150 105 -9.9181497 -8.8566113 106 -32.3412267 -9.9181497 107 21.9587733 -32.3412267 108 -34.7520886 21.9587733 109 -20.6020886 -34.7520886 110 24.7550542 -20.6020886 111 9.2368643 24.7550542 112 9.4522489 9.2368643 113 40.9214797 9.4522489 114 -26.7323665 40.9214797 115 -18.0400588 -26.7323665 116 -5.4837033 -18.0400588 117 -57.7452417 -5.4837033 118 -55.1683186 -57.7452417 119 -48.7683186 -55.1683186 120 -60.7791806 -48.7683186 121 -42.2291806 -60.7791806 122 -25.2720378 -42.2291806 123 -82.9902277 -25.2720378 124 -44.6748431 -82.9902277 125 -52.8056123 -44.6748431 126 -50.2594585 -52.8056123 127 -35.5671508 -50.2594585 128 -23.9718471 -35.5671508 129 -72.3333855 -23.9718471 130 10.5435375 -72.3333855 131 16.0435375 10.5435375 132 -10.1673244 16.0435375 133 27.4826756 -10.1673244 134 -55.9601816 27.4826756 135 -57.4783715 -55.9601816 136 -11.0629869 -57.4783715 137 -4.4937561 -11.0629869 138 10.8523977 -4.4937561 139 -1.3552946 10.8523977 140 50.9400091 -1.3552946 141 31.8784706 50.9400091 142 -1.3446063 31.8784706 143 37.8553937 -1.3446063 144 1.5445317 37.8553937 145 8.5945317 1.5445317 146 -27.5483254 8.5945317 147 -9.9665153 -27.5483254 148 -31.5511307 -9.9665153 149 -46.3819000 -31.5511307 150 28.6642539 -46.3819000 151 19.2565616 28.6642539 152 -23.5481347 19.2565616 153 86.7903268 -23.5481347 154 17.3672499 86.7903268 155 100.1672499 17.3672499 156 266.6563879 100.1672499 157 90.2063879 266.6563879 158 134.0635308 90.2063879 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7qq2t1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/87ujt1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9o3hy1230036616.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/106uj21230036616.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/113zax1230036616.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12gul81230036616.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13318n1230036616.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14bu5l1230036617.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/www/html/rcomp/tmp/15juql1230036617.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/www/html/rcomp/tmp/16q0uz1230036617.tab") + } > > system("convert tmp/182gr1230036616.ps tmp/182gr1230036616.png") > system("convert tmp/2u1cm1230036616.ps tmp/2u1cm1230036616.png") > system("convert tmp/39zv11230036616.ps tmp/39zv11230036616.png") > system("convert tmp/4ziuq1230036616.ps tmp/4ziuq1230036616.png") > system("convert tmp/5a4gf1230036616.ps tmp/5a4gf1230036616.png") > system("convert tmp/6l4b91230036616.ps tmp/6l4b91230036616.png") > system("convert tmp/7qq2t1230036616.ps tmp/7qq2t1230036616.png") > system("convert tmp/87ujt1230036616.ps tmp/87ujt1230036616.png") > system("convert tmp/9o3hy1230036616.ps tmp/9o3hy1230036616.png") > system("convert tmp/106uj21230036616.ps tmp/106uj21230036616.png") > > > proc.time() user system elapsed 4.138 1.712 7.036