R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(5.5 + ,6 + ,5.33 + ,12 + ,3.5 + ,4 + ,5.56 + ,11 + ,8.5 + ,4 + ,3.78 + ,14 + ,5 + ,4 + ,4.00 + ,12 + ,6 + ,4.5 + ,4.00 + ,21 + ,6 + ,3.5 + ,3.56 + ,12 + ,5.5 + ,2 + ,4.44 + ,22 + ,5.5 + ,5.5 + ,3.56 + ,11 + ,6 + ,3.5 + ,4.00 + ,10 + ,6.5 + ,3.5 + ,3.78 + ,13 + ,7 + ,6 + ,5.11 + ,10 + ,8 + ,5 + ,6.67 + ,8 + ,5.5 + ,5 + ,5.11 + ,15 + ,5 + ,4 + ,4.00 + ,14 + ,5.5 + ,4 + ,3.33 + ,10 + ,7.5 + ,2 + ,2.67 + ,14 + ,4.5 + ,4.5 + ,4.67 + ,14 + ,5.5 + ,4 + ,3.33 + ,11 + ,8.5 + ,3.5 + ,4.44 + ,10 + ,8.5 + ,5.5 + ,6.89 + ,13 + ,5.5 + ,4.5 + ,6.00 + ,7 + ,9 + ,5.5 + ,7.56 + ,14 + ,7 + ,6.5 + ,4.67 + ,12 + ,5 + ,4 + ,6.89 + ,14 + ,5.5 + ,4 + ,4.22 + ,11 + ,7.5 + ,4.5 + ,3.56 + ,9 + ,7.5 + ,3 + ,4.44 + ,11 + ,6.5 + ,4.5 + ,4.67 + ,15 + ,8 + ,4.5 + ,4.89 + ,14 + ,6.5 + ,3 + ,3.78 + ,13 + ,4.5 + ,3 + ,5.33 + ,9 + ,9 + ,8 + ,5.56 + ,15 + ,9 + ,2.5 + ,5.78 + ,10 + ,6 + ,3.5 + ,5.56 + ,11 + ,8.5 + ,4.5 + ,3.78 + ,13 + ,4.5 + ,3 + ,7.11 + ,8 + ,4.5 + ,3 + ,7.33 + ,20 + ,6 + ,2.5 + ,2.89 + ,12 + ,9 + ,6 + ,7.11 + ,10 + ,6 + ,3.5 + ,5.56 + ,10 + ,9 + ,5 + ,6.44 + ,9 + ,7 + ,4.5 + ,4.89 + ,14 + ,7.5 + ,4 + ,4.00 + ,8 + ,8 + ,2.5 + ,3.78 + ,14 + ,5 + ,4 + ,4.44 + ,11 + ,5.5 + ,4 + ,3.33 + ,13 + ,7 + ,5 + ,4.44 + ,9 + ,4.5 + ,3 + ,7.33 + ,11 + ,6 + ,4 + ,6.44 + ,15 + ,8.5 + ,3.5 + ,5.11 + ,11 + ,2.5 + ,2 + ,5.78 + ,10 + ,6 + ,4 + ,4.00 + ,14 + ,6 + ,4 + ,4.44 + ,18 + ,3 + ,2 + ,2.44 + ,14 + ,12 + ,10 + ,6.22 + ,11 + ,6 + ,4 + ,5.78 + ,12 + ,6 + ,4 + ,4.89 + ,13 + ,7 + ,3 + ,3.78 + ,9 + ,3.5 + ,2 + ,2.67 + ,10 + ,6.5 + ,4 + ,3.11 + ,15 + ,6 + ,4.5 + ,3.78 + ,20 + ,6.5 + ,3 + ,4.67 + ,12 + ,7 + ,3.5 + ,4.22 + ,12 + ,4 + ,4.5 + ,4.00 + ,14 + ,5.5 + ,2.5 + ,2.22 + ,13 + ,4.5 + ,2.5 + ,6.44 + ,11 + ,5.5 + ,4 + ,6.89 + ,17 + ,6.5 + ,4 + ,4.22 + ,12 + ,5 + ,3 + ,2.00 + ,13 + ,5.5 + ,4 + ,4.44 + ,14 + ,6 + ,3.5 + ,6.22 + ,13 + ,4.5 + ,3.5 + ,4.22 + ,15 + ,7.5 + ,4.5 + ,6.67 + ,13 + ,9 + ,5.5 + ,6.44 + ,10 + ,7.5 + ,3 + ,5.78 + ,11 + ,6 + ,4 + ,5.11 + ,19 + ,6.5 + ,3 + ,2.89 + ,13 + ,7 + ,4.5 + ,4.67 + ,17 + ,5 + ,4 + ,4.22 + ,13 + ,6.5 + ,3 + ,6.22 + ,9 + ,6.5 + ,5 + ,5.11 + ,11 + ,5.5 + ,4 + ,4.00 + ,10 + ,6.5 + ,4 + ,4.67 + ,9 + ,8 + ,5 + ,4.44 + ,12 + ,4 + ,2.5 + ,5.11 + ,12 + ,8 + ,3.5 + ,4.67 + ,13 + ,5.5 + ,2.5 + ,4.67 + ,13 + ,4.5 + ,4 + ,3.33 + ,12 + ,8 + ,7 + ,6.22 + ,15 + ,6 + ,3.5 + ,4.22 + ,22 + ,7 + ,4 + ,5.78 + ,13 + ,4 + ,3 + ,2.22 + ,15 + ,4.5 + ,2.5 + ,3.56 + ,13 + ,7.5 + ,3 + ,4.89 + ,15 + ,5.5 + ,5 + ,4.22 + ,10 + ,10.5 + ,6 + ,6.89 + ,11 + ,7 + ,4.5 + ,6.89 + ,16 + ,9 + ,6 + ,6.44 + ,11 + ,6 + ,3.5 + ,4.22 + ,11 + ,6.5 + ,4 + ,4.89 + ,10 + ,7.5 + ,5 + ,5.11 + ,10 + ,6 + ,3 + ,3.33 + ,16 + ,9.5 + ,5 + ,4.44 + ,12 + ,7.5 + ,5 + ,4.00 + ,11 + ,5.5 + ,5 + ,5.11 + ,16 + ,5.5 + ,2.5 + ,5.56 + ,19 + ,5 + ,3.5 + ,4.67 + ,11 + ,6.5 + ,5 + ,5.33 + ,16 + ,7.5 + ,5.5 + ,5.56 + ,15 + ,6 + ,3 + ,3.78 + ,24 + ,6 + ,3.5 + ,2.89 + ,14 + ,8 + ,6 + ,6.22 + ,15 + ,4.5 + ,5.5 + ,4.67 + ,11 + ,9 + ,5.5 + ,5.56 + ,15 + ,4 + ,5.5 + ,2.00 + ,12 + ,6.5 + ,2.5 + ,3.56 + ,10 + ,8.5 + ,4 + ,4.22 + ,14 + ,4.5 + ,3 + ,3.78 + ,13 + ,7.5 + ,4.5 + ,5.56 + ,9 + ,4 + ,2 + ,4.44 + ,15 + ,3.5 + ,2 + ,6.44 + ,15 + ,6 + ,3.5 + ,3.11 + ,14 + ,7 + ,5.5 + ,4.89 + ,11 + ,3 + ,3 + ,3.33 + ,8 + ,4 + ,3.5 + ,4.22 + ,11 + ,8.5 + ,4 + ,4.44 + ,11 + ,5 + ,2 + ,3.33 + ,8 + ,5.5 + ,4 + ,4.44 + ,10 + ,7 + ,4.5 + ,4.00 + ,11 + ,5.5 + ,4 + ,7.33 + ,13 + ,6.5 + ,5.5 + ,4.89 + ,11 + ,6 + ,4 + ,3.56 + ,20 + ,5.5 + ,2.5 + ,3.78 + ,10 + ,4.5 + ,2 + ,3.56 + ,15 + ,6 + ,4 + ,4.67 + ,12 + ,10 + ,5 + ,5.78 + ,14 + ,6 + ,3 + ,4.00 + ,23 + ,6.5 + ,4.5 + ,4.00 + ,14 + ,6 + ,4.5 + ,3.78 + ,16 + ,6 + ,6.5 + ,4.89 + ,11 + ,4.5 + ,4.5 + ,6.67 + ,12 + ,7.5 + ,5 + ,6.67 + ,10 + ,12 + ,10 + ,5.33 + ,14 + ,3.5 + ,2.5 + ,4.67 + ,12 + ,8.5 + ,5.5 + ,4.67 + ,12 + ,5.5 + ,3 + ,6.44 + ,11 + ,8.5 + ,4.5 + ,6.89 + ,12 + ,5.5 + ,3.5 + ,4.44 + ,13 + ,6 + ,4.5 + ,3.56 + ,11 + ,7 + ,5 + ,4.89 + ,19 + ,5.5 + ,4.5 + ,4.44 + ,12 + ,8 + ,4 + ,6.22 + ,17 + ,10.5 + ,3.5 + ,8.44 + ,9 + ,7 + ,3 + ,4.89 + ,12 + ,10 + ,6.5 + ,4.44 + ,19 + ,6.5 + ,3 + ,3.78 + ,18 + ,5.5 + ,4 + ,6.22 + ,15 + ,7.5 + ,5 + ,4.89 + ,14 + ,9.5 + ,8 + ,6.89 + ,11) + ,dim=c(4 + ,159) + ,dimnames=list(c('Intercept' + ,'Expect' + ,'Critisism' + ,'Concerns') + ,1:159)) > y <- array(NA,dim=c(4,159),dimnames=list(c('Intercept','Expect','Critisism','Concerns'),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 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Intercept Expect Critisism Concerns 1 5.5 6.0 5.33 12 2 3.5 4.0 5.56 11 3 8.5 4.0 3.78 14 4 5.0 4.0 4.00 12 5 6.0 4.5 4.00 21 6 6.0 3.5 3.56 12 7 5.5 2.0 4.44 22 8 5.5 5.5 3.56 11 9 6.0 3.5 4.00 10 10 6.5 3.5 3.78 13 11 7.0 6.0 5.11 10 12 8.0 5.0 6.67 8 13 5.5 5.0 5.11 15 14 5.0 4.0 4.00 14 15 5.5 4.0 3.33 10 16 7.5 2.0 2.67 14 17 4.5 4.5 4.67 14 18 5.5 4.0 3.33 11 19 8.5 3.5 4.44 10 20 8.5 5.5 6.89 13 21 5.5 4.5 6.00 7 22 9.0 5.5 7.56 14 23 7.0 6.5 4.67 12 24 5.0 4.0 6.89 14 25 5.5 4.0 4.22 11 26 7.5 4.5 3.56 9 27 7.5 3.0 4.44 11 28 6.5 4.5 4.67 15 29 8.0 4.5 4.89 14 30 6.5 3.0 3.78 13 31 4.5 3.0 5.33 9 32 9.0 8.0 5.56 15 33 9.0 2.5 5.78 10 34 6.0 3.5 5.56 11 35 8.5 4.5 3.78 13 36 4.5 3.0 7.11 8 37 4.5 3.0 7.33 20 38 6.0 2.5 2.89 12 39 9.0 6.0 7.11 10 40 6.0 3.5 5.56 10 41 9.0 5.0 6.44 9 42 7.0 4.5 4.89 14 43 7.5 4.0 4.00 8 44 8.0 2.5 3.78 14 45 5.0 4.0 4.44 11 46 5.5 4.0 3.33 13 47 7.0 5.0 4.44 9 48 4.5 3.0 7.33 11 49 6.0 4.0 6.44 15 50 8.5 3.5 5.11 11 51 2.5 2.0 5.78 10 52 6.0 4.0 4.00 14 53 6.0 4.0 4.44 18 54 3.0 2.0 2.44 14 55 12.0 10.0 6.22 11 56 6.0 4.0 5.78 12 57 6.0 4.0 4.89 13 58 7.0 3.0 3.78 9 59 3.5 2.0 2.67 10 60 6.5 4.0 3.11 15 61 6.0 4.5 3.78 20 62 6.5 3.0 4.67 12 63 7.0 3.5 4.22 12 64 4.0 4.5 4.00 14 65 5.5 2.5 2.22 13 66 4.5 2.5 6.44 11 67 5.5 4.0 6.89 17 68 6.5 4.0 4.22 12 69 5.0 3.0 2.00 13 70 5.5 4.0 4.44 14 71 6.0 3.5 6.22 13 72 4.5 3.5 4.22 15 73 7.5 4.5 6.67 13 74 9.0 5.5 6.44 10 75 7.5 3.0 5.78 11 76 6.0 4.0 5.11 19 77 6.5 3.0 2.89 13 78 7.0 4.5 4.67 17 79 5.0 4.0 4.22 13 80 6.5 3.0 6.22 9 81 6.5 5.0 5.11 11 82 5.5 4.0 4.00 10 83 6.5 4.0 4.67 9 84 8.0 5.0 4.44 12 85 4.0 2.5 5.11 12 86 8.0 3.5 4.67 13 87 5.5 2.5 4.67 13 88 4.5 4.0 3.33 12 89 8.0 7.0 6.22 15 90 6.0 3.5 4.22 22 91 7.0 4.0 5.78 13 92 4.0 3.0 2.22 15 93 4.5 2.5 3.56 13 94 7.5 3.0 4.89 15 95 5.5 5.0 4.22 10 96 10.5 6.0 6.89 11 97 7.0 4.5 6.89 16 98 9.0 6.0 6.44 11 99 6.0 3.5 4.22 11 100 6.5 4.0 4.89 10 101 7.5 5.0 5.11 10 102 6.0 3.0 3.33 16 103 9.5 5.0 4.44 12 104 7.5 5.0 4.00 11 105 5.5 5.0 5.11 16 106 5.5 2.5 5.56 19 107 5.0 3.5 4.67 11 108 6.5 5.0 5.33 16 109 7.5 5.5 5.56 15 110 6.0 3.0 3.78 24 111 6.0 3.5 2.89 14 112 8.0 6.0 6.22 15 113 4.5 5.5 4.67 11 114 9.0 5.5 5.56 15 115 4.0 5.5 2.00 12 116 6.5 2.5 3.56 10 117 8.5 4.0 4.22 14 118 4.5 3.0 3.78 13 119 7.5 4.5 5.56 9 120 4.0 2.0 4.44 15 121 3.5 2.0 6.44 15 122 6.0 3.5 3.11 14 123 7.0 5.5 4.89 11 124 3.0 3.0 3.33 8 125 4.0 3.5 4.22 11 126 8.5 4.0 4.44 11 127 5.0 2.0 3.33 8 128 5.5 4.0 4.44 10 129 7.0 4.5 4.00 11 130 5.5 4.0 7.33 13 131 6.5 5.5 4.89 11 132 6.0 4.0 3.56 20 133 5.5 2.5 3.78 10 134 4.5 2.0 3.56 15 135 6.0 4.0 4.67 12 136 10.0 5.0 5.78 14 137 6.0 3.0 4.00 23 138 6.5 4.5 4.00 14 139 6.0 4.5 3.78 16 140 6.0 6.5 4.89 11 141 4.5 4.5 6.67 12 142 7.5 5.0 6.67 10 143 12.0 10.0 5.33 14 144 3.5 2.5 4.67 12 145 8.5 5.5 4.67 12 146 5.5 3.0 6.44 11 147 8.5 4.5 6.89 12 148 5.5 3.5 4.44 13 149 6.0 4.5 3.56 11 150 7.0 5.0 4.89 19 151 5.5 4.5 4.44 12 152 8.0 4.0 6.22 17 153 10.5 3.5 8.44 9 154 7.0 3.0 4.89 12 155 10.0 6.5 4.44 19 156 6.5 3.0 3.78 18 157 5.5 4.0 6.22 15 158 7.5 5.0 4.89 14 159 9.5 8.0 6.89 11 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Expect Critisism Concerns 2.5529074 0.6916955 0.2165736 -0.0007089 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.0160 -0.9574 -0.0519 0.8895 3.7047 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.5529074 0.6878758 3.711 0.000287 *** Expect 0.6916955 0.0850450 8.133 1.26e-13 *** Critisism 0.2165736 0.0908753 2.383 0.018374 * Concerns -0.0007089 0.0349526 -0.020 0.983845 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.375 on 155 degrees of freedom Multiple R-squared: 0.375, Adjusted R-squared: 0.3629 F-statistic: 31 on 3 and 155 DF, p-value: 9.34e-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.6786424 0.64271523 0.32135762 [2,] 0.6538219 0.69235629 0.34617814 [3,] 0.5258284 0.94834317 0.47417158 [4,] 0.4058960 0.81179201 0.59410399 [5,] 0.4815939 0.96318789 0.51840605 [6,] 0.7360189 0.52796227 0.26398114 [7,] 0.6695528 0.66089443 0.33044721 [8,] 0.6220507 0.75589864 0.37794932 [9,] 0.5428156 0.91436877 0.45718438 [10,] 0.5929662 0.81406762 0.40703381 [11,] 0.6051997 0.78960052 0.39480026 [12,] 0.5413673 0.91726538 0.45863269 [13,] 0.6690081 0.66198376 0.33099188 [14,] 0.7489407 0.50211865 0.25105932 [15,] 0.7447197 0.51056056 0.25528028 [16,] 0.7857699 0.42846016 0.21423008 [17,] 0.7581565 0.48368690 0.24184345 [18,] 0.7987056 0.40258877 0.20129439 [19,] 0.7600334 0.47993319 0.23996659 [20,] 0.7543785 0.49124294 0.24562147 [21,] 0.7542818 0.49143632 0.24571816 [22,] 0.7040791 0.59184181 0.29592091 [23,] 0.7186767 0.56264669 0.28132334 [24,] 0.6746098 0.65078035 0.32539018 [25,] 0.7095570 0.58088604 0.29044302 [26,] 0.7143488 0.57130249 0.28565125 [27,] 0.8619782 0.27604351 0.13802176 [28,] 0.8319405 0.33611896 0.16805948 [29,] 0.8708063 0.25838743 0.12919372 [30,] 0.8880853 0.22382933 0.11191466 [31,] 0.8959632 0.20807353 0.10403677 [32,] 0.8767075 0.24658505 0.12329253 [33,] 0.8864808 0.22703844 0.11351922 [34,] 0.8595603 0.28087941 0.14043970 [35,] 0.8824312 0.23513759 0.11756880 [36,] 0.8565864 0.28682727 0.14341363 [37,] 0.8449353 0.31012934 0.15506467 [38,] 0.9029769 0.19404622 0.09702311 [39,] 0.9042778 0.19144438 0.09572219 [40,] 0.8885532 0.22289356 0.11144678 [41,] 0.8627664 0.27446723 0.13723362 [42,] 0.8762082 0.24758366 0.12379183 [43,] 0.8540821 0.29183582 0.14591791 [44,] 0.8989066 0.20218684 0.10109342 [45,] 0.9555396 0.08892071 0.04446035 [46,] 0.9436320 0.11273610 0.05636805 [47,] 0.9291059 0.14178818 0.07089409 [48,] 0.9442616 0.11147690 0.05573845 [49,] 0.9491205 0.10175894 0.05087947 [50,] 0.9373776 0.12524473 0.06262236 [51,] 0.9223979 0.15520427 0.07760213 [52,] 0.9238638 0.15227243 0.07613621 [53,] 0.9218536 0.15629277 0.07814638 [54,] 0.9057609 0.18847813 0.09423906 [55,] 0.8866269 0.22674622 0.11337311 [56,] 0.8721340 0.25573201 0.12786601 [57,] 0.8627873 0.27442541 0.13721270 [58,] 0.9140561 0.17188786 0.08594393 [59,] 0.9017032 0.19659366 0.09829683 [60,] 0.8948536 0.21029290 0.10514645 [61,] 0.8936121 0.21277571 0.10638785 [62,] 0.8718761 0.25624784 0.12812392 [63,] 0.8512961 0.29740771 0.14870386 [64,] 0.8311862 0.33762762 0.16881381 [65,] 0.8039062 0.39218770 0.19609385 [66,] 0.8024207 0.39515860 0.19757930 [67,] 0.7765092 0.44698155 0.22349077 [68,] 0.7722032 0.45559369 0.22779685 [69,] 0.7857316 0.42853686 0.21426843 [70,] 0.7563357 0.48732862 0.24366431 [71,] 0.7565082 0.48698353 0.24349176 [72,] 0.7227291 0.55454186 0.27727093 [73,] 0.7135395 0.57292099 0.28646049 [74,] 0.6784529 0.64309416 0.32154708 [75,] 0.6442748 0.71145033 0.35572516 [76,] 0.6117773 0.77644537 0.38822268 [77,] 0.5686707 0.86265863 0.43132931 [78,] 0.5516700 0.89665998 0.44832999 [79,] 0.5525996 0.89480080 0.44740040 [80,] 0.6095893 0.78082144 0.39041072 [81,] 0.5658138 0.86837236 0.43418618 [82,] 0.5725406 0.85491877 0.42745939 [83,] 0.5484536 0.90309279 0.45154640 [84,] 0.5054002 0.98919952 0.49459976 [85,] 0.4638144 0.92762876 0.53618562 [86,] 0.4428424 0.88568484 0.55715758 [87,] 0.4029425 0.80588495 0.59705752 [88,] 0.4379422 0.87588441 0.56205779 [89,] 0.4359065 0.87181301 0.56409349 [90,] 0.5113014 0.97739728 0.48869864 [91,] 0.4703809 0.94076178 0.52961911 [92,] 0.4407277 0.88145541 0.55927230 [93,] 0.3959990 0.79199795 0.60400102 [94,] 0.3520421 0.70408421 0.64795789 [95,] 0.3129663 0.62593265 0.68703368 [96,] 0.2833828 0.56676557 0.71661721 [97,] 0.3954948 0.79098952 0.60450524 [98,] 0.3662586 0.73251724 0.63374138 [99,] 0.3886263 0.77725254 0.61137373 [100,] 0.3468826 0.69376510 0.65311745 [101,] 0.3194562 0.63891244 0.68054378 [102,] 0.2914379 0.58287586 0.70856207 [103,] 0.2522828 0.50456570 0.74771715 [104,] 0.2193425 0.43868502 0.78065749 [105,] 0.1920764 0.38415278 0.80792361 [106,] 0.1629594 0.32591879 0.83704061 [107,] 0.2711844 0.54236886 0.72881557 [108,] 0.2631814 0.52636272 0.73681864 [109,] 0.3680858 0.73617162 0.63191419 [110,] 0.4010654 0.80213074 0.59893463 [111,] 0.4967860 0.99357210 0.50321395 [112,] 0.4580673 0.91613450 0.54193275 [113,] 0.4207817 0.84156333 0.57921833 [114,] 0.3839282 0.76785645 0.61607177 [115,] 0.4458008 0.89160152 0.55419924 [116,] 0.4026800 0.80536007 0.59731996 [117,] 0.3522446 0.70448911 0.64775544 [118,] 0.3924910 0.78498204 0.60750898 [119,] 0.4252667 0.85053343 0.57473329 [120,] 0.5286706 0.94265886 0.47132943 [121,] 0.5046918 0.99061642 0.49530821 [122,] 0.4519309 0.90386188 0.54806906 [123,] 0.4134345 0.82686903 0.58656549 [124,] 0.4875211 0.97504219 0.51247890 [125,] 0.4436882 0.88737645 0.55631177 [126,] 0.3855280 0.77105597 0.61447201 [127,] 0.3715357 0.74307135 0.62846433 [128,] 0.3141217 0.62824347 0.68587827 [129,] 0.2578091 0.51561823 0.74219088 [130,] 0.3644974 0.72899475 0.63550262 [131,] 0.3056544 0.61130883 0.69434558 [132,] 0.2489342 0.49786837 0.75106582 [133,] 0.1977861 0.39557224 0.80221388 [134,] 0.2409976 0.48199511 0.75900244 [135,] 0.5548562 0.89028757 0.44514378 [136,] 0.4928716 0.98574319 0.50712841 [137,] 0.4266822 0.85336447 0.57331777 [138,] 0.4886319 0.97726382 0.51136809 [139,] 0.4665703 0.93314068 0.53342966 [140,] 0.4955348 0.99106953 0.50446524 [141,] 0.4006969 0.80139388 0.59930306 [142,] 0.3237591 0.64751811 0.67624094 [143,] 0.2296412 0.45928241 0.77035880 [144,] 0.1705471 0.34109426 0.82945287 [145,] 0.1501689 0.30033788 0.84983106 [146,] 0.0818324 0.16366480 0.91816760 > postscript(file="/var/www/rcomp/tmp/1f3z31321981523.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/rcomp/tmp/2wmfu1321981523.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/rcomp/tmp/320q41321981523.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/rcomp/tmp/4s8dr1321981523.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/rcomp/tmp/5z8bc1321981523.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 = 159 Frequency = 1 1 2 3 4 5 6 -2.34891147 -3.01604122 2.37158640 -1.17747753 -0.51694548 0.26366262 7 8 9 10 11 12 0.61770981 -1.62043730 0.16695250 0.71672529 -0.80268301 0.54973995 13 14 15 16 17 18 -1.60744315 -1.17605979 -0.53379095 2.99537415 -2.16701187 -0.53308208 19 20 21 22 23 24 2.57166011 0.65979034 -1.46001684 1.01539489 -1.05182065 -1.80195751 25 26 27 28 29 30 -0.72583259 1.06984049 1.91821674 -0.16630300 1.28534194 1.06257306 31 32 33 34 35 36 -1.27595150 -0.27998784 3.47314701 -0.17019346 2.02502977 -1.66216139 37 38 39 40 41 42 -1.70130117 1.10046246 0.76416978 -0.17090232 1.60026075 0.28534194 43 44 45 46 47 48 1.31968700 2.90912968 -1.27347878 -0.53166435 0.03340796 -1.70768098 49 50 51 52 53 54 -0.70379052 2.42726466 -2.68100523 -0.17605979 -0.26851671 -1.45481392 55 56 57 58 59 60 1.19084706 -0.56297854 -0.36951917 1.55973759 -1.00746132 0.51739958 61 62 63 64 65 66 -0.47000816 0.86911368 1.12072404 -2.52190756 0.74627564 -1.16908271 67 68 69 70 71 72 -1.29983091 0.27487628 -0.05192593 -0.77135218 -0.31171430 -1.37714936 73 74 75 76 77 78 0.39913205 1.25512186 1.62800811 -0.41291216 1.25532356 0.33511473 79 80 81 82 83 84 -1.22441485 0.53129799 -0.61027862 -0.67889526 0.17529155 1.03553456 85 86 87 88 89 90 -1.38033094 2.02397479 0.21567031 -1.53237321 -0.73123090 0.12781272 91 92 93 94 95 96 0.43773032 -1.09815439 -0.54393299 1.82359409 -1.41823698 2.31252484 97 98 99 100 101 102 -0.14638754 0.90998296 0.12001517 0.12835423 0.38901251 0.66215778 103 104 105 106 107 108 2.53553456 0.63011808 -1.60673428 0.02717301 -0.97744295 -0.65438048 109 110 111 112 113 114 -0.05074903 0.57037060 0.41018467 -0.03953537 -2.86083400 1.44925097 115 116 117 118 119 120 -2.78187360 1.45394041 2.27629401 -0.93742694 0.63669328 -0.88725227 121 122 123 124 125 126 -1.82039947 0.36253848 -0.40848019 -2.34351316 -1.87998483 2.22652122 127 128 129 130 131 132 0.34818236 -0.77418765 0.47596584 -1.39795876 -0.90848019 -0.07651420 133 134 135 136 137 138 0.40629421 -0.19666749 -0.32258184 2.74674367 0.52201554 -0.02190756 139 140 141 142 143 144 -0.47284363 -2.10017571 -2.60157681 0.05115769 1.38572417 -1.78503856 145 146 147 148 149 150 1.13987487 -0.51493047 1.35077699 -0.42621329 -0.42874177 -0.05696149 151 152 153 154 155 156 -1.11861768 1.34527341 3.70465683 1.32146749 2.00295335 1.06611739 157 158 159 -1.15614433 0.43949418 -0.07086621 > postscript(file="/var/www/rcomp/tmp/6lxhl1321981523.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.34891147 NA 1 -3.01604122 -2.34891147 2 2.37158640 -3.01604122 3 -1.17747753 2.37158640 4 -0.51694548 -1.17747753 5 0.26366262 -0.51694548 6 0.61770981 0.26366262 7 -1.62043730 0.61770981 8 0.16695250 -1.62043730 9 0.71672529 0.16695250 10 -0.80268301 0.71672529 11 0.54973995 -0.80268301 12 -1.60744315 0.54973995 13 -1.17605979 -1.60744315 14 -0.53379095 -1.17605979 15 2.99537415 -0.53379095 16 -2.16701187 2.99537415 17 -0.53308208 -2.16701187 18 2.57166011 -0.53308208 19 0.65979034 2.57166011 20 -1.46001684 0.65979034 21 1.01539489 -1.46001684 22 -1.05182065 1.01539489 23 -1.80195751 -1.05182065 24 -0.72583259 -1.80195751 25 1.06984049 -0.72583259 26 1.91821674 1.06984049 27 -0.16630300 1.91821674 28 1.28534194 -0.16630300 29 1.06257306 1.28534194 30 -1.27595150 1.06257306 31 -0.27998784 -1.27595150 32 3.47314701 -0.27998784 33 -0.17019346 3.47314701 34 2.02502977 -0.17019346 35 -1.66216139 2.02502977 36 -1.70130117 -1.66216139 37 1.10046246 -1.70130117 38 0.76416978 1.10046246 39 -0.17090232 0.76416978 40 1.60026075 -0.17090232 41 0.28534194 1.60026075 42 1.31968700 0.28534194 43 2.90912968 1.31968700 44 -1.27347878 2.90912968 45 -0.53166435 -1.27347878 46 0.03340796 -0.53166435 47 -1.70768098 0.03340796 48 -0.70379052 -1.70768098 49 2.42726466 -0.70379052 50 -2.68100523 2.42726466 51 -0.17605979 -2.68100523 52 -0.26851671 -0.17605979 53 -1.45481392 -0.26851671 54 1.19084706 -1.45481392 55 -0.56297854 1.19084706 56 -0.36951917 -0.56297854 57 1.55973759 -0.36951917 58 -1.00746132 1.55973759 59 0.51739958 -1.00746132 60 -0.47000816 0.51739958 61 0.86911368 -0.47000816 62 1.12072404 0.86911368 63 -2.52190756 1.12072404 64 0.74627564 -2.52190756 65 -1.16908271 0.74627564 66 -1.29983091 -1.16908271 67 0.27487628 -1.29983091 68 -0.05192593 0.27487628 69 -0.77135218 -0.05192593 70 -0.31171430 -0.77135218 71 -1.37714936 -0.31171430 72 0.39913205 -1.37714936 73 1.25512186 0.39913205 74 1.62800811 1.25512186 75 -0.41291216 1.62800811 76 1.25532356 -0.41291216 77 0.33511473 1.25532356 78 -1.22441485 0.33511473 79 0.53129799 -1.22441485 80 -0.61027862 0.53129799 81 -0.67889526 -0.61027862 82 0.17529155 -0.67889526 83 1.03553456 0.17529155 84 -1.38033094 1.03553456 85 2.02397479 -1.38033094 86 0.21567031 2.02397479 87 -1.53237321 0.21567031 88 -0.73123090 -1.53237321 89 0.12781272 -0.73123090 90 0.43773032 0.12781272 91 -1.09815439 0.43773032 92 -0.54393299 -1.09815439 93 1.82359409 -0.54393299 94 -1.41823698 1.82359409 95 2.31252484 -1.41823698 96 -0.14638754 2.31252484 97 0.90998296 -0.14638754 98 0.12001517 0.90998296 99 0.12835423 0.12001517 100 0.38901251 0.12835423 101 0.66215778 0.38901251 102 2.53553456 0.66215778 103 0.63011808 2.53553456 104 -1.60673428 0.63011808 105 0.02717301 -1.60673428 106 -0.97744295 0.02717301 107 -0.65438048 -0.97744295 108 -0.05074903 -0.65438048 109 0.57037060 -0.05074903 110 0.41018467 0.57037060 111 -0.03953537 0.41018467 112 -2.86083400 -0.03953537 113 1.44925097 -2.86083400 114 -2.78187360 1.44925097 115 1.45394041 -2.78187360 116 2.27629401 1.45394041 117 -0.93742694 2.27629401 118 0.63669328 -0.93742694 119 -0.88725227 0.63669328 120 -1.82039947 -0.88725227 121 0.36253848 -1.82039947 122 -0.40848019 0.36253848 123 -2.34351316 -0.40848019 124 -1.87998483 -2.34351316 125 2.22652122 -1.87998483 126 0.34818236 2.22652122 127 -0.77418765 0.34818236 128 0.47596584 -0.77418765 129 -1.39795876 0.47596584 130 -0.90848019 -1.39795876 131 -0.07651420 -0.90848019 132 0.40629421 -0.07651420 133 -0.19666749 0.40629421 134 -0.32258184 -0.19666749 135 2.74674367 -0.32258184 136 0.52201554 2.74674367 137 -0.02190756 0.52201554 138 -0.47284363 -0.02190756 139 -2.10017571 -0.47284363 140 -2.60157681 -2.10017571 141 0.05115769 -2.60157681 142 1.38572417 0.05115769 143 -1.78503856 1.38572417 144 1.13987487 -1.78503856 145 -0.51493047 1.13987487 146 1.35077699 -0.51493047 147 -0.42621329 1.35077699 148 -0.42874177 -0.42621329 149 -0.05696149 -0.42874177 150 -1.11861768 -0.05696149 151 1.34527341 -1.11861768 152 3.70465683 1.34527341 153 1.32146749 3.70465683 154 2.00295335 1.32146749 155 1.06611739 2.00295335 156 -1.15614433 1.06611739 157 0.43949418 -1.15614433 158 -0.07086621 0.43949418 159 NA -0.07086621 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.01604122 -2.34891147 [2,] 2.37158640 -3.01604122 [3,] -1.17747753 2.37158640 [4,] -0.51694548 -1.17747753 [5,] 0.26366262 -0.51694548 [6,] 0.61770981 0.26366262 [7,] -1.62043730 0.61770981 [8,] 0.16695250 -1.62043730 [9,] 0.71672529 0.16695250 [10,] -0.80268301 0.71672529 [11,] 0.54973995 -0.80268301 [12,] -1.60744315 0.54973995 [13,] -1.17605979 -1.60744315 [14,] -0.53379095 -1.17605979 [15,] 2.99537415 -0.53379095 [16,] -2.16701187 2.99537415 [17,] -0.53308208 -2.16701187 [18,] 2.57166011 -0.53308208 [19,] 0.65979034 2.57166011 [20,] -1.46001684 0.65979034 [21,] 1.01539489 -1.46001684 [22,] -1.05182065 1.01539489 [23,] -1.80195751 -1.05182065 [24,] -0.72583259 -1.80195751 [25,] 1.06984049 -0.72583259 [26,] 1.91821674 1.06984049 [27,] -0.16630300 1.91821674 [28,] 1.28534194 -0.16630300 [29,] 1.06257306 1.28534194 [30,] -1.27595150 1.06257306 [31,] -0.27998784 -1.27595150 [32,] 3.47314701 -0.27998784 [33,] -0.17019346 3.47314701 [34,] 2.02502977 -0.17019346 [35,] -1.66216139 2.02502977 [36,] -1.70130117 -1.66216139 [37,] 1.10046246 -1.70130117 [38,] 0.76416978 1.10046246 [39,] -0.17090232 0.76416978 [40,] 1.60026075 -0.17090232 [41,] 0.28534194 1.60026075 [42,] 1.31968700 0.28534194 [43,] 2.90912968 1.31968700 [44,] -1.27347878 2.90912968 [45,] -0.53166435 -1.27347878 [46,] 0.03340796 -0.53166435 [47,] -1.70768098 0.03340796 [48,] -0.70379052 -1.70768098 [49,] 2.42726466 -0.70379052 [50,] -2.68100523 2.42726466 [51,] -0.17605979 -2.68100523 [52,] -0.26851671 -0.17605979 [53,] -1.45481392 -0.26851671 [54,] 1.19084706 -1.45481392 [55,] -0.56297854 1.19084706 [56,] -0.36951917 -0.56297854 [57,] 1.55973759 -0.36951917 [58,] -1.00746132 1.55973759 [59,] 0.51739958 -1.00746132 [60,] -0.47000816 0.51739958 [61,] 0.86911368 -0.47000816 [62,] 1.12072404 0.86911368 [63,] -2.52190756 1.12072404 [64,] 0.74627564 -2.52190756 [65,] -1.16908271 0.74627564 [66,] -1.29983091 -1.16908271 [67,] 0.27487628 -1.29983091 [68,] -0.05192593 0.27487628 [69,] -0.77135218 -0.05192593 [70,] -0.31171430 -0.77135218 [71,] -1.37714936 -0.31171430 [72,] 0.39913205 -1.37714936 [73,] 1.25512186 0.39913205 [74,] 1.62800811 1.25512186 [75,] -0.41291216 1.62800811 [76,] 1.25532356 -0.41291216 [77,] 0.33511473 1.25532356 [78,] -1.22441485 0.33511473 [79,] 0.53129799 -1.22441485 [80,] -0.61027862 0.53129799 [81,] -0.67889526 -0.61027862 [82,] 0.17529155 -0.67889526 [83,] 1.03553456 0.17529155 [84,] -1.38033094 1.03553456 [85,] 2.02397479 -1.38033094 [86,] 0.21567031 2.02397479 [87,] -1.53237321 0.21567031 [88,] -0.73123090 -1.53237321 [89,] 0.12781272 -0.73123090 [90,] 0.43773032 0.12781272 [91,] -1.09815439 0.43773032 [92,] -0.54393299 -1.09815439 [93,] 1.82359409 -0.54393299 [94,] -1.41823698 1.82359409 [95,] 2.31252484 -1.41823698 [96,] -0.14638754 2.31252484 [97,] 0.90998296 -0.14638754 [98,] 0.12001517 0.90998296 [99,] 0.12835423 0.12001517 [100,] 0.38901251 0.12835423 [101,] 0.66215778 0.38901251 [102,] 2.53553456 0.66215778 [103,] 0.63011808 2.53553456 [104,] -1.60673428 0.63011808 [105,] 0.02717301 -1.60673428 [106,] -0.97744295 0.02717301 [107,] -0.65438048 -0.97744295 [108,] -0.05074903 -0.65438048 [109,] 0.57037060 -0.05074903 [110,] 0.41018467 0.57037060 [111,] -0.03953537 0.41018467 [112,] -2.86083400 -0.03953537 [113,] 1.44925097 -2.86083400 [114,] -2.78187360 1.44925097 [115,] 1.45394041 -2.78187360 [116,] 2.27629401 1.45394041 [117,] -0.93742694 2.27629401 [118,] 0.63669328 -0.93742694 [119,] -0.88725227 0.63669328 [120,] -1.82039947 -0.88725227 [121,] 0.36253848 -1.82039947 [122,] -0.40848019 0.36253848 [123,] -2.34351316 -0.40848019 [124,] -1.87998483 -2.34351316 [125,] 2.22652122 -1.87998483 [126,] 0.34818236 2.22652122 [127,] -0.77418765 0.34818236 [128,] 0.47596584 -0.77418765 [129,] -1.39795876 0.47596584 [130,] -0.90848019 -1.39795876 [131,] -0.07651420 -0.90848019 [132,] 0.40629421 -0.07651420 [133,] -0.19666749 0.40629421 [134,] -0.32258184 -0.19666749 [135,] 2.74674367 -0.32258184 [136,] 0.52201554 2.74674367 [137,] -0.02190756 0.52201554 [138,] -0.47284363 -0.02190756 [139,] -2.10017571 -0.47284363 [140,] -2.60157681 -2.10017571 [141,] 0.05115769 -2.60157681 [142,] 1.38572417 0.05115769 [143,] -1.78503856 1.38572417 [144,] 1.13987487 -1.78503856 [145,] -0.51493047 1.13987487 [146,] 1.35077699 -0.51493047 [147,] -0.42621329 1.35077699 [148,] -0.42874177 -0.42621329 [149,] -0.05696149 -0.42874177 [150,] -1.11861768 -0.05696149 [151,] 1.34527341 -1.11861768 [152,] 3.70465683 1.34527341 [153,] 1.32146749 3.70465683 [154,] 2.00295335 1.32146749 [155,] 1.06611739 2.00295335 [156,] -1.15614433 1.06611739 [157,] 0.43949418 -1.15614433 [158,] -0.07086621 0.43949418 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.01604122 -2.34891147 2 2.37158640 -3.01604122 3 -1.17747753 2.37158640 4 -0.51694548 -1.17747753 5 0.26366262 -0.51694548 6 0.61770981 0.26366262 7 -1.62043730 0.61770981 8 0.16695250 -1.62043730 9 0.71672529 0.16695250 10 -0.80268301 0.71672529 11 0.54973995 -0.80268301 12 -1.60744315 0.54973995 13 -1.17605979 -1.60744315 14 -0.53379095 -1.17605979 15 2.99537415 -0.53379095 16 -2.16701187 2.99537415 17 -0.53308208 -2.16701187 18 2.57166011 -0.53308208 19 0.65979034 2.57166011 20 -1.46001684 0.65979034 21 1.01539489 -1.46001684 22 -1.05182065 1.01539489 23 -1.80195751 -1.05182065 24 -0.72583259 -1.80195751 25 1.06984049 -0.72583259 26 1.91821674 1.06984049 27 -0.16630300 1.91821674 28 1.28534194 -0.16630300 29 1.06257306 1.28534194 30 -1.27595150 1.06257306 31 -0.27998784 -1.27595150 32 3.47314701 -0.27998784 33 -0.17019346 3.47314701 34 2.02502977 -0.17019346 35 -1.66216139 2.02502977 36 -1.70130117 -1.66216139 37 1.10046246 -1.70130117 38 0.76416978 1.10046246 39 -0.17090232 0.76416978 40 1.60026075 -0.17090232 41 0.28534194 1.60026075 42 1.31968700 0.28534194 43 2.90912968 1.31968700 44 -1.27347878 2.90912968 45 -0.53166435 -1.27347878 46 0.03340796 -0.53166435 47 -1.70768098 0.03340796 48 -0.70379052 -1.70768098 49 2.42726466 -0.70379052 50 -2.68100523 2.42726466 51 -0.17605979 -2.68100523 52 -0.26851671 -0.17605979 53 -1.45481392 -0.26851671 54 1.19084706 -1.45481392 55 -0.56297854 1.19084706 56 -0.36951917 -0.56297854 57 1.55973759 -0.36951917 58 -1.00746132 1.55973759 59 0.51739958 -1.00746132 60 -0.47000816 0.51739958 61 0.86911368 -0.47000816 62 1.12072404 0.86911368 63 -2.52190756 1.12072404 64 0.74627564 -2.52190756 65 -1.16908271 0.74627564 66 -1.29983091 -1.16908271 67 0.27487628 -1.29983091 68 -0.05192593 0.27487628 69 -0.77135218 -0.05192593 70 -0.31171430 -0.77135218 71 -1.37714936 -0.31171430 72 0.39913205 -1.37714936 73 1.25512186 0.39913205 74 1.62800811 1.25512186 75 -0.41291216 1.62800811 76 1.25532356 -0.41291216 77 0.33511473 1.25532356 78 -1.22441485 0.33511473 79 0.53129799 -1.22441485 80 -0.61027862 0.53129799 81 -0.67889526 -0.61027862 82 0.17529155 -0.67889526 83 1.03553456 0.17529155 84 -1.38033094 1.03553456 85 2.02397479 -1.38033094 86 0.21567031 2.02397479 87 -1.53237321 0.21567031 88 -0.73123090 -1.53237321 89 0.12781272 -0.73123090 90 0.43773032 0.12781272 91 -1.09815439 0.43773032 92 -0.54393299 -1.09815439 93 1.82359409 -0.54393299 94 -1.41823698 1.82359409 95 2.31252484 -1.41823698 96 -0.14638754 2.31252484 97 0.90998296 -0.14638754 98 0.12001517 0.90998296 99 0.12835423 0.12001517 100 0.38901251 0.12835423 101 0.66215778 0.38901251 102 2.53553456 0.66215778 103 0.63011808 2.53553456 104 -1.60673428 0.63011808 105 0.02717301 -1.60673428 106 -0.97744295 0.02717301 107 -0.65438048 -0.97744295 108 -0.05074903 -0.65438048 109 0.57037060 -0.05074903 110 0.41018467 0.57037060 111 -0.03953537 0.41018467 112 -2.86083400 -0.03953537 113 1.44925097 -2.86083400 114 -2.78187360 1.44925097 115 1.45394041 -2.78187360 116 2.27629401 1.45394041 117 -0.93742694 2.27629401 118 0.63669328 -0.93742694 119 -0.88725227 0.63669328 120 -1.82039947 -0.88725227 121 0.36253848 -1.82039947 122 -0.40848019 0.36253848 123 -2.34351316 -0.40848019 124 -1.87998483 -2.34351316 125 2.22652122 -1.87998483 126 0.34818236 2.22652122 127 -0.77418765 0.34818236 128 0.47596584 -0.77418765 129 -1.39795876 0.47596584 130 -0.90848019 -1.39795876 131 -0.07651420 -0.90848019 132 0.40629421 -0.07651420 133 -0.19666749 0.40629421 134 -0.32258184 -0.19666749 135 2.74674367 -0.32258184 136 0.52201554 2.74674367 137 -0.02190756 0.52201554 138 -0.47284363 -0.02190756 139 -2.10017571 -0.47284363 140 -2.60157681 -2.10017571 141 0.05115769 -2.60157681 142 1.38572417 0.05115769 143 -1.78503856 1.38572417 144 1.13987487 -1.78503856 145 -0.51493047 1.13987487 146 1.35077699 -0.51493047 147 -0.42621329 1.35077699 148 -0.42874177 -0.42621329 149 -0.05696149 -0.42874177 150 -1.11861768 -0.05696149 151 1.34527341 -1.11861768 152 3.70465683 1.34527341 153 1.32146749 3.70465683 154 2.00295335 1.32146749 155 1.06611739 2.00295335 156 -1.15614433 1.06611739 157 0.43949418 -1.15614433 158 -0.07086621 0.43949418 > 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/rcomp/tmp/7iquo1321981523.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/rcomp/tmp/8h8tw1321981523.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/rcomp/tmp/9ct091321981523.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/rcomp/tmp/10ff4i1321981523.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11gun91321981523.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/rcomp/tmp/1220111321981523.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/rcomp/tmp/139cev1321981523.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/rcomp/tmp/149wgs1321981523.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/rcomp/tmp/15mbh31321981523.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/rcomp/tmp/16kb0x1321981523.tab") + } > > try(system("convert tmp/1f3z31321981523.ps tmp/1f3z31321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/2wmfu1321981523.ps tmp/2wmfu1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/320q41321981523.ps tmp/320q41321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/4s8dr1321981523.ps tmp/4s8dr1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/5z8bc1321981523.ps tmp/5z8bc1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/6lxhl1321981523.ps tmp/6lxhl1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/7iquo1321981523.ps tmp/7iquo1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/8h8tw1321981523.ps tmp/8h8tw1321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/9ct091321981523.ps tmp/9ct091321981523.png",intern=TRUE)) character(0) > try(system("convert tmp/10ff4i1321981523.ps tmp/10ff4i1321981523.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.300 0.648 6.961