R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(11974 + ,10106 + ,12069 + ,11412 + ,11180 + ,10508 + ,11288 + ,10928 + ,10199 + ,11030 + ,11234 + ,13747 + ,13912 + ,12376 + ,12264 + ,11675 + ,11271 + ,10672 + ,10933 + ,10379 + ,10187 + ,10747 + ,10970 + ,12175 + ,14200 + ,11676 + ,11258 + ,10872 + ,11148 + ,10690 + ,10684 + ,11658 + ,10178 + ,10981 + ,10773 + ,11665 + ,11359 + ,10716 + ,12928 + ,12317 + ,11641 + ,10459 + ,10953 + ,10703 + ,10703 + ,11101 + ,11334 + ,13268 + ,13145 + ,12334 + ,13153 + ,11289 + ,11374 + ,10914 + ,11299 + ,11284 + ,10694 + ,11077 + ,11104 + ,12820 + ,14915 + ,11773 + ,11608 + ,11468 + ,11511 + ,11200 + ,11164 + ,10960 + ,10667 + ,11556 + ,11372 + ,12333 + ,13102 + ,11115 + ,12572 + ,11557 + ,12059 + ,11420 + ,11185 + ,11113 + ,10706 + ,11523 + ,11391 + ,12634 + ,13469 + ,11735 + ,13281 + ,11968 + ,11623 + ,11084 + ,11509 + ,11134 + ,10438 + ,11530 + ,11491 + ,13093 + ,13106 + ,11305 + ,13113 + ,12203 + ,11309 + ,11088 + ,11234 + ,11619 + ,10942 + ,11445 + ,11291 + ,13281 + ,13726 + ,11300 + ,11983 + ,11092 + ,11093 + ,10692 + ,10786 + ,11166 + ,10553 + ,11103 + ,10969 + ,12090 + ,12544 + ,12264 + ,13783 + ,11214 + ,11453 + ,10883 + ,10381 + ,10348 + ,10024 + ,10805 + ,10796 + ,11907 + ,12261 + ,11377 + ,12689 + ,11474 + ,10992 + ,10764 + ,12164 + ,10409 + ,10398 + ,10349 + ,10865 + ,11630 + ,12221 + ,10884 + ,12019 + ,11021 + ,10799 + ,10423 + ,10484 + ,10450 + ,9906 + ,11049 + ,11281 + ,12485 + ,12849 + ,11380 + ,12079 + ,11366 + ,11328 + ,10444 + ,10854 + ,10434 + ,10137 + ,10992 + ,10906 + ,12367 + ,14371 + ,11695 + ,11546 + ,10922 + ,10670 + ,10254 + ,10573 + ,10239 + ,10253 + ,11176 + ,10719 + ,11817) + ,dim=c(1 + ,180) + ,dimnames=list(c('Aantal') + ,1:180)) > y <- array(NA,dim=c(1,180),dimnames=list(c('Aantal'),1:180)) > 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 = '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 Aantal M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 11974 1 0 0 0 0 0 0 0 0 0 0 2 10106 0 1 0 0 0 0 0 0 0 0 0 3 12069 0 0 1 0 0 0 0 0 0 0 0 4 11412 0 0 0 1 0 0 0 0 0 0 0 5 11180 0 0 0 0 1 0 0 0 0 0 0 6 10508 0 0 0 0 0 1 0 0 0 0 0 7 11288 0 0 0 0 0 0 1 0 0 0 0 8 10928 0 0 0 0 0 0 0 1 0 0 0 9 10199 0 0 0 0 0 0 0 0 1 0 0 10 11030 0 0 0 0 0 0 0 0 0 1 0 11 11234 0 0 0 0 0 0 0 0 0 0 1 12 13747 0 0 0 0 0 0 0 0 0 0 0 13 13912 1 0 0 0 0 0 0 0 0 0 0 14 12376 0 1 0 0 0 0 0 0 0 0 0 15 12264 0 0 1 0 0 0 0 0 0 0 0 16 11675 0 0 0 1 0 0 0 0 0 0 0 17 11271 0 0 0 0 1 0 0 0 0 0 0 18 10672 0 0 0 0 0 1 0 0 0 0 0 19 10933 0 0 0 0 0 0 1 0 0 0 0 20 10379 0 0 0 0 0 0 0 1 0 0 0 21 10187 0 0 0 0 0 0 0 0 1 0 0 22 10747 0 0 0 0 0 0 0 0 0 1 0 23 10970 0 0 0 0 0 0 0 0 0 0 1 24 12175 0 0 0 0 0 0 0 0 0 0 0 25 14200 1 0 0 0 0 0 0 0 0 0 0 26 11676 0 1 0 0 0 0 0 0 0 0 0 27 11258 0 0 1 0 0 0 0 0 0 0 0 28 10872 0 0 0 1 0 0 0 0 0 0 0 29 11148 0 0 0 0 1 0 0 0 0 0 0 30 10690 0 0 0 0 0 1 0 0 0 0 0 31 10684 0 0 0 0 0 0 1 0 0 0 0 32 11658 0 0 0 0 0 0 0 1 0 0 0 33 10178 0 0 0 0 0 0 0 0 1 0 0 34 10981 0 0 0 0 0 0 0 0 0 1 0 35 10773 0 0 0 0 0 0 0 0 0 0 1 36 11665 0 0 0 0 0 0 0 0 0 0 0 37 11359 1 0 0 0 0 0 0 0 0 0 0 38 10716 0 1 0 0 0 0 0 0 0 0 0 39 12928 0 0 1 0 0 0 0 0 0 0 0 40 12317 0 0 0 1 0 0 0 0 0 0 0 41 11641 0 0 0 0 1 0 0 0 0 0 0 42 10459 0 0 0 0 0 1 0 0 0 0 0 43 10953 0 0 0 0 0 0 1 0 0 0 0 44 10703 0 0 0 0 0 0 0 1 0 0 0 45 10703 0 0 0 0 0 0 0 0 1 0 0 46 11101 0 0 0 0 0 0 0 0 0 1 0 47 11334 0 0 0 0 0 0 0 0 0 0 1 48 13268 0 0 0 0 0 0 0 0 0 0 0 49 13145 1 0 0 0 0 0 0 0 0 0 0 50 12334 0 1 0 0 0 0 0 0 0 0 0 51 13153 0 0 1 0 0 0 0 0 0 0 0 52 11289 0 0 0 1 0 0 0 0 0 0 0 53 11374 0 0 0 0 1 0 0 0 0 0 0 54 10914 0 0 0 0 0 1 0 0 0 0 0 55 11299 0 0 0 0 0 0 1 0 0 0 0 56 11284 0 0 0 0 0 0 0 1 0 0 0 57 10694 0 0 0 0 0 0 0 0 1 0 0 58 11077 0 0 0 0 0 0 0 0 0 1 0 59 11104 0 0 0 0 0 0 0 0 0 0 1 60 12820 0 0 0 0 0 0 0 0 0 0 0 61 14915 1 0 0 0 0 0 0 0 0 0 0 62 11773 0 1 0 0 0 0 0 0 0 0 0 63 11608 0 0 1 0 0 0 0 0 0 0 0 64 11468 0 0 0 1 0 0 0 0 0 0 0 65 11511 0 0 0 0 1 0 0 0 0 0 0 66 11200 0 0 0 0 0 1 0 0 0 0 0 67 11164 0 0 0 0 0 0 1 0 0 0 0 68 10960 0 0 0 0 0 0 0 1 0 0 0 69 10667 0 0 0 0 0 0 0 0 1 0 0 70 11556 0 0 0 0 0 0 0 0 0 1 0 71 11372 0 0 0 0 0 0 0 0 0 0 1 72 12333 0 0 0 0 0 0 0 0 0 0 0 73 13102 1 0 0 0 0 0 0 0 0 0 0 74 11115 0 1 0 0 0 0 0 0 0 0 0 75 12572 0 0 1 0 0 0 0 0 0 0 0 76 11557 0 0 0 1 0 0 0 0 0 0 0 77 12059 0 0 0 0 1 0 0 0 0 0 0 78 11420 0 0 0 0 0 1 0 0 0 0 0 79 11185 0 0 0 0 0 0 1 0 0 0 0 80 11113 0 0 0 0 0 0 0 1 0 0 0 81 10706 0 0 0 0 0 0 0 0 1 0 0 82 11523 0 0 0 0 0 0 0 0 0 1 0 83 11391 0 0 0 0 0 0 0 0 0 0 1 84 12634 0 0 0 0 0 0 0 0 0 0 0 85 13469 1 0 0 0 0 0 0 0 0 0 0 86 11735 0 1 0 0 0 0 0 0 0 0 0 87 13281 0 0 1 0 0 0 0 0 0 0 0 88 11968 0 0 0 1 0 0 0 0 0 0 0 89 11623 0 0 0 0 1 0 0 0 0 0 0 90 11084 0 0 0 0 0 1 0 0 0 0 0 91 11509 0 0 0 0 0 0 1 0 0 0 0 92 11134 0 0 0 0 0 0 0 1 0 0 0 93 10438 0 0 0 0 0 0 0 0 1 0 0 94 11530 0 0 0 0 0 0 0 0 0 1 0 95 11491 0 0 0 0 0 0 0 0 0 0 1 96 13093 0 0 0 0 0 0 0 0 0 0 0 97 13106 1 0 0 0 0 0 0 0 0 0 0 98 11305 0 1 0 0 0 0 0 0 0 0 0 99 13113 0 0 1 0 0 0 0 0 0 0 0 100 12203 0 0 0 1 0 0 0 0 0 0 0 101 11309 0 0 0 0 1 0 0 0 0 0 0 102 11088 0 0 0 0 0 1 0 0 0 0 0 103 11234 0 0 0 0 0 0 1 0 0 0 0 104 11619 0 0 0 0 0 0 0 1 0 0 0 105 10942 0 0 0 0 0 0 0 0 1 0 0 106 11445 0 0 0 0 0 0 0 0 0 1 0 107 11291 0 0 0 0 0 0 0 0 0 0 1 108 13281 0 0 0 0 0 0 0 0 0 0 0 109 13726 1 0 0 0 0 0 0 0 0 0 0 110 11300 0 1 0 0 0 0 0 0 0 0 0 111 11983 0 0 1 0 0 0 0 0 0 0 0 112 11092 0 0 0 1 0 0 0 0 0 0 0 113 11093 0 0 0 0 1 0 0 0 0 0 0 114 10692 0 0 0 0 0 1 0 0 0 0 0 115 10786 0 0 0 0 0 0 1 0 0 0 0 116 11166 0 0 0 0 0 0 0 1 0 0 0 117 10553 0 0 0 0 0 0 0 0 1 0 0 118 11103 0 0 0 0 0 0 0 0 0 1 0 119 10969 0 0 0 0 0 0 0 0 0 0 1 120 12090 0 0 0 0 0 0 0 0 0 0 0 121 12544 1 0 0 0 0 0 0 0 0 0 0 122 12264 0 1 0 0 0 0 0 0 0 0 0 123 13783 0 0 1 0 0 0 0 0 0 0 0 124 11214 0 0 0 1 0 0 0 0 0 0 0 125 11453 0 0 0 0 1 0 0 0 0 0 0 126 10883 0 0 0 0 0 1 0 0 0 0 0 127 10381 0 0 0 0 0 0 1 0 0 0 0 128 10348 0 0 0 0 0 0 0 1 0 0 0 129 10024 0 0 0 0 0 0 0 0 1 0 0 130 10805 0 0 0 0 0 0 0 0 0 1 0 131 10796 0 0 0 0 0 0 0 0 0 0 1 132 11907 0 0 0 0 0 0 0 0 0 0 0 133 12261 1 0 0 0 0 0 0 0 0 0 0 134 11377 0 1 0 0 0 0 0 0 0 0 0 135 12689 0 0 1 0 0 0 0 0 0 0 0 136 11474 0 0 0 1 0 0 0 0 0 0 0 137 10992 0 0 0 0 1 0 0 0 0 0 0 138 10764 0 0 0 0 0 1 0 0 0 0 0 139 12164 0 0 0 0 0 0 1 0 0 0 0 140 10409 0 0 0 0 0 0 0 1 0 0 0 141 10398 0 0 0 0 0 0 0 0 1 0 0 142 10349 0 0 0 0 0 0 0 0 0 1 0 143 10865 0 0 0 0 0 0 0 0 0 0 1 144 11630 0 0 0 0 0 0 0 0 0 0 0 145 12221 1 0 0 0 0 0 0 0 0 0 0 146 10884 0 1 0 0 0 0 0 0 0 0 0 147 12019 0 0 1 0 0 0 0 0 0 0 0 148 11021 0 0 0 1 0 0 0 0 0 0 0 149 10799 0 0 0 0 1 0 0 0 0 0 0 150 10423 0 0 0 0 0 1 0 0 0 0 0 151 10484 0 0 0 0 0 0 1 0 0 0 0 152 10450 0 0 0 0 0 0 0 1 0 0 0 153 9906 0 0 0 0 0 0 0 0 1 0 0 154 11049 0 0 0 0 0 0 0 0 0 1 0 155 11281 0 0 0 0 0 0 0 0 0 0 1 156 12485 0 0 0 0 0 0 0 0 0 0 0 157 12849 1 0 0 0 0 0 0 0 0 0 0 158 11380 0 1 0 0 0 0 0 0 0 0 0 159 12079 0 0 1 0 0 0 0 0 0 0 0 160 11366 0 0 0 1 0 0 0 0 0 0 0 161 11328 0 0 0 0 1 0 0 0 0 0 0 162 10444 0 0 0 0 0 1 0 0 0 0 0 163 10854 0 0 0 0 0 0 1 0 0 0 0 164 10434 0 0 0 0 0 0 0 1 0 0 0 165 10137 0 0 0 0 0 0 0 0 1 0 0 166 10992 0 0 0 0 0 0 0 0 0 1 0 167 10906 0 0 0 0 0 0 0 0 0 0 1 168 12367 0 0 0 0 0 0 0 0 0 0 0 169 14371 1 0 0 0 0 0 0 0 0 0 0 170 11695 0 1 0 0 0 0 0 0 0 0 0 171 11546 0 0 1 0 0 0 0 0 0 0 0 172 10922 0 0 0 1 0 0 0 0 0 0 0 173 10670 0 0 0 0 1 0 0 0 0 0 0 174 10254 0 0 0 0 0 1 0 0 0 0 0 175 10573 0 0 0 0 0 0 1 0 0 0 0 176 10239 0 0 0 0 0 0 0 1 0 0 0 177 10253 0 0 0 0 0 0 0 0 1 0 0 178 11176 0 0 0 0 0 0 0 0 0 1 0 179 10719 0 0 0 0 0 0 0 0 0 0 1 180 11817 0 0 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 12487.47 656.13 -1018.40 -64.47 -1030.80 -1190.73 M6 M7 M8 M9 M10 M11 -1721.13 -1454.73 -1632.53 -2088.47 -1389.87 -1387.73 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1784.60 -323.43 -31.67 292.20 1771.40 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 12487.47 137.44 90.860 < 2e-16 *** M1 656.13 194.36 3.376 0.000914 *** M2 -1018.40 194.36 -5.240 4.77e-07 *** M3 -64.47 194.36 -0.332 0.740545 M4 -1030.80 194.36 -5.303 3.54e-07 *** M5 -1190.73 194.36 -6.126 6.18e-09 *** M6 -1721.13 194.36 -8.855 1.14e-15 *** M7 -1454.73 194.36 -7.485 3.84e-12 *** M8 -1632.53 194.36 -8.399 1.81e-14 *** M9 -2088.47 194.36 -10.745 < 2e-16 *** M10 -1389.87 194.36 -7.151 2.53e-11 *** M11 -1387.73 194.36 -7.140 2.69e-11 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 532.3 on 168 degrees of freedom Multiple R-squared: 0.6959, Adjusted R-squared: 0.676 F-statistic: 34.95 on 11 and 168 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.9988431 0.002313821 0.001156911 [2,] 0.9970344 0.005931137 0.002965568 [3,] 0.9931604 0.013679252 0.006839626 [4,] 0.9862381 0.027523796 0.013761898 [5,] 0.9762911 0.047417879 0.023708940 [6,] 0.9665802 0.066839695 0.033419848 [7,] 0.9457320 0.108536091 0.054268046 [8,] 0.9209127 0.158174689 0.079087344 [9,] 0.8878119 0.224376156 0.112188078 [10,] 0.9473112 0.105377682 0.052688841 [11,] 0.9751515 0.049697000 0.024848500 [12,] 0.9663257 0.067348563 0.033674281 [13,] 0.9769012 0.046197587 0.023098793 [14,] 0.9752655 0.049468997 0.024734498 [15,] 0.9637185 0.072563076 0.036281538 [16,] 0.9483667 0.103266501 0.051633251 [17,] 0.9358013 0.128397336 0.064198668 [18,] 0.9527362 0.094527630 0.047263815 [19,] 0.9355057 0.128988576 0.064494288 [20,] 0.9137646 0.172470862 0.086235431 [21,] 0.8936540 0.212691929 0.106345964 [22,] 0.9402218 0.119556450 0.059778225 [23,] 0.9966121 0.006775881 0.003387940 [24,] 0.9969112 0.006177675 0.003088838 [25,] 0.9978153 0.004369368 0.002184684 [26,] 0.9986618 0.002676349 0.001338174 [27,] 0.9982387 0.003522692 0.001761346 [28,] 0.9974772 0.005045676 0.002522838 [29,] 0.9962160 0.007567986 0.003783993 [30,] 0.9946905 0.010618907 0.005309453 [31,] 0.9934863 0.013027337 0.006513668 [32,] 0.9908128 0.018374335 0.009187168 [33,] 0.9879660 0.024068085 0.012034043 [34,] 0.9899134 0.020173177 0.010086588 [35,] 0.9865269 0.026946200 0.013473100 [36,] 0.9923061 0.015387758 0.007693879 [37,] 0.9947176 0.010564865 0.005282432 [38,] 0.9928279 0.014344122 0.007172061 [39,] 0.9899801 0.020039774 0.010019887 [40,] 0.9868896 0.026220745 0.013110373 [41,] 0.9833937 0.033212696 0.016606348 [42,] 0.9805208 0.038958387 0.019479193 [43,] 0.9761469 0.047706113 0.023853056 [44,] 0.9686414 0.062717200 0.031358600 [45,] 0.9590613 0.081877425 0.040938712 [46,] 0.9504823 0.099035388 0.049517694 [47,] 0.9969109 0.006178205 0.003089103 [48,] 0.9960232 0.007953534 0.003976767 [49,] 0.9971828 0.005634350 0.002817175 [50,] 0.9959901 0.008019809 0.004009905 [51,] 0.9946137 0.010772637 0.005386319 [52,] 0.9939752 0.012049635 0.006024817 [53,] 0.9918067 0.016386677 0.008193338 [54,] 0.9889858 0.022028489 0.011014245 [55,] 0.9861001 0.027799792 0.013899896 [56,] 0.9849764 0.030047152 0.015023576 [57,] 0.9813029 0.037394193 0.018697097 [58,] 0.9767988 0.046402327 0.023201163 [59,] 0.9699548 0.060090493 0.030045246 [60,] 0.9650394 0.069921153 0.034960577 [61,] 0.9571227 0.085754507 0.042877254 [62,] 0.9460327 0.107934632 0.053967316 [63,] 0.9564349 0.087130263 0.043565131 [64,] 0.9606881 0.078623832 0.039311916 [65,] 0.9508595 0.098280931 0.049140465 [66,] 0.9415958 0.116808301 0.058404151 [67,] 0.9319460 0.136108005 0.068054003 [68,] 0.9258852 0.148229631 0.074114815 [69,] 0.9138121 0.172375883 0.086187941 [70,] 0.8974672 0.205065620 0.102532810 [71,] 0.8849679 0.230064271 0.115032135 [72,] 0.8672927 0.265414680 0.132707340 [73,] 0.9002972 0.199405567 0.099702784 [74,] 0.8993402 0.201319698 0.100659849 [75,] 0.8891448 0.221710434 0.110855217 [76,] 0.8756452 0.248709549 0.124354774 [77,] 0.8716685 0.256663088 0.128331544 [78,] 0.8567654 0.286469125 0.143234562 [79,] 0.8301861 0.339627748 0.169813874 [80,] 0.8214824 0.357035264 0.178517632 [81,] 0.8093870 0.381226035 0.190613018 [82,] 0.8272795 0.345441064 0.172720532 [83,] 0.7980817 0.403836638 0.201918319 [84,] 0.7676061 0.464787726 0.232393863 [85,] 0.7918548 0.416290319 0.208145159 [86,] 0.8364528 0.327094352 0.163547176 [87,] 0.8112539 0.377492142 0.188746071 [88,] 0.7972390 0.405521991 0.202760996 [89,] 0.7723444 0.455311214 0.227655607 [90,] 0.8331591 0.333681831 0.166840916 [91,] 0.8435875 0.312824963 0.156412482 [92,] 0.8341827 0.331634631 0.165817316 [93,] 0.8127504 0.374499114 0.187249557 [94,] 0.8865054 0.226989136 0.113494568 [95,] 0.9078812 0.184237646 0.092118823 [96,] 0.8897431 0.220513757 0.110256879 [97,] 0.8830337 0.233932639 0.116966319 [98,] 0.8669310 0.266138084 0.133069042 [99,] 0.8434849 0.313030284 0.156515142 [100,] 0.8154891 0.369021814 0.184510907 [101,] 0.7868910 0.426218043 0.213109022 [102,] 0.8024248 0.395150370 0.197575185 [103,] 0.7811416 0.437716811 0.218858406 [104,] 0.7485001 0.502999832 0.251499916 [105,] 0.7104440 0.579112083 0.289556042 [106,] 0.6877309 0.624538230 0.312269115 [107,] 0.6816983 0.636603320 0.318301660 [108,] 0.7490969 0.501806136 0.250903068 [109,] 0.9526017 0.094796502 0.047398251 [110,] 0.9399739 0.120052221 0.060026111 [111,] 0.9349767 0.130046642 0.065023321 [112,] 0.9254236 0.149152772 0.074576386 [113,] 0.9345494 0.130901128 0.065450564 [114,] 0.9237994 0.152401202 0.076200601 [115,] 0.9079312 0.184137506 0.092068753 [116,] 0.8868447 0.226310660 0.113155330 [117,] 0.8632793 0.273441415 0.136720707 [118,] 0.8477771 0.304445709 0.152222854 [119,] 0.8935070 0.212985969 0.106492984 [120,] 0.8656528 0.268694477 0.134347238 [121,] 0.8857376 0.228524750 0.114262375 [122,] 0.8667609 0.266478204 0.133239102 [123,] 0.8367834 0.326433109 0.163216555 [124,] 0.8137364 0.372527227 0.186263613 [125,] 0.9670092 0.065981621 0.032990810 [126,] 0.9563492 0.087301642 0.043650821 [127,] 0.9445301 0.110939756 0.055469878 [128,] 0.9590389 0.081922103 0.040961051 [129,] 0.9436048 0.112790462 0.056395231 [130,] 0.9523015 0.095396981 0.047698491 [131,] 0.9951013 0.009797492 0.004898746 [132,] 0.9965158 0.006968378 0.003484189 [133,] 0.9946897 0.010620511 0.005310255 [134,] 0.9915400 0.016919996 0.008459998 [135,] 0.9874016 0.025196839 0.012598420 [136,] 0.9799811 0.040037832 0.020018916 [137,] 0.9716936 0.056612810 0.028306405 [138,] 0.9573693 0.085261309 0.042630655 [139,] 0.9427766 0.114446723 0.057223361 [140,] 0.9133772 0.173245523 0.086622761 [141,] 0.9002374 0.199525244 0.099762622 [142,] 0.8760800 0.247839917 0.123919958 [143,] 0.9937873 0.012425499 0.006212750 [144,] 0.9898211 0.020357772 0.010178886 [145,] 0.9903345 0.019330901 0.009665451 [146,] 0.9882783 0.023443371 0.011721685 [147,] 0.9954154 0.009169194 0.004584597 [148,] 0.9891896 0.021620723 0.010810362 [149,] 0.9796007 0.040798690 0.020399345 [150,] 0.9526787 0.094642562 0.047321281 [151,] 0.8811956 0.237608781 0.118804390 > postscript(file="/var/www/html/rcomp/tmp/1da4j1292938524.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/www/html/rcomp/tmp/251l41292938524.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/www/html/rcomp/tmp/351l41292938524.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/www/html/rcomp/tmp/451l41292938524.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/www/html/rcomp/tmp/551l41292938524.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 = 180 Frequency = 1 1 2 3 4 5 6 -1169.600000 -1363.066667 -354.000000 -44.666667 -116.733333 -258.333333 7 8 9 10 11 12 255.266667 73.066667 -200.000000 -67.600000 134.266667 1259.533333 13 14 15 16 17 18 768.400000 906.933333 -159.000000 218.333333 -25.733333 -94.333333 19 20 21 22 23 24 -99.733333 -475.933333 -212.000000 -350.600000 -129.733333 -312.466667 25 26 27 28 29 30 1056.400000 206.933333 -1165.000000 -584.666667 -148.733333 -76.333333 31 32 33 34 35 36 -348.733333 803.066667 -221.000000 -116.600000 -326.733333 -822.466667 37 38 39 40 41 42 -1784.600000 -753.066667 505.000000 860.333333 344.266667 -307.333333 43 44 45 46 47 48 -79.733333 -151.933333 304.000000 3.400000 234.266667 780.533333 49 50 51 52 53 54 1.400000 864.933333 730.000000 -167.666667 77.266667 147.666667 55 56 57 58 59 60 266.266667 429.066667 295.000000 -20.600000 4.266667 332.533333 61 62 63 64 65 66 1771.400000 303.933333 -815.000000 11.333333 214.266667 433.666667 67 68 69 70 71 72 131.266667 105.066667 268.000000 458.400000 272.266667 -154.466667 73 74 75 76 77 78 -41.600000 -354.066667 149.000000 100.333333 762.266667 653.666667 79 80 81 82 83 84 152.266667 258.066667 307.000000 425.400000 291.266667 146.533333 85 86 87 88 89 90 325.400000 265.933333 858.000000 511.333333 326.266667 317.666667 91 92 93 94 95 96 476.266667 279.066667 39.000000 432.400000 391.266667 605.533333 97 98 99 100 101 102 -37.600000 -164.066667 690.000000 746.333333 12.266667 321.666667 103 104 105 106 107 108 201.266667 764.066667 543.000000 347.400000 191.266667 793.533333 109 110 111 112 113 114 582.400000 -169.066667 -440.000000 -364.666667 -203.733333 -74.333333 115 116 117 118 119 120 -246.733333 311.066667 154.000000 5.400000 -130.733333 -397.466667 121 122 123 124 125 126 -599.600000 794.933333 1360.000000 -242.666667 156.266667 116.666667 127 128 129 130 131 132 -651.733333 -506.933333 -375.000000 -292.600000 -303.733333 -580.466667 133 134 135 136 137 138 -882.600000 -92.066667 266.000000 17.333333 -304.733333 -2.333333 139 140 141 142 143 144 1131.266667 -445.933333 -1.000000 -748.600000 -234.733333 -857.466667 145 146 147 148 149 150 -922.600000 -585.066667 -404.000000 -435.666667 -497.733333 -343.333333 151 152 153 154 155 156 -548.733333 -404.933333 -493.000000 -48.600000 181.266667 -2.466667 157 158 159 160 161 162 -294.600000 -89.066667 -344.000000 -90.666667 31.266667 -322.333333 163 164 165 166 167 168 -178.733333 -420.933333 -262.000000 -105.600000 -193.733333 -120.466667 169 170 171 172 173 174 1227.400000 225.933333 -877.000000 -534.666667 -626.733333 -512.333333 175 176 177 178 179 180 -459.733333 -615.933333 -146.000000 78.400000 -380.733333 -670.466667 > postscript(file="/var/www/html/rcomp/tmp/6ya3p1292938524.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 = 180 Frequency = 1 lag(myerror, k = 1) myerror 0 -1169.600000 NA 1 -1363.066667 -1169.600000 2 -354.000000 -1363.066667 3 -44.666667 -354.000000 4 -116.733333 -44.666667 5 -258.333333 -116.733333 6 255.266667 -258.333333 7 73.066667 255.266667 8 -200.000000 73.066667 9 -67.600000 -200.000000 10 134.266667 -67.600000 11 1259.533333 134.266667 12 768.400000 1259.533333 13 906.933333 768.400000 14 -159.000000 906.933333 15 218.333333 -159.000000 16 -25.733333 218.333333 17 -94.333333 -25.733333 18 -99.733333 -94.333333 19 -475.933333 -99.733333 20 -212.000000 -475.933333 21 -350.600000 -212.000000 22 -129.733333 -350.600000 23 -312.466667 -129.733333 24 1056.400000 -312.466667 25 206.933333 1056.400000 26 -1165.000000 206.933333 27 -584.666667 -1165.000000 28 -148.733333 -584.666667 29 -76.333333 -148.733333 30 -348.733333 -76.333333 31 803.066667 -348.733333 32 -221.000000 803.066667 33 -116.600000 -221.000000 34 -326.733333 -116.600000 35 -822.466667 -326.733333 36 -1784.600000 -822.466667 37 -753.066667 -1784.600000 38 505.000000 -753.066667 39 860.333333 505.000000 40 344.266667 860.333333 41 -307.333333 344.266667 42 -79.733333 -307.333333 43 -151.933333 -79.733333 44 304.000000 -151.933333 45 3.400000 304.000000 46 234.266667 3.400000 47 780.533333 234.266667 48 1.400000 780.533333 49 864.933333 1.400000 50 730.000000 864.933333 51 -167.666667 730.000000 52 77.266667 -167.666667 53 147.666667 77.266667 54 266.266667 147.666667 55 429.066667 266.266667 56 295.000000 429.066667 57 -20.600000 295.000000 58 4.266667 -20.600000 59 332.533333 4.266667 60 1771.400000 332.533333 61 303.933333 1771.400000 62 -815.000000 303.933333 63 11.333333 -815.000000 64 214.266667 11.333333 65 433.666667 214.266667 66 131.266667 433.666667 67 105.066667 131.266667 68 268.000000 105.066667 69 458.400000 268.000000 70 272.266667 458.400000 71 -154.466667 272.266667 72 -41.600000 -154.466667 73 -354.066667 -41.600000 74 149.000000 -354.066667 75 100.333333 149.000000 76 762.266667 100.333333 77 653.666667 762.266667 78 152.266667 653.666667 79 258.066667 152.266667 80 307.000000 258.066667 81 425.400000 307.000000 82 291.266667 425.400000 83 146.533333 291.266667 84 325.400000 146.533333 85 265.933333 325.400000 86 858.000000 265.933333 87 511.333333 858.000000 88 326.266667 511.333333 89 317.666667 326.266667 90 476.266667 317.666667 91 279.066667 476.266667 92 39.000000 279.066667 93 432.400000 39.000000 94 391.266667 432.400000 95 605.533333 391.266667 96 -37.600000 605.533333 97 -164.066667 -37.600000 98 690.000000 -164.066667 99 746.333333 690.000000 100 12.266667 746.333333 101 321.666667 12.266667 102 201.266667 321.666667 103 764.066667 201.266667 104 543.000000 764.066667 105 347.400000 543.000000 106 191.266667 347.400000 107 793.533333 191.266667 108 582.400000 793.533333 109 -169.066667 582.400000 110 -440.000000 -169.066667 111 -364.666667 -440.000000 112 -203.733333 -364.666667 113 -74.333333 -203.733333 114 -246.733333 -74.333333 115 311.066667 -246.733333 116 154.000000 311.066667 117 5.400000 154.000000 118 -130.733333 5.400000 119 -397.466667 -130.733333 120 -599.600000 -397.466667 121 794.933333 -599.600000 122 1360.000000 794.933333 123 -242.666667 1360.000000 124 156.266667 -242.666667 125 116.666667 156.266667 126 -651.733333 116.666667 127 -506.933333 -651.733333 128 -375.000000 -506.933333 129 -292.600000 -375.000000 130 -303.733333 -292.600000 131 -580.466667 -303.733333 132 -882.600000 -580.466667 133 -92.066667 -882.600000 134 266.000000 -92.066667 135 17.333333 266.000000 136 -304.733333 17.333333 137 -2.333333 -304.733333 138 1131.266667 -2.333333 139 -445.933333 1131.266667 140 -1.000000 -445.933333 141 -748.600000 -1.000000 142 -234.733333 -748.600000 143 -857.466667 -234.733333 144 -922.600000 -857.466667 145 -585.066667 -922.600000 146 -404.000000 -585.066667 147 -435.666667 -404.000000 148 -497.733333 -435.666667 149 -343.333333 -497.733333 150 -548.733333 -343.333333 151 -404.933333 -548.733333 152 -493.000000 -404.933333 153 -48.600000 -493.000000 154 181.266667 -48.600000 155 -2.466667 181.266667 156 -294.600000 -2.466667 157 -89.066667 -294.600000 158 -344.000000 -89.066667 159 -90.666667 -344.000000 160 31.266667 -90.666667 161 -322.333333 31.266667 162 -178.733333 -322.333333 163 -420.933333 -178.733333 164 -262.000000 -420.933333 165 -105.600000 -262.000000 166 -193.733333 -105.600000 167 -120.466667 -193.733333 168 1227.400000 -120.466667 169 225.933333 1227.400000 170 -877.000000 225.933333 171 -534.666667 -877.000000 172 -626.733333 -534.666667 173 -512.333333 -626.733333 174 -459.733333 -512.333333 175 -615.933333 -459.733333 176 -146.000000 -615.933333 177 78.400000 -146.000000 178 -380.733333 78.400000 179 -670.466667 -380.733333 180 NA -670.466667 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1363.066667 -1169.600000 [2,] -354.000000 -1363.066667 [3,] -44.666667 -354.000000 [4,] -116.733333 -44.666667 [5,] -258.333333 -116.733333 [6,] 255.266667 -258.333333 [7,] 73.066667 255.266667 [8,] -200.000000 73.066667 [9,] -67.600000 -200.000000 [10,] 134.266667 -67.600000 [11,] 1259.533333 134.266667 [12,] 768.400000 1259.533333 [13,] 906.933333 768.400000 [14,] -159.000000 906.933333 [15,] 218.333333 -159.000000 [16,] -25.733333 218.333333 [17,] -94.333333 -25.733333 [18,] -99.733333 -94.333333 [19,] -475.933333 -99.733333 [20,] -212.000000 -475.933333 [21,] -350.600000 -212.000000 [22,] -129.733333 -350.600000 [23,] -312.466667 -129.733333 [24,] 1056.400000 -312.466667 [25,] 206.933333 1056.400000 [26,] -1165.000000 206.933333 [27,] -584.666667 -1165.000000 [28,] -148.733333 -584.666667 [29,] -76.333333 -148.733333 [30,] -348.733333 -76.333333 [31,] 803.066667 -348.733333 [32,] -221.000000 803.066667 [33,] -116.600000 -221.000000 [34,] -326.733333 -116.600000 [35,] -822.466667 -326.733333 [36,] -1784.600000 -822.466667 [37,] -753.066667 -1784.600000 [38,] 505.000000 -753.066667 [39,] 860.333333 505.000000 [40,] 344.266667 860.333333 [41,] -307.333333 344.266667 [42,] -79.733333 -307.333333 [43,] -151.933333 -79.733333 [44,] 304.000000 -151.933333 [45,] 3.400000 304.000000 [46,] 234.266667 3.400000 [47,] 780.533333 234.266667 [48,] 1.400000 780.533333 [49,] 864.933333 1.400000 [50,] 730.000000 864.933333 [51,] -167.666667 730.000000 [52,] 77.266667 -167.666667 [53,] 147.666667 77.266667 [54,] 266.266667 147.666667 [55,] 429.066667 266.266667 [56,] 295.000000 429.066667 [57,] -20.600000 295.000000 [58,] 4.266667 -20.600000 [59,] 332.533333 4.266667 [60,] 1771.400000 332.533333 [61,] 303.933333 1771.400000 [62,] -815.000000 303.933333 [63,] 11.333333 -815.000000 [64,] 214.266667 11.333333 [65,] 433.666667 214.266667 [66,] 131.266667 433.666667 [67,] 105.066667 131.266667 [68,] 268.000000 105.066667 [69,] 458.400000 268.000000 [70,] 272.266667 458.400000 [71,] -154.466667 272.266667 [72,] -41.600000 -154.466667 [73,] -354.066667 -41.600000 [74,] 149.000000 -354.066667 [75,] 100.333333 149.000000 [76,] 762.266667 100.333333 [77,] 653.666667 762.266667 [78,] 152.266667 653.666667 [79,] 258.066667 152.266667 [80,] 307.000000 258.066667 [81,] 425.400000 307.000000 [82,] 291.266667 425.400000 [83,] 146.533333 291.266667 [84,] 325.400000 146.533333 [85,] 265.933333 325.400000 [86,] 858.000000 265.933333 [87,] 511.333333 858.000000 [88,] 326.266667 511.333333 [89,] 317.666667 326.266667 [90,] 476.266667 317.666667 [91,] 279.066667 476.266667 [92,] 39.000000 279.066667 [93,] 432.400000 39.000000 [94,] 391.266667 432.400000 [95,] 605.533333 391.266667 [96,] -37.600000 605.533333 [97,] -164.066667 -37.600000 [98,] 690.000000 -164.066667 [99,] 746.333333 690.000000 [100,] 12.266667 746.333333 [101,] 321.666667 12.266667 [102,] 201.266667 321.666667 [103,] 764.066667 201.266667 [104,] 543.000000 764.066667 [105,] 347.400000 543.000000 [106,] 191.266667 347.400000 [107,] 793.533333 191.266667 [108,] 582.400000 793.533333 [109,] -169.066667 582.400000 [110,] -440.000000 -169.066667 [111,] -364.666667 -440.000000 [112,] -203.733333 -364.666667 [113,] -74.333333 -203.733333 [114,] -246.733333 -74.333333 [115,] 311.066667 -246.733333 [116,] 154.000000 311.066667 [117,] 5.400000 154.000000 [118,] -130.733333 5.400000 [119,] -397.466667 -130.733333 [120,] -599.600000 -397.466667 [121,] 794.933333 -599.600000 [122,] 1360.000000 794.933333 [123,] -242.666667 1360.000000 [124,] 156.266667 -242.666667 [125,] 116.666667 156.266667 [126,] -651.733333 116.666667 [127,] -506.933333 -651.733333 [128,] -375.000000 -506.933333 [129,] -292.600000 -375.000000 [130,] -303.733333 -292.600000 [131,] -580.466667 -303.733333 [132,] -882.600000 -580.466667 [133,] -92.066667 -882.600000 [134,] 266.000000 -92.066667 [135,] 17.333333 266.000000 [136,] -304.733333 17.333333 [137,] -2.333333 -304.733333 [138,] 1131.266667 -2.333333 [139,] -445.933333 1131.266667 [140,] -1.000000 -445.933333 [141,] -748.600000 -1.000000 [142,] -234.733333 -748.600000 [143,] -857.466667 -234.733333 [144,] -922.600000 -857.466667 [145,] -585.066667 -922.600000 [146,] -404.000000 -585.066667 [147,] -435.666667 -404.000000 [148,] -497.733333 -435.666667 [149,] -343.333333 -497.733333 [150,] -548.733333 -343.333333 [151,] -404.933333 -548.733333 [152,] -493.000000 -404.933333 [153,] -48.600000 -493.000000 [154,] 181.266667 -48.600000 [155,] -2.466667 181.266667 [156,] -294.600000 -2.466667 [157,] -89.066667 -294.600000 [158,] -344.000000 -89.066667 [159,] -90.666667 -344.000000 [160,] 31.266667 -90.666667 [161,] -322.333333 31.266667 [162,] -178.733333 -322.333333 [163,] -420.933333 -178.733333 [164,] -262.000000 -420.933333 [165,] -105.600000 -262.000000 [166,] -193.733333 -105.600000 [167,] -120.466667 -193.733333 [168,] 1227.400000 -120.466667 [169,] 225.933333 1227.400000 [170,] -877.000000 225.933333 [171,] -534.666667 -877.000000 [172,] -626.733333 -534.666667 [173,] -512.333333 -626.733333 [174,] -459.733333 -512.333333 [175,] -615.933333 -459.733333 [176,] -146.000000 -615.933333 [177,] 78.400000 -146.000000 [178,] -380.733333 78.400000 [179,] -670.466667 -380.733333 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1363.066667 -1169.600000 2 -354.000000 -1363.066667 3 -44.666667 -354.000000 4 -116.733333 -44.666667 5 -258.333333 -116.733333 6 255.266667 -258.333333 7 73.066667 255.266667 8 -200.000000 73.066667 9 -67.600000 -200.000000 10 134.266667 -67.600000 11 1259.533333 134.266667 12 768.400000 1259.533333 13 906.933333 768.400000 14 -159.000000 906.933333 15 218.333333 -159.000000 16 -25.733333 218.333333 17 -94.333333 -25.733333 18 -99.733333 -94.333333 19 -475.933333 -99.733333 20 -212.000000 -475.933333 21 -350.600000 -212.000000 22 -129.733333 -350.600000 23 -312.466667 -129.733333 24 1056.400000 -312.466667 25 206.933333 1056.400000 26 -1165.000000 206.933333 27 -584.666667 -1165.000000 28 -148.733333 -584.666667 29 -76.333333 -148.733333 30 -348.733333 -76.333333 31 803.066667 -348.733333 32 -221.000000 803.066667 33 -116.600000 -221.000000 34 -326.733333 -116.600000 35 -822.466667 -326.733333 36 -1784.600000 -822.466667 37 -753.066667 -1784.600000 38 505.000000 -753.066667 39 860.333333 505.000000 40 344.266667 860.333333 41 -307.333333 344.266667 42 -79.733333 -307.333333 43 -151.933333 -79.733333 44 304.000000 -151.933333 45 3.400000 304.000000 46 234.266667 3.400000 47 780.533333 234.266667 48 1.400000 780.533333 49 864.933333 1.400000 50 730.000000 864.933333 51 -167.666667 730.000000 52 77.266667 -167.666667 53 147.666667 77.266667 54 266.266667 147.666667 55 429.066667 266.266667 56 295.000000 429.066667 57 -20.600000 295.000000 58 4.266667 -20.600000 59 332.533333 4.266667 60 1771.400000 332.533333 61 303.933333 1771.400000 62 -815.000000 303.933333 63 11.333333 -815.000000 64 214.266667 11.333333 65 433.666667 214.266667 66 131.266667 433.666667 67 105.066667 131.266667 68 268.000000 105.066667 69 458.400000 268.000000 70 272.266667 458.400000 71 -154.466667 272.266667 72 -41.600000 -154.466667 73 -354.066667 -41.600000 74 149.000000 -354.066667 75 100.333333 149.000000 76 762.266667 100.333333 77 653.666667 762.266667 78 152.266667 653.666667 79 258.066667 152.266667 80 307.000000 258.066667 81 425.400000 307.000000 82 291.266667 425.400000 83 146.533333 291.266667 84 325.400000 146.533333 85 265.933333 325.400000 86 858.000000 265.933333 87 511.333333 858.000000 88 326.266667 511.333333 89 317.666667 326.266667 90 476.266667 317.666667 91 279.066667 476.266667 92 39.000000 279.066667 93 432.400000 39.000000 94 391.266667 432.400000 95 605.533333 391.266667 96 -37.600000 605.533333 97 -164.066667 -37.600000 98 690.000000 -164.066667 99 746.333333 690.000000 100 12.266667 746.333333 101 321.666667 12.266667 102 201.266667 321.666667 103 764.066667 201.266667 104 543.000000 764.066667 105 347.400000 543.000000 106 191.266667 347.400000 107 793.533333 191.266667 108 582.400000 793.533333 109 -169.066667 582.400000 110 -440.000000 -169.066667 111 -364.666667 -440.000000 112 -203.733333 -364.666667 113 -74.333333 -203.733333 114 -246.733333 -74.333333 115 311.066667 -246.733333 116 154.000000 311.066667 117 5.400000 154.000000 118 -130.733333 5.400000 119 -397.466667 -130.733333 120 -599.600000 -397.466667 121 794.933333 -599.600000 122 1360.000000 794.933333 123 -242.666667 1360.000000 124 156.266667 -242.666667 125 116.666667 156.266667 126 -651.733333 116.666667 127 -506.933333 -651.733333 128 -375.000000 -506.933333 129 -292.600000 -375.000000 130 -303.733333 -292.600000 131 -580.466667 -303.733333 132 -882.600000 -580.466667 133 -92.066667 -882.600000 134 266.000000 -92.066667 135 17.333333 266.000000 136 -304.733333 17.333333 137 -2.333333 -304.733333 138 1131.266667 -2.333333 139 -445.933333 1131.266667 140 -1.000000 -445.933333 141 -748.600000 -1.000000 142 -234.733333 -748.600000 143 -857.466667 -234.733333 144 -922.600000 -857.466667 145 -585.066667 -922.600000 146 -404.000000 -585.066667 147 -435.666667 -404.000000 148 -497.733333 -435.666667 149 -343.333333 -497.733333 150 -548.733333 -343.333333 151 -404.933333 -548.733333 152 -493.000000 -404.933333 153 -48.600000 -493.000000 154 181.266667 -48.600000 155 -2.466667 181.266667 156 -294.600000 -2.466667 157 -89.066667 -294.600000 158 -344.000000 -89.066667 159 -90.666667 -344.000000 160 31.266667 -90.666667 161 -322.333333 31.266667 162 -178.733333 -322.333333 163 -420.933333 -178.733333 164 -262.000000 -420.933333 165 -105.600000 -262.000000 166 -193.733333 -105.600000 167 -120.466667 -193.733333 168 1227.400000 -120.466667 169 225.933333 1227.400000 170 -877.000000 225.933333 171 -534.666667 -877.000000 172 -626.733333 -534.666667 173 -512.333333 -626.733333 174 -459.733333 -512.333333 175 -615.933333 -459.733333 176 -146.000000 -615.933333 177 78.400000 -146.000000 178 -380.733333 78.400000 179 -670.466667 -380.733333 > 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/7r12s1292938524.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/www/html/rcomp/tmp/8r12s1292938524.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/www/html/rcomp/tmp/9r12s1292938524.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') hat values (leverages) are all = 0.06666667 and there are no factor predictors; no plot no. 5 > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10jt1d1292938524.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/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/11nbi11292938524.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/12qcyp1292938524.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/13m4ef1292938524.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/1484vl1292938524.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/15t5tr1292938524.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/16e5sx1292938524.tab") + } > > try(system("convert tmp/1da4j1292938524.ps tmp/1da4j1292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/251l41292938524.ps tmp/251l41292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/351l41292938524.ps tmp/351l41292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/451l41292938524.ps tmp/451l41292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/551l41292938524.ps tmp/551l41292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/6ya3p1292938524.ps tmp/6ya3p1292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/7r12s1292938524.ps tmp/7r12s1292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/8r12s1292938524.ps tmp/8r12s1292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/9r12s1292938524.ps tmp/9r12s1292938524.png",intern=TRUE)) character(0) > try(system("convert tmp/10jt1d1292938524.ps tmp/10jt1d1292938524.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.399 1.774 9.621