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(1567 + ,0 + ,2237 + ,0 + ,2598 + ,0 + ,3729 + ,0 + ,5715 + ,0 + ,5776 + ,0 + ,5852 + ,0 + ,6878 + ,0 + ,5488 + ,0 + ,3583 + ,0 + ,2054 + ,0 + ,2282 + ,0 + ,1552 + ,0 + ,2261 + ,0 + ,2446 + ,0 + ,3519 + ,0 + ,5161 + ,0 + ,5085 + ,0 + ,5711 + ,0 + ,6057 + ,0 + ,5224 + ,0 + ,3363 + ,0 + ,1899 + ,0 + ,2115 + ,0 + ,1491 + ,0 + ,2061 + ,0 + ,2419 + ,0 + ,3430 + ,0 + ,4778 + ,0 + ,4862 + ,0 + ,6176 + ,0 + ,5664 + ,0 + ,5529 + ,0 + ,3418 + ,0 + ,1941 + ,0 + ,2402 + ,0 + ,1579 + ,0 + ,2146 + ,0 + ,2462 + ,0 + ,3695 + ,0 + ,4831 + ,0 + ,5134 + ,0 + ,6250 + ,0 + ,5760 + ,0 + ,6249 + ,0 + ,2917 + ,0 + ,1741 + ,0 + ,2359 + ,0 + ,1511 + ,0 + ,2059 + ,0 + ,2635 + ,0 + ,2867 + ,0 + ,4403 + ,0 + ,5720 + ,0 + ,4502 + ,0 + ,5749 + ,0 + ,5627 + ,0 + ,2846 + ,0 + ,1762 + ,0 + ,2429 + ,0 + ,1169 + ,0 + ,2154 + ,0 + ,2249 + ,0 + ,2687 + ,0 + ,4359 + ,0 + ,5382 + ,0 + ,4459 + ,0 + ,6398 + ,0 + ,4596 + ,0 + ,3024 + ,0 + ,1887 + ,0 + ,2070 + ,0 + ,1351 + ,0 + ,2218 + ,0 + ,2461 + ,0 + ,3028 + ,0 + ,4784 + ,0 + ,4975 + ,1 + ,4607 + ,1 + ,6249 + ,1 + ,4809 + ,1 + ,3157 + ,1 + ,1910 + ,1 + ,2228 + ,1 + ,1673 + ,1 + ,2589 + ,1 + ,2332 + ,1 + ,3785 + ,1 + ,4916 + ,1 + ,5207 + ,1 + ,6055 + ,1 + ,5751 + ,1 + ,5247 + ,1 + ,3387 + ,1 + ,2091 + ,1 + ,2401 + ,1 + ,1664 + ,1 + ,2205 + ,1 + ,2295 + ,1 + ,3762 + ,1 + ,4890 + ,1 + ,5117 + ,1 + ,6099 + ,1 + ,5865 + ,1 + ,5594 + ,1 + ,3229 + ,1 + ,2106 + ,1 + ,2410 + ,1 + ,1583 + ,1 + ,2092 + ,1 + ,2612 + ,1 + ,3665 + ,1 + ,4880 + ,1 + ,5875 + ,1 + ,5892 + ,1 + ,6078 + ,1 + ,6515 + ,1 + ,3164 + ,1 + ,2028 + ,1 + ,2677 + ,1 + ,1580 + ,1 + ,2196 + ,1 + ,2838 + ,1 + ,3087 + ,1 + ,4726 + ,1 + ,6521 + ,1 + ,6739 + ,1 + ,5943 + ,1 + ,6265 + ,1 + ,3323 + ,1 + ,2098 + ,1 + ,2544 + ,1 + ,1442 + ,1 + ,2307 + ,1 + ,2811 + ,1 + ,3461 + ,1 + ,5451 + ,1 + ,5481 + ,1 + ,5114 + ,1 + ,8381 + ,1 + ,5215 + ,1 + ,3700 + ,1 + ,2122 + ,1 + ,2311 + ,1 + ,1515 + ,1 + ,2351 + ,1 + ,2289 + ,1 + ,3380 + ,1 + ,5398 + ,1 + ,5242 + ,1 + ,5162 + ,1 + ,6391 + ,1 + ,5958 + ,1 + ,3727 + ,1 + ,1883 + ,1 + ,2191 + ,1) + ,dim=c(2 + ,156) + ,dimnames=list(c('Aantalhuwelijken' + ,'Dummy') + ,1:156)) > y <- array(NA,dim=c(2,156),dimnames=list(c('Aantalhuwelijken','Dummy'),1:156)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = '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 Aantalhuwelijken Dummy M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 1567 0 1 0 0 0 0 0 0 0 0 0 0 2 2237 0 0 1 0 0 0 0 0 0 0 0 0 3 2598 0 0 0 1 0 0 0 0 0 0 0 0 4 3729 0 0 0 0 1 0 0 0 0 0 0 0 5 5715 0 0 0 0 0 1 0 0 0 0 0 0 6 5776 0 0 0 0 0 0 1 0 0 0 0 0 7 5852 0 0 0 0 0 0 0 1 0 0 0 0 8 6878 0 0 0 0 0 0 0 0 1 0 0 0 9 5488 0 0 0 0 0 0 0 0 0 1 0 0 10 3583 0 0 0 0 0 0 0 0 0 0 1 0 11 2054 0 0 0 0 0 0 0 0 0 0 0 1 12 2282 0 0 0 0 0 0 0 0 0 0 0 0 13 1552 0 1 0 0 0 0 0 0 0 0 0 0 14 2261 0 0 1 0 0 0 0 0 0 0 0 0 15 2446 0 0 0 1 0 0 0 0 0 0 0 0 16 3519 0 0 0 0 1 0 0 0 0 0 0 0 17 5161 0 0 0 0 0 1 0 0 0 0 0 0 18 5085 0 0 0 0 0 0 1 0 0 0 0 0 19 5711 0 0 0 0 0 0 0 1 0 0 0 0 20 6057 0 0 0 0 0 0 0 0 1 0 0 0 21 5224 0 0 0 0 0 0 0 0 0 1 0 0 22 3363 0 0 0 0 0 0 0 0 0 0 1 0 23 1899 0 0 0 0 0 0 0 0 0 0 0 1 24 2115 0 0 0 0 0 0 0 0 0 0 0 0 25 1491 0 1 0 0 0 0 0 0 0 0 0 0 26 2061 0 0 1 0 0 0 0 0 0 0 0 0 27 2419 0 0 0 1 0 0 0 0 0 0 0 0 28 3430 0 0 0 0 1 0 0 0 0 0 0 0 29 4778 0 0 0 0 0 1 0 0 0 0 0 0 30 4862 0 0 0 0 0 0 1 0 0 0 0 0 31 6176 0 0 0 0 0 0 0 1 0 0 0 0 32 5664 0 0 0 0 0 0 0 0 1 0 0 0 33 5529 0 0 0 0 0 0 0 0 0 1 0 0 34 3418 0 0 0 0 0 0 0 0 0 0 1 0 35 1941 0 0 0 0 0 0 0 0 0 0 0 1 36 2402 0 0 0 0 0 0 0 0 0 0 0 0 37 1579 0 1 0 0 0 0 0 0 0 0 0 0 38 2146 0 0 1 0 0 0 0 0 0 0 0 0 39 2462 0 0 0 1 0 0 0 0 0 0 0 0 40 3695 0 0 0 0 1 0 0 0 0 0 0 0 41 4831 0 0 0 0 0 1 0 0 0 0 0 0 42 5134 0 0 0 0 0 0 1 0 0 0 0 0 43 6250 0 0 0 0 0 0 0 1 0 0 0 0 44 5760 0 0 0 0 0 0 0 0 1 0 0 0 45 6249 0 0 0 0 0 0 0 0 0 1 0 0 46 2917 0 0 0 0 0 0 0 0 0 0 1 0 47 1741 0 0 0 0 0 0 0 0 0 0 0 1 48 2359 0 0 0 0 0 0 0 0 0 0 0 0 49 1511 0 1 0 0 0 0 0 0 0 0 0 0 50 2059 0 0 1 0 0 0 0 0 0 0 0 0 51 2635 0 0 0 1 0 0 0 0 0 0 0 0 52 2867 0 0 0 0 1 0 0 0 0 0 0 0 53 4403 0 0 0 0 0 1 0 0 0 0 0 0 54 5720 0 0 0 0 0 0 1 0 0 0 0 0 55 4502 0 0 0 0 0 0 0 1 0 0 0 0 56 5749 0 0 0 0 0 0 0 0 1 0 0 0 57 5627 0 0 0 0 0 0 0 0 0 1 0 0 58 2846 0 0 0 0 0 0 0 0 0 0 1 0 59 1762 0 0 0 0 0 0 0 0 0 0 0 1 60 2429 0 0 0 0 0 0 0 0 0 0 0 0 61 1169 0 1 0 0 0 0 0 0 0 0 0 0 62 2154 0 0 1 0 0 0 0 0 0 0 0 0 63 2249 0 0 0 1 0 0 0 0 0 0 0 0 64 2687 0 0 0 0 1 0 0 0 0 0 0 0 65 4359 0 0 0 0 0 1 0 0 0 0 0 0 66 5382 0 0 0 0 0 0 1 0 0 0 0 0 67 4459 0 0 0 0 0 0 0 1 0 0 0 0 68 6398 0 0 0 0 0 0 0 0 1 0 0 0 69 4596 0 0 0 0 0 0 0 0 0 1 0 0 70 3024 0 0 0 0 0 0 0 0 0 0 1 0 71 1887 0 0 0 0 0 0 0 0 0 0 0 1 72 2070 0 0 0 0 0 0 0 0 0 0 0 0 73 1351 0 1 0 0 0 0 0 0 0 0 0 0 74 2218 0 0 1 0 0 0 0 0 0 0 0 0 75 2461 0 0 0 1 0 0 0 0 0 0 0 0 76 3028 0 0 0 0 1 0 0 0 0 0 0 0 77 4784 0 0 0 0 0 1 0 0 0 0 0 0 78 4975 1 0 0 0 0 0 1 0 0 0 0 0 79 4607 1 0 0 0 0 0 0 1 0 0 0 0 80 6249 1 0 0 0 0 0 0 0 1 0 0 0 81 4809 1 0 0 0 0 0 0 0 0 1 0 0 82 3157 1 0 0 0 0 0 0 0 0 0 1 0 83 1910 1 0 0 0 0 0 0 0 0 0 0 1 84 2228 1 0 0 0 0 0 0 0 0 0 0 0 85 1673 1 1 0 0 0 0 0 0 0 0 0 0 86 2589 1 0 1 0 0 0 0 0 0 0 0 0 87 2332 1 0 0 1 0 0 0 0 0 0 0 0 88 3785 1 0 0 0 1 0 0 0 0 0 0 0 89 4916 1 0 0 0 0 1 0 0 0 0 0 0 90 5207 1 0 0 0 0 0 1 0 0 0 0 0 91 6055 1 0 0 0 0 0 0 1 0 0 0 0 92 5751 1 0 0 0 0 0 0 0 1 0 0 0 93 5247 1 0 0 0 0 0 0 0 0 1 0 0 94 3387 1 0 0 0 0 0 0 0 0 0 1 0 95 2091 1 0 0 0 0 0 0 0 0 0 0 1 96 2401 1 0 0 0 0 0 0 0 0 0 0 0 97 1664 1 1 0 0 0 0 0 0 0 0 0 0 98 2205 1 0 1 0 0 0 0 0 0 0 0 0 99 2295 1 0 0 1 0 0 0 0 0 0 0 0 100 3762 1 0 0 0 1 0 0 0 0 0 0 0 101 4890 1 0 0 0 0 1 0 0 0 0 0 0 102 5117 1 0 0 0 0 0 1 0 0 0 0 0 103 6099 1 0 0 0 0 0 0 1 0 0 0 0 104 5865 1 0 0 0 0 0 0 0 1 0 0 0 105 5594 1 0 0 0 0 0 0 0 0 1 0 0 106 3229 1 0 0 0 0 0 0 0 0 0 1 0 107 2106 1 0 0 0 0 0 0 0 0 0 0 1 108 2410 1 0 0 0 0 0 0 0 0 0 0 0 109 1583 1 1 0 0 0 0 0 0 0 0 0 0 110 2092 1 0 1 0 0 0 0 0 0 0 0 0 111 2612 1 0 0 1 0 0 0 0 0 0 0 0 112 3665 1 0 0 0 1 0 0 0 0 0 0 0 113 4880 1 0 0 0 0 1 0 0 0 0 0 0 114 5875 1 0 0 0 0 0 1 0 0 0 0 0 115 5892 1 0 0 0 0 0 0 1 0 0 0 0 116 6078 1 0 0 0 0 0 0 0 1 0 0 0 117 6515 1 0 0 0 0 0 0 0 0 1 0 0 118 3164 1 0 0 0 0 0 0 0 0 0 1 0 119 2028 1 0 0 0 0 0 0 0 0 0 0 1 120 2677 1 0 0 0 0 0 0 0 0 0 0 0 121 1580 1 1 0 0 0 0 0 0 0 0 0 0 122 2196 1 0 1 0 0 0 0 0 0 0 0 0 123 2838 1 0 0 1 0 0 0 0 0 0 0 0 124 3087 1 0 0 0 1 0 0 0 0 0 0 0 125 4726 1 0 0 0 0 1 0 0 0 0 0 0 126 6521 1 0 0 0 0 0 1 0 0 0 0 0 127 6739 1 0 0 0 0 0 0 1 0 0 0 0 128 5943 1 0 0 0 0 0 0 0 1 0 0 0 129 6265 1 0 0 0 0 0 0 0 0 1 0 0 130 3323 1 0 0 0 0 0 0 0 0 0 1 0 131 2098 1 0 0 0 0 0 0 0 0 0 0 1 132 2544 1 0 0 0 0 0 0 0 0 0 0 0 133 1442 1 1 0 0 0 0 0 0 0 0 0 0 134 2307 1 0 1 0 0 0 0 0 0 0 0 0 135 2811 1 0 0 1 0 0 0 0 0 0 0 0 136 3461 1 0 0 0 1 0 0 0 0 0 0 0 137 5451 1 0 0 0 0 1 0 0 0 0 0 0 138 5481 1 0 0 0 0 0 1 0 0 0 0 0 139 5114 1 0 0 0 0 0 0 1 0 0 0 0 140 8381 1 0 0 0 0 0 0 0 1 0 0 0 141 5215 1 0 0 0 0 0 0 0 0 1 0 0 142 3700 1 0 0 0 0 0 0 0 0 0 1 0 143 2122 1 0 0 0 0 0 0 0 0 0 0 1 144 2311 1 0 0 0 0 0 0 0 0 0 0 0 145 1515 1 1 0 0 0 0 0 0 0 0 0 0 146 2351 1 0 1 0 0 0 0 0 0 0 0 0 147 2289 1 0 0 1 0 0 0 0 0 0 0 0 148 3380 1 0 0 0 1 0 0 0 0 0 0 0 149 5398 1 0 0 0 0 1 0 0 0 0 0 0 150 5242 1 0 0 0 0 0 1 0 0 0 0 0 151 5162 1 0 0 0 0 0 0 1 0 0 0 0 152 6391 1 0 0 0 0 0 0 0 1 0 0 0 153 5958 1 0 0 0 0 0 0 0 0 1 0 0 154 3727 1 0 0 0 0 0 0 0 0 0 1 0 155 1883 1 0 0 0 0 0 0 0 0 0 0 1 156 2191 1 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) Dummy M1 M2 M3 M4 2248.7 169.5 -813.3 -105.7 169.0 1065.0 M5 M6 M7 M8 M9 M10 2618.7 3073.7 3246.1 3903.5 3222.8 955.3 M11 -376.7 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1057.221 -211.201 -2.095 180.706 2059.395 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2248.67 119.13 18.875 < 2e-16 *** Dummy 169.48 65.86 2.573 0.0111 * M1 -813.27 160.92 -5.054 1.30e-06 *** M2 -105.66 160.92 -0.657 0.5125 M3 169.04 160.92 1.050 0.2953 M4 1065.04 160.92 6.618 6.79e-10 *** M5 2618.65 160.92 16.273 < 2e-16 *** M6 3073.69 160.84 19.110 < 2e-16 *** M7 3246.08 160.84 20.181 < 2e-16 *** M8 3903.46 160.84 24.269 < 2e-16 *** M9 3222.85 160.84 20.037 < 2e-16 *** M10 955.31 160.84 5.939 2.08e-08 *** M11 -376.69 160.84 -2.342 0.0206 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 410.1 on 143 degrees of freedom Multiple R-squared: 0.9447, Adjusted R-squared: 0.94 F-statistic: 203.5 on 12 and 143 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.0224569505 0.0449139010 0.9775430 [2,] 0.1065022789 0.2130045578 0.8934977 [3,] 0.2222030305 0.4444060609 0.7777970 [4,] 0.1371154858 0.2742309716 0.8628845 [5,] 0.2752898656 0.5505797312 0.7247101 [6,] 0.2062752667 0.4125505333 0.7937247 [7,] 0.1474280286 0.2948560571 0.8525720 [8,] 0.0981135055 0.1962270110 0.9018865 [9,] 0.0638768715 0.1277537430 0.9361231 [10,] 0.0386495282 0.0772990564 0.9613505 [11,] 0.0249574326 0.0499148652 0.9750426 [12,] 0.0145529323 0.0291058647 0.9854471 [13,] 0.0092722255 0.0185444510 0.9907278 [14,] 0.0216401029 0.0432802058 0.9783599 [15,] 0.0313961966 0.0627923931 0.9686038 [16,] 0.0336300899 0.0672601798 0.9663699 [17,] 0.0784795783 0.1569591566 0.9215204 [18,] 0.0572864467 0.1145728933 0.9427136 [19,] 0.0403288842 0.0806577683 0.9596711 [20,] 0.0270739132 0.0541478265 0.9729261 [21,] 0.0194985657 0.0389971315 0.9805014 [22,] 0.0128113215 0.0256226431 0.9871887 [23,] 0.0080917289 0.0161834578 0.9919083 [24,] 0.0050154641 0.0100309283 0.9949845 [25,] 0.0036214175 0.0072428350 0.9963786 [26,] 0.0034147910 0.0068295820 0.9965852 [27,] 0.0021294519 0.0042589039 0.9978705 [28,] 0.0029306025 0.0058612049 0.9970694 [29,] 0.0032118541 0.0064237081 0.9967881 [30,] 0.0157331340 0.0314662679 0.9842669 [31,] 0.0186825385 0.0373650770 0.9813175 [32,] 0.0140470475 0.0280940950 0.9859530 [33,] 0.0099688875 0.0199377750 0.9900311 [34,] 0.0069084799 0.0138169599 0.9930915 [35,] 0.0046865200 0.0093730401 0.9953135 [36,] 0.0035218134 0.0070436267 0.9964782 [37,] 0.0075273912 0.0150547824 0.9924726 [38,] 0.0137316777 0.0274633554 0.9862683 [39,] 0.0171306558 0.0342613116 0.9828693 [40,] 0.1772051004 0.3544102007 0.8227949 [41,] 0.1620343537 0.3240687074 0.8379656 [42,] 0.1389969782 0.2779939563 0.8610030 [43,] 0.1342464957 0.2684929913 0.8657535 [44,] 0.1095886885 0.2191773770 0.8904113 [45,] 0.0938261172 0.1876522344 0.9061739 [46,] 0.0833960498 0.1667920997 0.9166040 [47,] 0.0662238125 0.1324476250 0.9337762 [48,] 0.0546876815 0.1093753631 0.9453123 [49,] 0.0772552404 0.1545104808 0.9227448 [50,] 0.0868224411 0.1736448821 0.9131776 [51,] 0.0704234310 0.1408468620 0.9295766 [52,] 0.2087344327 0.4174688653 0.7912656 [53,] 0.1952173486 0.3904346971 0.8047827 [54,] 0.3204126356 0.6408252712 0.6795874 [55,] 0.2825581579 0.5651163159 0.7174418 [56,] 0.2421041458 0.4842082917 0.7578959 [57,] 0.2111273808 0.4222547617 0.7888726 [58,] 0.1780995279 0.3561990558 0.8219005 [59,] 0.1492955318 0.2985910636 0.8507045 [60,] 0.1251313391 0.2502626782 0.8748687 [61,] 0.1078054458 0.2156108916 0.8921946 [62,] 0.0868013450 0.1736026901 0.9131987 [63,] 0.0809904816 0.1619809631 0.9190095 [64,] 0.1408376321 0.2816752642 0.8591624 [65,] 0.1455549743 0.2911099486 0.8544450 [66,] 0.1890917433 0.3781834867 0.8109083 [67,] 0.1725435049 0.3450870098 0.8274565 [68,] 0.1530551141 0.3061102282 0.8469449 [69,] 0.1310918457 0.2621836915 0.8689082 [70,] 0.1190280719 0.2380561437 0.8809719 [71,] 0.1235825554 0.2471651107 0.8764174 [72,] 0.1027349461 0.2054698922 0.8972651 [73,] 0.1057893195 0.2115786389 0.8942107 [74,] 0.0863050845 0.1726101689 0.9136949 [75,] 0.0760798249 0.1521596498 0.9239202 [76,] 0.0834322857 0.1668645713 0.9165677 [77,] 0.0989452588 0.1978905175 0.9010547 [78,] 0.1016657067 0.2033314134 0.8983343 [79,] 0.0832028498 0.1664056996 0.9167972 [80,] 0.0672631584 0.1345263168 0.9327368 [81,] 0.0527752000 0.1055504001 0.9472248 [82,] 0.0416493575 0.0832987149 0.9583506 [83,] 0.0314420113 0.0628840227 0.9685580 [84,] 0.0258712307 0.0517424614 0.9741288 [85,] 0.0236637712 0.0473275424 0.9763362 [86,] 0.0179790738 0.0359581475 0.9820209 [87,] 0.0188000305 0.0376000609 0.9812000 [88,] 0.0200459751 0.0400919501 0.9799540 [89,] 0.0263997661 0.0527995322 0.9736002 [90,] 0.0226950635 0.0453901270 0.9773049 [91,] 0.0173178299 0.0346356599 0.9826822 [92,] 0.0126399173 0.0252798346 0.9873601 [93,] 0.0089096082 0.0178192163 0.9910904 [94,] 0.0061621136 0.0123242272 0.9938379 [95,] 0.0043901874 0.0087803748 0.9956098 [96,] 0.0029681827 0.0059363654 0.9970318 [97,] 0.0023128749 0.0046257498 0.9976871 [98,] 0.0016485502 0.0032971005 0.9983514 [99,] 0.0014292738 0.0028585476 0.9985707 [100,] 0.0010330318 0.0020660635 0.9989670 [101,] 0.0013925321 0.0027850642 0.9986075 [102,] 0.0037368572 0.0074737143 0.9962631 [103,] 0.0029305103 0.0058610206 0.9970695 [104,] 0.0018445649 0.0036891298 0.9981554 [105,] 0.0013853021 0.0027706043 0.9986147 [106,] 0.0008437173 0.0016874345 0.9991563 [107,] 0.0005070346 0.0010140693 0.9994930 [108,] 0.0003462382 0.0006924764 0.9996538 [109,] 0.0002521449 0.0005042899 0.9997479 [110,] 0.0002620008 0.0005240016 0.9997380 [111,] 0.0018980026 0.0037960053 0.9981020 [112,] 0.0366053906 0.0732107812 0.9633946 [113,] 0.1974105329 0.3948210658 0.8025895 [114,] 0.2483639820 0.4967279641 0.7516360 [115,] 0.2183279801 0.4366559602 0.7816720 [116,] 0.1641947212 0.3283894423 0.8358053 [117,] 0.1293143989 0.2586287979 0.8706856 [118,] 0.0898303695 0.1796607390 0.9101696 [119,] 0.0586223927 0.1172447854 0.9413776 [120,] 0.0486693741 0.0973387482 0.9513306 [121,] 0.0287124703 0.0574249406 0.9712875 [122,] 0.0167220245 0.0334440491 0.9832780 [123,] 0.0088592227 0.0177184453 0.9911408 [124,] 0.0044266697 0.0088533395 0.9955733 [125,] 0.6290763302 0.7418473396 0.3709237 > postscript(file="/var/www/html/rcomp/tmp/1seln1293625695.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/23nk81293625695.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/33nk81293625695.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/43nk81293625695.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/5ee1s1293625695.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 156 Frequency = 1 1 2 3 4 5 6 131.605311 93.989927 180.297619 415.297619 847.682234 453.642094 7 8 9 10 11 12 357.257479 725.872863 16.488248 379.026709 182.026709 33.334402 13 14 15 16 17 18 116.605311 117.989927 28.297619 205.297619 293.682234 -237.357906 19 20 21 22 23 24 216.257479 -95.127137 -247.511752 159.026709 27.026709 -133.665598 25 26 27 28 29 30 55.605311 -82.010073 1.297619 116.297619 -89.317766 -460.357906 31 32 33 34 35 36 681.257479 -488.127137 57.488248 214.026709 69.026709 153.334402 37 38 39 40 41 42 143.605311 2.989927 44.297619 381.297619 -36.317766 -188.357906 43 44 45 46 47 48 755.257479 -392.127137 777.488248 -286.973291 -130.973291 110.334402 49 50 51 52 53 54 75.605311 -84.010073 217.297619 -446.702381 -464.317766 397.642094 55 56 57 58 59 60 -992.742521 -403.127137 155.488248 -357.973291 -109.973291 180.334402 61 62 63 64 65 66 -266.394689 10.989927 -168.702381 -626.702381 -508.317766 59.642094 67 68 69 70 71 72 -1035.742521 245.872863 -875.511752 -179.973291 15.026709 -178.665598 73 74 75 76 77 78 -84.394689 74.989927 43.297619 -285.702381 -83.317766 -516.836081 79 80 81 82 83 84 -1057.220696 -72.605311 -831.989927 -216.451465 -131.451465 -190.143773 85 86 87 88 89 90 68.127137 276.511752 -255.180556 301.819444 -120.795940 -284.836081 91 92 93 94 95 96 390.779304 -570.605311 -393.989927 13.548535 49.548535 -17.143773 97 98 99 100 101 102 59.127137 -107.488248 -292.180556 278.819444 -146.795940 -374.836081 103 104 105 106 107 108 434.779304 -456.605311 -46.989927 -144.451465 64.548535 -8.143773 109 110 111 112 113 114 -21.872863 -220.488248 24.819444 181.819444 -156.795940 383.163919 115 116 117 118 119 120 227.779304 -243.605311 874.010073 -209.451465 -13.451465 258.856227 121 122 123 124 125 126 -24.872863 -116.488248 250.819444 -396.180556 -310.795940 1029.163919 127 128 129 130 131 132 1074.779304 -378.605311 624.010073 -50.451465 56.548535 125.856227 133 134 135 136 137 138 -162.872863 -5.488248 223.819444 -22.180556 414.204060 -10.836081 139 140 141 142 143 144 -550.220696 2059.394689 -425.989927 326.548535 80.548535 -107.143773 145 146 147 148 149 150 -89.872863 38.511752 -298.180556 -103.180556 361.204060 -249.836081 151 152 153 154 155 156 -502.220696 69.394689 317.010073 353.548535 -158.451465 -227.143773 > postscript(file="/var/www/html/rcomp/tmp/6ee1s1293625695.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 131.605311 NA 1 93.989927 131.605311 2 180.297619 93.989927 3 415.297619 180.297619 4 847.682234 415.297619 5 453.642094 847.682234 6 357.257479 453.642094 7 725.872863 357.257479 8 16.488248 725.872863 9 379.026709 16.488248 10 182.026709 379.026709 11 33.334402 182.026709 12 116.605311 33.334402 13 117.989927 116.605311 14 28.297619 117.989927 15 205.297619 28.297619 16 293.682234 205.297619 17 -237.357906 293.682234 18 216.257479 -237.357906 19 -95.127137 216.257479 20 -247.511752 -95.127137 21 159.026709 -247.511752 22 27.026709 159.026709 23 -133.665598 27.026709 24 55.605311 -133.665598 25 -82.010073 55.605311 26 1.297619 -82.010073 27 116.297619 1.297619 28 -89.317766 116.297619 29 -460.357906 -89.317766 30 681.257479 -460.357906 31 -488.127137 681.257479 32 57.488248 -488.127137 33 214.026709 57.488248 34 69.026709 214.026709 35 153.334402 69.026709 36 143.605311 153.334402 37 2.989927 143.605311 38 44.297619 2.989927 39 381.297619 44.297619 40 -36.317766 381.297619 41 -188.357906 -36.317766 42 755.257479 -188.357906 43 -392.127137 755.257479 44 777.488248 -392.127137 45 -286.973291 777.488248 46 -130.973291 -286.973291 47 110.334402 -130.973291 48 75.605311 110.334402 49 -84.010073 75.605311 50 217.297619 -84.010073 51 -446.702381 217.297619 52 -464.317766 -446.702381 53 397.642094 -464.317766 54 -992.742521 397.642094 55 -403.127137 -992.742521 56 155.488248 -403.127137 57 -357.973291 155.488248 58 -109.973291 -357.973291 59 180.334402 -109.973291 60 -266.394689 180.334402 61 10.989927 -266.394689 62 -168.702381 10.989927 63 -626.702381 -168.702381 64 -508.317766 -626.702381 65 59.642094 -508.317766 66 -1035.742521 59.642094 67 245.872863 -1035.742521 68 -875.511752 245.872863 69 -179.973291 -875.511752 70 15.026709 -179.973291 71 -178.665598 15.026709 72 -84.394689 -178.665598 73 74.989927 -84.394689 74 43.297619 74.989927 75 -285.702381 43.297619 76 -83.317766 -285.702381 77 -516.836081 -83.317766 78 -1057.220696 -516.836081 79 -72.605311 -1057.220696 80 -831.989927 -72.605311 81 -216.451465 -831.989927 82 -131.451465 -216.451465 83 -190.143773 -131.451465 84 68.127137 -190.143773 85 276.511752 68.127137 86 -255.180556 276.511752 87 301.819444 -255.180556 88 -120.795940 301.819444 89 -284.836081 -120.795940 90 390.779304 -284.836081 91 -570.605311 390.779304 92 -393.989927 -570.605311 93 13.548535 -393.989927 94 49.548535 13.548535 95 -17.143773 49.548535 96 59.127137 -17.143773 97 -107.488248 59.127137 98 -292.180556 -107.488248 99 278.819444 -292.180556 100 -146.795940 278.819444 101 -374.836081 -146.795940 102 434.779304 -374.836081 103 -456.605311 434.779304 104 -46.989927 -456.605311 105 -144.451465 -46.989927 106 64.548535 -144.451465 107 -8.143773 64.548535 108 -21.872863 -8.143773 109 -220.488248 -21.872863 110 24.819444 -220.488248 111 181.819444 24.819444 112 -156.795940 181.819444 113 383.163919 -156.795940 114 227.779304 383.163919 115 -243.605311 227.779304 116 874.010073 -243.605311 117 -209.451465 874.010073 118 -13.451465 -209.451465 119 258.856227 -13.451465 120 -24.872863 258.856227 121 -116.488248 -24.872863 122 250.819444 -116.488248 123 -396.180556 250.819444 124 -310.795940 -396.180556 125 1029.163919 -310.795940 126 1074.779304 1029.163919 127 -378.605311 1074.779304 128 624.010073 -378.605311 129 -50.451465 624.010073 130 56.548535 -50.451465 131 125.856227 56.548535 132 -162.872863 125.856227 133 -5.488248 -162.872863 134 223.819444 -5.488248 135 -22.180556 223.819444 136 414.204060 -22.180556 137 -10.836081 414.204060 138 -550.220696 -10.836081 139 2059.394689 -550.220696 140 -425.989927 2059.394689 141 326.548535 -425.989927 142 80.548535 326.548535 143 -107.143773 80.548535 144 -89.872863 -107.143773 145 38.511752 -89.872863 146 -298.180556 38.511752 147 -103.180556 -298.180556 148 361.204060 -103.180556 149 -249.836081 361.204060 150 -502.220696 -249.836081 151 69.394689 -502.220696 152 317.010073 69.394689 153 353.548535 317.010073 154 -158.451465 353.548535 155 -227.143773 -158.451465 156 NA -227.143773 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 93.989927 131.605311 [2,] 180.297619 93.989927 [3,] 415.297619 180.297619 [4,] 847.682234 415.297619 [5,] 453.642094 847.682234 [6,] 357.257479 453.642094 [7,] 725.872863 357.257479 [8,] 16.488248 725.872863 [9,] 379.026709 16.488248 [10,] 182.026709 379.026709 [11,] 33.334402 182.026709 [12,] 116.605311 33.334402 [13,] 117.989927 116.605311 [14,] 28.297619 117.989927 [15,] 205.297619 28.297619 [16,] 293.682234 205.297619 [17,] -237.357906 293.682234 [18,] 216.257479 -237.357906 [19,] -95.127137 216.257479 [20,] -247.511752 -95.127137 [21,] 159.026709 -247.511752 [22,] 27.026709 159.026709 [23,] -133.665598 27.026709 [24,] 55.605311 -133.665598 [25,] -82.010073 55.605311 [26,] 1.297619 -82.010073 [27,] 116.297619 1.297619 [28,] -89.317766 116.297619 [29,] -460.357906 -89.317766 [30,] 681.257479 -460.357906 [31,] -488.127137 681.257479 [32,] 57.488248 -488.127137 [33,] 214.026709 57.488248 [34,] 69.026709 214.026709 [35,] 153.334402 69.026709 [36,] 143.605311 153.334402 [37,] 2.989927 143.605311 [38,] 44.297619 2.989927 [39,] 381.297619 44.297619 [40,] -36.317766 381.297619 [41,] -188.357906 -36.317766 [42,] 755.257479 -188.357906 [43,] -392.127137 755.257479 [44,] 777.488248 -392.127137 [45,] -286.973291 777.488248 [46,] -130.973291 -286.973291 [47,] 110.334402 -130.973291 [48,] 75.605311 110.334402 [49,] -84.010073 75.605311 [50,] 217.297619 -84.010073 [51,] -446.702381 217.297619 [52,] -464.317766 -446.702381 [53,] 397.642094 -464.317766 [54,] -992.742521 397.642094 [55,] -403.127137 -992.742521 [56,] 155.488248 -403.127137 [57,] -357.973291 155.488248 [58,] -109.973291 -357.973291 [59,] 180.334402 -109.973291 [60,] -266.394689 180.334402 [61,] 10.989927 -266.394689 [62,] -168.702381 10.989927 [63,] -626.702381 -168.702381 [64,] -508.317766 -626.702381 [65,] 59.642094 -508.317766 [66,] -1035.742521 59.642094 [67,] 245.872863 -1035.742521 [68,] -875.511752 245.872863 [69,] -179.973291 -875.511752 [70,] 15.026709 -179.973291 [71,] -178.665598 15.026709 [72,] -84.394689 -178.665598 [73,] 74.989927 -84.394689 [74,] 43.297619 74.989927 [75,] -285.702381 43.297619 [76,] -83.317766 -285.702381 [77,] -516.836081 -83.317766 [78,] -1057.220696 -516.836081 [79,] -72.605311 -1057.220696 [80,] -831.989927 -72.605311 [81,] -216.451465 -831.989927 [82,] -131.451465 -216.451465 [83,] -190.143773 -131.451465 [84,] 68.127137 -190.143773 [85,] 276.511752 68.127137 [86,] -255.180556 276.511752 [87,] 301.819444 -255.180556 [88,] -120.795940 301.819444 [89,] -284.836081 -120.795940 [90,] 390.779304 -284.836081 [91,] -570.605311 390.779304 [92,] -393.989927 -570.605311 [93,] 13.548535 -393.989927 [94,] 49.548535 13.548535 [95,] -17.143773 49.548535 [96,] 59.127137 -17.143773 [97,] -107.488248 59.127137 [98,] -292.180556 -107.488248 [99,] 278.819444 -292.180556 [100,] -146.795940 278.819444 [101,] -374.836081 -146.795940 [102,] 434.779304 -374.836081 [103,] -456.605311 434.779304 [104,] -46.989927 -456.605311 [105,] -144.451465 -46.989927 [106,] 64.548535 -144.451465 [107,] -8.143773 64.548535 [108,] -21.872863 -8.143773 [109,] -220.488248 -21.872863 [110,] 24.819444 -220.488248 [111,] 181.819444 24.819444 [112,] -156.795940 181.819444 [113,] 383.163919 -156.795940 [114,] 227.779304 383.163919 [115,] -243.605311 227.779304 [116,] 874.010073 -243.605311 [117,] -209.451465 874.010073 [118,] -13.451465 -209.451465 [119,] 258.856227 -13.451465 [120,] -24.872863 258.856227 [121,] -116.488248 -24.872863 [122,] 250.819444 -116.488248 [123,] -396.180556 250.819444 [124,] -310.795940 -396.180556 [125,] 1029.163919 -310.795940 [126,] 1074.779304 1029.163919 [127,] -378.605311 1074.779304 [128,] 624.010073 -378.605311 [129,] -50.451465 624.010073 [130,] 56.548535 -50.451465 [131,] 125.856227 56.548535 [132,] -162.872863 125.856227 [133,] -5.488248 -162.872863 [134,] 223.819444 -5.488248 [135,] -22.180556 223.819444 [136,] 414.204060 -22.180556 [137,] -10.836081 414.204060 [138,] -550.220696 -10.836081 [139,] 2059.394689 -550.220696 [140,] -425.989927 2059.394689 [141,] 326.548535 -425.989927 [142,] 80.548535 326.548535 [143,] -107.143773 80.548535 [144,] -89.872863 -107.143773 [145,] 38.511752 -89.872863 [146,] -298.180556 38.511752 [147,] -103.180556 -298.180556 [148,] 361.204060 -103.180556 [149,] -249.836081 361.204060 [150,] -502.220696 -249.836081 [151,] 69.394689 -502.220696 [152,] 317.010073 69.394689 [153,] 353.548535 317.010073 [154,] -158.451465 353.548535 [155,] -227.143773 -158.451465 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 93.989927 131.605311 2 180.297619 93.989927 3 415.297619 180.297619 4 847.682234 415.297619 5 453.642094 847.682234 6 357.257479 453.642094 7 725.872863 357.257479 8 16.488248 725.872863 9 379.026709 16.488248 10 182.026709 379.026709 11 33.334402 182.026709 12 116.605311 33.334402 13 117.989927 116.605311 14 28.297619 117.989927 15 205.297619 28.297619 16 293.682234 205.297619 17 -237.357906 293.682234 18 216.257479 -237.357906 19 -95.127137 216.257479 20 -247.511752 -95.127137 21 159.026709 -247.511752 22 27.026709 159.026709 23 -133.665598 27.026709 24 55.605311 -133.665598 25 -82.010073 55.605311 26 1.297619 -82.010073 27 116.297619 1.297619 28 -89.317766 116.297619 29 -460.357906 -89.317766 30 681.257479 -460.357906 31 -488.127137 681.257479 32 57.488248 -488.127137 33 214.026709 57.488248 34 69.026709 214.026709 35 153.334402 69.026709 36 143.605311 153.334402 37 2.989927 143.605311 38 44.297619 2.989927 39 381.297619 44.297619 40 -36.317766 381.297619 41 -188.357906 -36.317766 42 755.257479 -188.357906 43 -392.127137 755.257479 44 777.488248 -392.127137 45 -286.973291 777.488248 46 -130.973291 -286.973291 47 110.334402 -130.973291 48 75.605311 110.334402 49 -84.010073 75.605311 50 217.297619 -84.010073 51 -446.702381 217.297619 52 -464.317766 -446.702381 53 397.642094 -464.317766 54 -992.742521 397.642094 55 -403.127137 -992.742521 56 155.488248 -403.127137 57 -357.973291 155.488248 58 -109.973291 -357.973291 59 180.334402 -109.973291 60 -266.394689 180.334402 61 10.989927 -266.394689 62 -168.702381 10.989927 63 -626.702381 -168.702381 64 -508.317766 -626.702381 65 59.642094 -508.317766 66 -1035.742521 59.642094 67 245.872863 -1035.742521 68 -875.511752 245.872863 69 -179.973291 -875.511752 70 15.026709 -179.973291 71 -178.665598 15.026709 72 -84.394689 -178.665598 73 74.989927 -84.394689 74 43.297619 74.989927 75 -285.702381 43.297619 76 -83.317766 -285.702381 77 -516.836081 -83.317766 78 -1057.220696 -516.836081 79 -72.605311 -1057.220696 80 -831.989927 -72.605311 81 -216.451465 -831.989927 82 -131.451465 -216.451465 83 -190.143773 -131.451465 84 68.127137 -190.143773 85 276.511752 68.127137 86 -255.180556 276.511752 87 301.819444 -255.180556 88 -120.795940 301.819444 89 -284.836081 -120.795940 90 390.779304 -284.836081 91 -570.605311 390.779304 92 -393.989927 -570.605311 93 13.548535 -393.989927 94 49.548535 13.548535 95 -17.143773 49.548535 96 59.127137 -17.143773 97 -107.488248 59.127137 98 -292.180556 -107.488248 99 278.819444 -292.180556 100 -146.795940 278.819444 101 -374.836081 -146.795940 102 434.779304 -374.836081 103 -456.605311 434.779304 104 -46.989927 -456.605311 105 -144.451465 -46.989927 106 64.548535 -144.451465 107 -8.143773 64.548535 108 -21.872863 -8.143773 109 -220.488248 -21.872863 110 24.819444 -220.488248 111 181.819444 24.819444 112 -156.795940 181.819444 113 383.163919 -156.795940 114 227.779304 383.163919 115 -243.605311 227.779304 116 874.010073 -243.605311 117 -209.451465 874.010073 118 -13.451465 -209.451465 119 258.856227 -13.451465 120 -24.872863 258.856227 121 -116.488248 -24.872863 122 250.819444 -116.488248 123 -396.180556 250.819444 124 -310.795940 -396.180556 125 1029.163919 -310.795940 126 1074.779304 1029.163919 127 -378.605311 1074.779304 128 624.010073 -378.605311 129 -50.451465 624.010073 130 56.548535 -50.451465 131 125.856227 56.548535 132 -162.872863 125.856227 133 -5.488248 -162.872863 134 223.819444 -5.488248 135 -22.180556 223.819444 136 414.204060 -22.180556 137 -10.836081 414.204060 138 -550.220696 -10.836081 139 2059.394689 -550.220696 140 -425.989927 2059.394689 141 326.548535 -425.989927 142 80.548535 326.548535 143 -107.143773 80.548535 144 -89.872863 -107.143773 145 38.511752 -89.872863 146 -298.180556 38.511752 147 -103.180556 -298.180556 148 361.204060 -103.180556 149 -249.836081 361.204060 150 -502.220696 -249.836081 151 69.394689 -502.220696 152 317.010073 69.394689 153 353.548535 317.010073 154 -158.451465 353.548535 155 -227.143773 -158.451465 > 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/776je1293625695.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/876je1293625695.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/9hfiy1293625695.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/www/html/rcomp/tmp/10hfiy1293625695.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/11lyz41293625695.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/126yfa1293625695.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/13k8d11293625695.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/14n8b71293625695.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/159rsv1293625695.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/16ca811293625695.tab") + } > > try(system("convert tmp/1seln1293625695.ps tmp/1seln1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/23nk81293625695.ps tmp/23nk81293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/33nk81293625695.ps tmp/33nk81293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/43nk81293625695.ps tmp/43nk81293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/5ee1s1293625695.ps tmp/5ee1s1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/6ee1s1293625695.ps tmp/6ee1s1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/776je1293625695.ps tmp/776je1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/876je1293625695.ps tmp/876je1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/9hfiy1293625695.ps tmp/9hfiy1293625695.png",intern=TRUE)) character(0) > try(system("convert tmp/10hfiy1293625695.ps tmp/10hfiy1293625695.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.018 1.771 8.737