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(6.9 + ,2.28 + ,6.8 + ,2.26 + ,6.7 + ,2.71 + ,6.6 + ,2.77 + ,6.5 + ,2.77 + ,6.5 + ,2.64 + ,7.0 + ,2.56 + ,7.5 + ,2.07 + ,7.6 + ,2.32 + ,7.6 + ,2.16 + ,7.6 + ,2.23 + ,7.8 + ,2.40 + ,8.0 + ,2.84 + ,8.0 + ,2.77 + ,8.0 + ,2.93 + ,7.9 + ,2.91 + ,7.9 + ,2.69 + ,8.0 + ,2.38 + ,8.5 + ,2.58 + ,9.2 + ,3.19 + ,9.4 + ,2.82 + ,9.5 + ,2.72 + ,9.5 + ,2.53 + ,9.6 + ,2.70 + ,9.7 + ,2.42 + ,9.7 + ,2.50 + ,9.6 + ,2.31 + ,9.5 + ,2.41 + ,9.4 + ,2.56 + ,9.3 + ,2.76 + ,9.6 + ,2.71 + ,10.2 + ,2.44 + ,10.2 + ,2.46 + ,10.1 + ,2.12 + ,9.9 + ,1.99 + ,9.8 + ,1.86 + ,9.8 + ,1.88 + ,9.7 + ,1.82 + ,9.5 + ,1.74 + ,9.3 + ,1.71 + ,9.1 + ,1.38 + ,9.0 + ,1.27 + ,9.5 + ,1.19 + ,10.0 + ,1.28 + ,10.2 + ,1.19 + ,10.1 + ,1.22 + ,10.0 + ,1.47 + ,9.9 + ,1.46 + ,10.0 + ,1.96 + ,9.9 + ,1.88 + ,9.7 + ,2.03 + ,9.5 + ,2.04 + ,9.2 + ,1.90 + ,9.0 + ,1.80 + ,9.3 + ,1.92 + ,9.8 + ,1.92 + ,9.8 + ,1.97 + ,9.6 + ,2.46 + ,9.4 + ,2.36 + ,9.3 + ,2.53 + ,9.2 + ,2.31 + ,9.2 + ,1.98 + ,9.0 + ,1.46 + ,8.8 + ,1.26 + ,8.7 + ,1.58 + ,8.7 + ,1.74 + ,9.1 + ,1.89 + ,9.7 + ,1.85 + ,9.8 + ,1.62 + ,9.6 + ,1.30 + ,9.4 + ,1.42 + ,9.4 + ,1.15 + ,9.5 + ,0.42 + ,9.4 + ,0.74 + ,9.3 + ,1.02 + ,9.2 + ,1.51 + ,9.0 + ,1.86 + ,8.9 + ,1.59 + ,9.2 + ,1.03 + ,9.8 + ,0.44 + ,9.9 + ,0.82 + ,9.6 + ,0.86 + ,9.2 + ,0.58 + ,9.1 + ,0.59 + ,9.1 + ,0.95 + ,9.0 + ,0.98 + ,8.9 + ,1.23 + ,8.7 + ,1.17 + ,8.5 + ,0.84 + ,8.3 + ,0.74 + ,8.5 + ,0.65 + ,8.7 + ,0.91 + ,8.4 + ,1.19 + ,8.1 + ,1.30 + ,7.8 + ,1.53 + ,7.7 + ,1.94 + ,7.5 + ,1.79 + ,7.2 + ,1.95 + ,6.8 + ,2.26 + ,6.7 + ,2.04 + ,6.4 + ,2.16 + ,6.3 + ,2.75 + ,6.8 + ,2.79 + ,7.3 + ,2.88 + ,7.1 + ,3.36 + ,7.0 + ,2.97 + ,6.8 + ,3.10 + ,6.6 + ,2.49 + ,6.3 + ,2.20 + ,6.1 + ,2.25 + ,6.1 + ,2.09 + ,6.3 + ,2.79 + ,6.3 + ,3.14 + ,6.0 + ,2.93 + ,6.2 + ,2.65 + ,6.4 + ,2.67 + ,6.8 + ,2.26 + ,7.5 + ,2.35 + ,7.5 + ,2.13 + ,7.6 + ,2.18 + ,7.6 + ,2.90 + ,7.4 + ,2.63 + ,7.3 + ,2.67 + ,7.1 + ,1.81 + ,6.9 + ,1.33 + ,6.8 + ,0.88 + ,7.5 + ,1.28 + ,7.6 + ,1.26 + ,7.8 + ,1.26 + ,8.0 + ,1.29 + ,8.1 + ,1.10 + ,8.2 + ,1.37 + ,8.3 + ,1.21 + ,8.2 + ,1.74 + ,8.0 + ,1.76 + ,7.9 + ,1.48 + ,7.6 + ,1.04 + ,7.6 + ,1.62 + ,8.3 + ,1.49 + ,8.4 + ,1.79 + ,8.4 + ,1.80 + ,8.4 + ,1.58 + ,8.4 + ,1.86 + ,8.6 + ,1.74 + ,8.9 + ,1.59 + ,8.8 + ,1.26 + ,8.3 + ,1.13 + ,7.5 + ,1.92 + ,7.2 + ,2.61 + ,7.4 + ,2.26 + ,8.8 + ,2.41 + ,9.3 + ,2.26 + ,9.3 + ,2.03 + ,8.7 + ,2.86 + ,8.2 + ,2.55 + ,8.3 + ,2.27 + ,8.5 + ,2.26 + ,8.6 + ,2.57 + ,8.5 + ,3.07 + ,8.2 + ,2.76 + ,8.1 + ,2.51 + ,7.9 + ,2.87 + ,8.6 + ,3.14 + ,8.7 + ,3.11 + ,8.7 + ,3.16 + ,8.5 + ,2.47 + ,8.4 + ,2.57 + ,8.5 + ,2.89 + ,8.7 + ,2.63 + ,8.7 + ,2.38 + ,8.6 + ,1.69 + ,8.5 + ,1.96 + ,8.3 + ,2.19 + ,8.0 + ,1.87 + ,8.2 + ,1.6 + ,8.1 + ,1.63 + ,8.1 + ,1.22 + ,8.0 + ,1.21 + ,7.9 + ,1.49 + ,7.9 + ,1.64) + ,dim=c(2 + ,180) + ,dimnames=list(c('Y' + ,'X') + ,1:180)) > y <- array(NA,dim=c(2,180),dimnames=list(c('Y','X'),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 = '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 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 Y X 1 6.9 2.28 2 6.8 2.26 3 6.7 2.71 4 6.6 2.77 5 6.5 2.77 6 6.5 2.64 7 7.0 2.56 8 7.5 2.07 9 7.6 2.32 10 7.6 2.16 11 7.6 2.23 12 7.8 2.40 13 8.0 2.84 14 8.0 2.77 15 8.0 2.93 16 7.9 2.91 17 7.9 2.69 18 8.0 2.38 19 8.5 2.58 20 9.2 3.19 21 9.4 2.82 22 9.5 2.72 23 9.5 2.53 24 9.6 2.70 25 9.7 2.42 26 9.7 2.50 27 9.6 2.31 28 9.5 2.41 29 9.4 2.56 30 9.3 2.76 31 9.6 2.71 32 10.2 2.44 33 10.2 2.46 34 10.1 2.12 35 9.9 1.99 36 9.8 1.86 37 9.8 1.88 38 9.7 1.82 39 9.5 1.74 40 9.3 1.71 41 9.1 1.38 42 9.0 1.27 43 9.5 1.19 44 10.0 1.28 45 10.2 1.19 46 10.1 1.22 47 10.0 1.47 48 9.9 1.46 49 10.0 1.96 50 9.9 1.88 51 9.7 2.03 52 9.5 2.04 53 9.2 1.90 54 9.0 1.80 55 9.3 1.92 56 9.8 1.92 57 9.8 1.97 58 9.6 2.46 59 9.4 2.36 60 9.3 2.53 61 9.2 2.31 62 9.2 1.98 63 9.0 1.46 64 8.8 1.26 65 8.7 1.58 66 8.7 1.74 67 9.1 1.89 68 9.7 1.85 69 9.8 1.62 70 9.6 1.30 71 9.4 1.42 72 9.4 1.15 73 9.5 0.42 74 9.4 0.74 75 9.3 1.02 76 9.2 1.51 77 9.0 1.86 78 8.9 1.59 79 9.2 1.03 80 9.8 0.44 81 9.9 0.82 82 9.6 0.86 83 9.2 0.58 84 9.1 0.59 85 9.1 0.95 86 9.0 0.98 87 8.9 1.23 88 8.7 1.17 89 8.5 0.84 90 8.3 0.74 91 8.5 0.65 92 8.7 0.91 93 8.4 1.19 94 8.1 1.30 95 7.8 1.53 96 7.7 1.94 97 7.5 1.79 98 7.2 1.95 99 6.8 2.26 100 6.7 2.04 101 6.4 2.16 102 6.3 2.75 103 6.8 2.79 104 7.3 2.88 105 7.1 3.36 106 7.0 2.97 107 6.8 3.10 108 6.6 2.49 109 6.3 2.20 110 6.1 2.25 111 6.1 2.09 112 6.3 2.79 113 6.3 3.14 114 6.0 2.93 115 6.2 2.65 116 6.4 2.67 117 6.8 2.26 118 7.5 2.35 119 7.5 2.13 120 7.6 2.18 121 7.6 2.90 122 7.4 2.63 123 7.3 2.67 124 7.1 1.81 125 6.9 1.33 126 6.8 0.88 127 7.5 1.28 128 7.6 1.26 129 7.8 1.26 130 8.0 1.29 131 8.1 1.10 132 8.2 1.37 133 8.3 1.21 134 8.2 1.74 135 8.0 1.76 136 7.9 1.48 137 7.6 1.04 138 7.6 1.62 139 8.3 1.49 140 8.4 1.79 141 8.4 1.80 142 8.4 1.58 143 8.4 1.86 144 8.6 1.74 145 8.9 1.59 146 8.8 1.26 147 8.3 1.13 148 7.5 1.92 149 7.2 2.61 150 7.4 2.26 151 8.8 2.41 152 9.3 2.26 153 9.3 2.03 154 8.7 2.86 155 8.2 2.55 156 8.3 2.27 157 8.5 2.26 158 8.6 2.57 159 8.5 3.07 160 8.2 2.76 161 8.1 2.51 162 7.9 2.87 163 8.6 3.14 164 8.7 3.11 165 8.7 3.16 166 8.5 2.47 167 8.4 2.57 168 8.5 2.89 169 8.7 2.63 170 8.7 2.38 171 8.6 1.69 172 8.5 1.96 173 8.3 2.19 174 8.0 1.87 175 8.2 1.60 176 8.1 1.63 177 8.1 1.22 178 8.0 1.21 179 7.9 1.49 180 7.9 1.64 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X 9.4065 -0.5093 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2.24207 -0.74639 0.04476 0.79500 2.04637 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.4065 0.2384 39.46 < 2e-16 *** X -0.5093 0.1140 -4.47 1.39e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.024 on 178 degrees of freedom Multiple R-squared: 0.1009, Adjusted R-squared: 0.09586 F-statistic: 19.98 on 1 and 178 DF, p-value: 1.391e-05 > 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.0007554383 1.510877e-03 9.992446e-01 [2,] 0.0002000396 4.000792e-04 9.998000e-01 [3,] 0.0003219951 6.439902e-04 9.996780e-01 [4,] 0.0003095261 6.190522e-04 9.996905e-01 [5,] 0.0007738119 1.547624e-03 9.992262e-01 [6,] 0.0003129011 6.258022e-04 9.996871e-01 [7,] 0.0001428450 2.856901e-04 9.998572e-01 [8,] 0.0003908404 7.816808e-04 9.996092e-01 [9,] 0.0079419792 1.588396e-02 9.920580e-01 [10,] 0.0139447554 2.788951e-02 9.860552e-01 [11,] 0.0163473223 3.269464e-02 9.836527e-01 [12,] 0.0127743549 2.554871e-02 9.872256e-01 [13,] 0.0094296741 1.885935e-02 9.905703e-01 [14,] 0.0078988066 1.579761e-02 9.921012e-01 [15,] 0.0125581941 2.511639e-02 9.874418e-01 [16,] 0.0324561305 6.491226e-02 9.675439e-01 [17,] 0.0818637990 1.637276e-01 9.181362e-01 [18,] 0.1673862570 3.347725e-01 8.326137e-01 [19,] 0.2953024440 5.906049e-01 7.046976e-01 [20,] 0.4049536199 8.099072e-01 5.950464e-01 [21,] 0.5714481921 8.571036e-01 4.285518e-01 [22,] 0.6842088559 6.315823e-01 3.157911e-01 [23,] 0.7657877703 4.684245e-01 2.342122e-01 [24,] 0.8050072340 3.899855e-01 1.949928e-01 [25,] 0.8218361525 3.563277e-01 1.781638e-01 [26,] 0.8237782984 3.524434e-01 1.762217e-01 [27,] 0.8472350071 3.055300e-01 1.527650e-01 [28,] 0.9172095687 1.655809e-01 8.279043e-02 [29,] 0.9562854116 8.742918e-02 4.371459e-02 [30,] 0.9747413552 5.051729e-02 2.525864e-02 [31,] 0.9803024912 3.939502e-02 1.969751e-02 [32,] 0.9812736074 3.745279e-02 1.872639e-02 [33,] 0.9813317548 3.733649e-02 1.866825e-02 [34,] 0.9794803831 4.103923e-02 2.051962e-02 [35,] 0.9751335134 4.973297e-02 2.486649e-02 [36,] 0.9687100072 6.257999e-02 3.128999e-02 [37,] 0.9606116153 7.877677e-02 3.938838e-02 [38,] 0.9511702972 9.765941e-02 4.882970e-02 [39,] 0.9397157454 1.205685e-01 6.028425e-02 [40,] 0.9347705435 1.304589e-01 6.522946e-02 [41,] 0.9325465931 1.349068e-01 6.745341e-02 [42,] 0.9282480942 1.435038e-01 7.175191e-02 [43,] 0.9259363558 1.481273e-01 7.406364e-02 [44,] 0.9210846056 1.578308e-01 7.891539e-02 [45,] 0.9315766349 1.368467e-01 6.842337e-02 [46,] 0.9361610809 1.276778e-01 6.383892e-02 [47,] 0.9384397278 1.231205e-01 6.156027e-02 [48,] 0.9361337194 1.277326e-01 6.386628e-02 [49,] 0.9267359899 1.465280e-01 7.326401e-02 [50,] 0.9144748683 1.710503e-01 8.552513e-02 [51,] 0.9054106765 1.891786e-01 9.458932e-02 [52,] 0.9120443955 1.759112e-01 8.795560e-02 [53,] 0.9205989795 1.588020e-01 7.940102e-02 [54,] 0.9361885884 1.276228e-01 6.381141e-02 [55,] 0.9411849683 1.176301e-01 5.881503e-02 [56,] 0.9474224860 1.051550e-01 5.257751e-02 [57,] 0.9473042951 1.053914e-01 5.269570e-02 [58,] 0.9433572152 1.132856e-01 5.664278e-02 [59,] 0.9370653572 1.258693e-01 6.293464e-02 [60,] 0.9336051778 1.327896e-01 6.639482e-02 [61,] 0.9262074390 1.475851e-01 7.379256e-02 [62,] 0.9165369381 1.669261e-01 8.346306e-02 [63,] 0.9089592080 1.820816e-01 9.104079e-02 [64,] 0.9189696021 1.620608e-01 8.103040e-02 [65,] 0.9272092558 1.455815e-01 7.279074e-02 [66,] 0.9250104148 1.499792e-01 7.498959e-02 [67,] 0.9209294822 1.581410e-01 7.907052e-02 [68,] 0.9153375227 1.693250e-01 8.466248e-02 [69,] 0.9107587779 1.784824e-01 8.924122e-02 [70,] 0.9035553908 1.928892e-01 9.644461e-02 [71,] 0.8954979562 2.090041e-01 1.045020e-01 [72,] 0.8891208962 2.217582e-01 1.108791e-01 [73,] 0.8824387732 2.351225e-01 1.175612e-01 [74,] 0.8719955005 2.560090e-01 1.280045e-01 [75,] 0.8625897946 2.748204e-01 1.374102e-01 [76,] 0.8606247694 2.787505e-01 1.393752e-01 [77,] 0.8724691919 2.550616e-01 1.275308e-01 [78,] 0.8752009874 2.495980e-01 1.247990e-01 [79,] 0.8705333297 2.589333e-01 1.294667e-01 [80,] 0.8653208276 2.693583e-01 1.346792e-01 [81,] 0.8595883215 2.808234e-01 1.404117e-01 [82,] 0.8531188730 2.937623e-01 1.468811e-01 [83,] 0.8457691452 3.084617e-01 1.542309e-01 [84,] 0.8371860914 3.256278e-01 1.628139e-01 [85,] 0.8336306937 3.327386e-01 1.663693e-01 [86,] 0.8356036425 3.287927e-01 1.643964e-01 [87,] 0.8303457155 3.393086e-01 1.696543e-01 [88,] 0.8197696263 3.604607e-01 1.802304e-01 [89,] 0.8085121080 3.829758e-01 1.914879e-01 [90,] 0.8016638405 3.966723e-01 1.983362e-01 [91,] 0.8019814216 3.960372e-01 1.980186e-01 [92,] 0.7982485008 4.035030e-01 2.017515e-01 [93,] 0.8072801578 3.854397e-01 1.927198e-01 [94,] 0.8307499511 3.385001e-01 1.692500e-01 [95,] 0.8714064267 2.571871e-01 1.285936e-01 [96,] 0.9136236058 1.727528e-01 8.637639e-02 [97,] 0.9547164766 9.056705e-02 4.528352e-02 [98,] 0.9750939971 4.981201e-02 2.490600e-02 [99,] 0.9789418350 4.211633e-02 2.105816e-02 [100,] 0.9760378987 4.792420e-02 2.396210e-02 [101,] 0.9729269365 5.414613e-02 2.707306e-02 [102,] 0.9725334802 5.493304e-02 2.746652e-02 [103,] 0.9746336898 5.073262e-02 2.536631e-02 [104,] 0.9829019013 3.419620e-02 1.709810e-02 [105,] 0.9928621445 1.427571e-02 7.137855e-03 [106,] 0.9980459805 3.908039e-03 1.954019e-03 [107,] 0.9996082162 7.835676e-04 3.917838e-04 [108,] 0.9998742773 2.514455e-04 1.257227e-04 [109,] 0.9999654040 6.919196e-05 3.459598e-05 [110,] 0.9999976630 4.673989e-06 2.336995e-06 [111,] 0.9999998717 2.565597e-07 1.282798e-07 [112,] 0.9999999935 1.304144e-08 6.520720e-09 [113,] 0.9999999990 2.091612e-09 1.045806e-09 [114,] 0.9999999989 2.180970e-09 1.090485e-09 [115,] 0.9999999988 2.325963e-09 1.162982e-09 [116,] 0.9999999985 2.913643e-09 1.456821e-09 [117,] 0.9999999987 2.674483e-09 1.337242e-09 [118,] 0.9999999992 1.518469e-09 7.592347e-10 [119,] 0.9999999998 4.828066e-10 2.414033e-10 [120,] 0.9999999999 1.248658e-10 6.243292e-11 [121,] 1.0000000000 1.541704e-11 7.708522e-12 [122,] 1.0000000000 9.875654e-13 4.937827e-13 [123,] 1.0000000000 8.636249e-13 4.318124e-13 [124,] 1.0000000000 9.735060e-13 4.867530e-13 [125,] 1.0000000000 1.728242e-12 8.641209e-13 [126,] 1.0000000000 4.078235e-12 2.039118e-12 [127,] 1.0000000000 1.012666e-11 5.063331e-12 [128,] 1.0000000000 2.635943e-11 1.317972e-11 [129,] 1.0000000000 6.462314e-11 3.231157e-11 [130,] 0.9999999999 1.684083e-10 8.420417e-11 [131,] 0.9999999998 3.724309e-10 1.862154e-10 [132,] 0.9999999996 7.323884e-10 3.661942e-10 [133,] 0.9999999996 7.760264e-10 3.880132e-10 [134,] 0.9999999997 6.431304e-10 3.215652e-10 [135,] 0.9999999992 1.681396e-09 8.406979e-10 [136,] 0.9999999978 4.339685e-09 2.169842e-09 [137,] 0.9999999945 1.102513e-08 5.512566e-09 [138,] 0.9999999864 2.721303e-08 1.360651e-08 [139,] 0.9999999665 6.702549e-08 3.351275e-08 [140,] 0.9999999303 1.394875e-07 6.974375e-08 [141,] 0.9999999220 1.559379e-07 7.796897e-08 [142,] 0.9999999157 1.686665e-07 8.433327e-08 [143,] 0.9999998170 3.659183e-07 1.829591e-07 [144,] 0.9999998648 2.704076e-07 1.352038e-07 [145,] 0.9999999923 1.535951e-08 7.679753e-09 [146,] 0.9999999992 1.661163e-09 8.305813e-10 [147,] 0.9999999984 3.227206e-09 1.613603e-09 [148,] 0.9999999999 2.652837e-10 1.326418e-10 [149,] 1.0000000000 1.182156e-12 5.910778e-13 [150,] 1.0000000000 3.646326e-12 1.823163e-12 [151,] 1.0000000000 1.200092e-11 6.000461e-12 [152,] 1.0000000000 5.605864e-11 2.802932e-11 [153,] 0.9999999999 2.038746e-10 1.019373e-10 [154,] 0.9999999997 6.730435e-10 3.365218e-10 [155,] 0.9999999985 2.917623e-09 1.458812e-09 [156,] 0.9999999962 7.586170e-09 3.793085e-09 [157,] 0.9999999922 1.567108e-08 7.835542e-09 [158,] 0.9999999996 7.590355e-10 3.795177e-10 [159,] 0.9999999982 3.575386e-09 1.787693e-09 [160,] 0.9999999902 1.956371e-08 9.781855e-09 [161,] 0.9999999493 1.014925e-07 5.074626e-08 [162,] 0.9999997317 5.366887e-07 2.683444e-07 [163,] 0.9999988790 2.242024e-06 1.121012e-06 [164,] 0.9999968920 6.216083e-06 3.108041e-06 [165,] 0.9999845940 3.081202e-05 1.540601e-05 [166,] 0.9999503583 9.928338e-05 4.964169e-05 [167,] 0.9999751521 4.969573e-05 2.484786e-05 [168,] 0.9999783150 4.337000e-05 2.168500e-05 [169,] 0.9999343760 1.312480e-04 6.562400e-05 [170,] 0.9994191198 1.161760e-03 5.808802e-04 [171,] 0.9983794804 3.241039e-03 1.620520e-03 > postscript(file="/var/www/html/rcomp/tmp/13ijd1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2no7n1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3b8ax1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4wb171258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5e7q81258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 180 Frequency = 1 1 2 3 4 5 6 -1.345304808 -1.455491113 -1.326299261 -1.395740347 -1.495740347 -1.561951327 7 8 9 10 11 12 -1.102696545 -0.852261006 -0.624932199 -0.706422635 -0.670770570 -0.384186981 13 14 15 16 17 18 0.039911719 0.004259653 0.085750089 -0.024436216 -0.136485565 -0.194373286 19 20 21 22 23 24 0.407489760 1.418172048 1.429725414 1.478793891 1.382023998 1.568607587 25 26 27 28 29 30 1.525999323 1.566744542 1.369974649 1.320906171 1.297303455 1.299166500 31 32 33 34 35 36 1.573700739 2.036185628 2.046371932 1.773204755 1.506993776 1.340782797 37 38 39 40 41 42 1.350969101 1.220410188 0.979664969 0.764385513 0.396311488 0.240286813 43 44 45 46 47 48 0.699541595 1.245379965 1.399541595 1.314821052 1.342149858 1.237056706 49 50 51 52 53 54 1.591714319 1.450969101 1.327366385 1.132459537 0.761155406 0.510223883 55 56 57 58 59 60 0.871341710 1.371341710 1.396807472 1.446371932 1.195440410 1.182023998 61 62 63 64 65 66 0.969974649 0.801900624 0.337056706 0.035193661 0.098174533 0.179664969 67 68 69 70 71 72 0.656062253 1.235689644 1.218547142 0.855566270 0.716684097 0.579168986 73 74 75 76 77 78 0.307368870 0.370349743 0.412958006 0.562522467 0.540782797 0.303267685 79 80 81 82 83 84 0.318051159 0.617555175 0.911094961 0.631467570 0.088859307 -0.006047541 85 86 87 88 89 90 0.177305940 0.092585397 0.119914204 -0.110644710 -0.478718734 -0.729650257 91 92 93 94 95 96 -0.575488627 -0.243066669 -0.400458405 -0.644433730 -0.827291228 -0.718471985 97 98 99 100 101 102 -0.994869269 -1.213378833 -1.455491113 -1.667540463 -1.906422635 -1.705926652 103 104 105 106 107 108 -1.185554043 -0.639715672 -0.595244364 -0.893877302 -1.027666323 -1.538348611 109 110 111 112 113 114 -1.986050026 -2.160584265 -2.242074701 -1.685554043 -1.507293714 -1.914249911 115 116 117 118 119 120 -1.856858174 -1.646671870 -1.455491113 -0.709652742 -0.821702092 -0.696236331 121 122 123 124 125 126 -0.329529368 -0.667044479 -0.746671870 -1.384682965 -1.829154273 -2.158346125 127 128 129 130 131 132 -1.254620035 -1.164806339 -0.964806339 -0.749526882 -0.746296776 -0.508781664 133 134 135 136 137 138 -0.490272101 -0.320335031 -0.510148726 -0.752756989 -1.276855689 -0.981452858 139 140 141 142 143 144 -0.347663837 -0.094869269 -0.089776117 -0.201825467 -0.059217203 0.079664969 145 146 147 148 149 150 0.303267685 0.035193661 -0.531017319 -0.928658290 -0.877230784 -0.855491113 151 152 153 154 155 156 0.620906171 1.044508887 0.927366385 0.750098023 0.092210303 0.049602039 157 158 159 160 161 162 0.244508887 0.502396607 0.657054221 0.199166500 -0.028162306 -0.044808825 163 164 165 166 167 168 0.792706286 0.877426830 0.902892591 0.351465085 0.302396607 0.565377480 169 170 171 172 173 174 0.632955521 0.505626714 0.054199208 0.091714319 0.008856821 -0.454124051 175 176 177 178 179 180 -0.391639162 -0.476359705 -0.685178948 -0.790272101 -0.747663837 -0.671266553 > postscript(file="/var/www/html/rcomp/tmp/6maz01258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 180 Frequency = 1 lag(myerror, k = 1) myerror 0 -1.345304808 NA 1 -1.455491113 -1.345304808 2 -1.326299261 -1.455491113 3 -1.395740347 -1.326299261 4 -1.495740347 -1.395740347 5 -1.561951327 -1.495740347 6 -1.102696545 -1.561951327 7 -0.852261006 -1.102696545 8 -0.624932199 -0.852261006 9 -0.706422635 -0.624932199 10 -0.670770570 -0.706422635 11 -0.384186981 -0.670770570 12 0.039911719 -0.384186981 13 0.004259653 0.039911719 14 0.085750089 0.004259653 15 -0.024436216 0.085750089 16 -0.136485565 -0.024436216 17 -0.194373286 -0.136485565 18 0.407489760 -0.194373286 19 1.418172048 0.407489760 20 1.429725414 1.418172048 21 1.478793891 1.429725414 22 1.382023998 1.478793891 23 1.568607587 1.382023998 24 1.525999323 1.568607587 25 1.566744542 1.525999323 26 1.369974649 1.566744542 27 1.320906171 1.369974649 28 1.297303455 1.320906171 29 1.299166500 1.297303455 30 1.573700739 1.299166500 31 2.036185628 1.573700739 32 2.046371932 2.036185628 33 1.773204755 2.046371932 34 1.506993776 1.773204755 35 1.340782797 1.506993776 36 1.350969101 1.340782797 37 1.220410188 1.350969101 38 0.979664969 1.220410188 39 0.764385513 0.979664969 40 0.396311488 0.764385513 41 0.240286813 0.396311488 42 0.699541595 0.240286813 43 1.245379965 0.699541595 44 1.399541595 1.245379965 45 1.314821052 1.399541595 46 1.342149858 1.314821052 47 1.237056706 1.342149858 48 1.591714319 1.237056706 49 1.450969101 1.591714319 50 1.327366385 1.450969101 51 1.132459537 1.327366385 52 0.761155406 1.132459537 53 0.510223883 0.761155406 54 0.871341710 0.510223883 55 1.371341710 0.871341710 56 1.396807472 1.371341710 57 1.446371932 1.396807472 58 1.195440410 1.446371932 59 1.182023998 1.195440410 60 0.969974649 1.182023998 61 0.801900624 0.969974649 62 0.337056706 0.801900624 63 0.035193661 0.337056706 64 0.098174533 0.035193661 65 0.179664969 0.098174533 66 0.656062253 0.179664969 67 1.235689644 0.656062253 68 1.218547142 1.235689644 69 0.855566270 1.218547142 70 0.716684097 0.855566270 71 0.579168986 0.716684097 72 0.307368870 0.579168986 73 0.370349743 0.307368870 74 0.412958006 0.370349743 75 0.562522467 0.412958006 76 0.540782797 0.562522467 77 0.303267685 0.540782797 78 0.318051159 0.303267685 79 0.617555175 0.318051159 80 0.911094961 0.617555175 81 0.631467570 0.911094961 82 0.088859307 0.631467570 83 -0.006047541 0.088859307 84 0.177305940 -0.006047541 85 0.092585397 0.177305940 86 0.119914204 0.092585397 87 -0.110644710 0.119914204 88 -0.478718734 -0.110644710 89 -0.729650257 -0.478718734 90 -0.575488627 -0.729650257 91 -0.243066669 -0.575488627 92 -0.400458405 -0.243066669 93 -0.644433730 -0.400458405 94 -0.827291228 -0.644433730 95 -0.718471985 -0.827291228 96 -0.994869269 -0.718471985 97 -1.213378833 -0.994869269 98 -1.455491113 -1.213378833 99 -1.667540463 -1.455491113 100 -1.906422635 -1.667540463 101 -1.705926652 -1.906422635 102 -1.185554043 -1.705926652 103 -0.639715672 -1.185554043 104 -0.595244364 -0.639715672 105 -0.893877302 -0.595244364 106 -1.027666323 -0.893877302 107 -1.538348611 -1.027666323 108 -1.986050026 -1.538348611 109 -2.160584265 -1.986050026 110 -2.242074701 -2.160584265 111 -1.685554043 -2.242074701 112 -1.507293714 -1.685554043 113 -1.914249911 -1.507293714 114 -1.856858174 -1.914249911 115 -1.646671870 -1.856858174 116 -1.455491113 -1.646671870 117 -0.709652742 -1.455491113 118 -0.821702092 -0.709652742 119 -0.696236331 -0.821702092 120 -0.329529368 -0.696236331 121 -0.667044479 -0.329529368 122 -0.746671870 -0.667044479 123 -1.384682965 -0.746671870 124 -1.829154273 -1.384682965 125 -2.158346125 -1.829154273 126 -1.254620035 -2.158346125 127 -1.164806339 -1.254620035 128 -0.964806339 -1.164806339 129 -0.749526882 -0.964806339 130 -0.746296776 -0.749526882 131 -0.508781664 -0.746296776 132 -0.490272101 -0.508781664 133 -0.320335031 -0.490272101 134 -0.510148726 -0.320335031 135 -0.752756989 -0.510148726 136 -1.276855689 -0.752756989 137 -0.981452858 -1.276855689 138 -0.347663837 -0.981452858 139 -0.094869269 -0.347663837 140 -0.089776117 -0.094869269 141 -0.201825467 -0.089776117 142 -0.059217203 -0.201825467 143 0.079664969 -0.059217203 144 0.303267685 0.079664969 145 0.035193661 0.303267685 146 -0.531017319 0.035193661 147 -0.928658290 -0.531017319 148 -0.877230784 -0.928658290 149 -0.855491113 -0.877230784 150 0.620906171 -0.855491113 151 1.044508887 0.620906171 152 0.927366385 1.044508887 153 0.750098023 0.927366385 154 0.092210303 0.750098023 155 0.049602039 0.092210303 156 0.244508887 0.049602039 157 0.502396607 0.244508887 158 0.657054221 0.502396607 159 0.199166500 0.657054221 160 -0.028162306 0.199166500 161 -0.044808825 -0.028162306 162 0.792706286 -0.044808825 163 0.877426830 0.792706286 164 0.902892591 0.877426830 165 0.351465085 0.902892591 166 0.302396607 0.351465085 167 0.565377480 0.302396607 168 0.632955521 0.565377480 169 0.505626714 0.632955521 170 0.054199208 0.505626714 171 0.091714319 0.054199208 172 0.008856821 0.091714319 173 -0.454124051 0.008856821 174 -0.391639162 -0.454124051 175 -0.476359705 -0.391639162 176 -0.685178948 -0.476359705 177 -0.790272101 -0.685178948 178 -0.747663837 -0.790272101 179 -0.671266553 -0.747663837 180 NA -0.671266553 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.455491113 -1.345304808 [2,] -1.326299261 -1.455491113 [3,] -1.395740347 -1.326299261 [4,] -1.495740347 -1.395740347 [5,] -1.561951327 -1.495740347 [6,] -1.102696545 -1.561951327 [7,] -0.852261006 -1.102696545 [8,] -0.624932199 -0.852261006 [9,] -0.706422635 -0.624932199 [10,] -0.670770570 -0.706422635 [11,] -0.384186981 -0.670770570 [12,] 0.039911719 -0.384186981 [13,] 0.004259653 0.039911719 [14,] 0.085750089 0.004259653 [15,] -0.024436216 0.085750089 [16,] -0.136485565 -0.024436216 [17,] -0.194373286 -0.136485565 [18,] 0.407489760 -0.194373286 [19,] 1.418172048 0.407489760 [20,] 1.429725414 1.418172048 [21,] 1.478793891 1.429725414 [22,] 1.382023998 1.478793891 [23,] 1.568607587 1.382023998 [24,] 1.525999323 1.568607587 [25,] 1.566744542 1.525999323 [26,] 1.369974649 1.566744542 [27,] 1.320906171 1.369974649 [28,] 1.297303455 1.320906171 [29,] 1.299166500 1.297303455 [30,] 1.573700739 1.299166500 [31,] 2.036185628 1.573700739 [32,] 2.046371932 2.036185628 [33,] 1.773204755 2.046371932 [34,] 1.506993776 1.773204755 [35,] 1.340782797 1.506993776 [36,] 1.350969101 1.340782797 [37,] 1.220410188 1.350969101 [38,] 0.979664969 1.220410188 [39,] 0.764385513 0.979664969 [40,] 0.396311488 0.764385513 [41,] 0.240286813 0.396311488 [42,] 0.699541595 0.240286813 [43,] 1.245379965 0.699541595 [44,] 1.399541595 1.245379965 [45,] 1.314821052 1.399541595 [46,] 1.342149858 1.314821052 [47,] 1.237056706 1.342149858 [48,] 1.591714319 1.237056706 [49,] 1.450969101 1.591714319 [50,] 1.327366385 1.450969101 [51,] 1.132459537 1.327366385 [52,] 0.761155406 1.132459537 [53,] 0.510223883 0.761155406 [54,] 0.871341710 0.510223883 [55,] 1.371341710 0.871341710 [56,] 1.396807472 1.371341710 [57,] 1.446371932 1.396807472 [58,] 1.195440410 1.446371932 [59,] 1.182023998 1.195440410 [60,] 0.969974649 1.182023998 [61,] 0.801900624 0.969974649 [62,] 0.337056706 0.801900624 [63,] 0.035193661 0.337056706 [64,] 0.098174533 0.035193661 [65,] 0.179664969 0.098174533 [66,] 0.656062253 0.179664969 [67,] 1.235689644 0.656062253 [68,] 1.218547142 1.235689644 [69,] 0.855566270 1.218547142 [70,] 0.716684097 0.855566270 [71,] 0.579168986 0.716684097 [72,] 0.307368870 0.579168986 [73,] 0.370349743 0.307368870 [74,] 0.412958006 0.370349743 [75,] 0.562522467 0.412958006 [76,] 0.540782797 0.562522467 [77,] 0.303267685 0.540782797 [78,] 0.318051159 0.303267685 [79,] 0.617555175 0.318051159 [80,] 0.911094961 0.617555175 [81,] 0.631467570 0.911094961 [82,] 0.088859307 0.631467570 [83,] -0.006047541 0.088859307 [84,] 0.177305940 -0.006047541 [85,] 0.092585397 0.177305940 [86,] 0.119914204 0.092585397 [87,] -0.110644710 0.119914204 [88,] -0.478718734 -0.110644710 [89,] -0.729650257 -0.478718734 [90,] -0.575488627 -0.729650257 [91,] -0.243066669 -0.575488627 [92,] -0.400458405 -0.243066669 [93,] -0.644433730 -0.400458405 [94,] -0.827291228 -0.644433730 [95,] -0.718471985 -0.827291228 [96,] -0.994869269 -0.718471985 [97,] -1.213378833 -0.994869269 [98,] -1.455491113 -1.213378833 [99,] -1.667540463 -1.455491113 [100,] -1.906422635 -1.667540463 [101,] -1.705926652 -1.906422635 [102,] -1.185554043 -1.705926652 [103,] -0.639715672 -1.185554043 [104,] -0.595244364 -0.639715672 [105,] -0.893877302 -0.595244364 [106,] -1.027666323 -0.893877302 [107,] -1.538348611 -1.027666323 [108,] -1.986050026 -1.538348611 [109,] -2.160584265 -1.986050026 [110,] -2.242074701 -2.160584265 [111,] -1.685554043 -2.242074701 [112,] -1.507293714 -1.685554043 [113,] -1.914249911 -1.507293714 [114,] -1.856858174 -1.914249911 [115,] -1.646671870 -1.856858174 [116,] -1.455491113 -1.646671870 [117,] -0.709652742 -1.455491113 [118,] -0.821702092 -0.709652742 [119,] -0.696236331 -0.821702092 [120,] -0.329529368 -0.696236331 [121,] -0.667044479 -0.329529368 [122,] -0.746671870 -0.667044479 [123,] -1.384682965 -0.746671870 [124,] -1.829154273 -1.384682965 [125,] -2.158346125 -1.829154273 [126,] -1.254620035 -2.158346125 [127,] -1.164806339 -1.254620035 [128,] -0.964806339 -1.164806339 [129,] -0.749526882 -0.964806339 [130,] -0.746296776 -0.749526882 [131,] -0.508781664 -0.746296776 [132,] -0.490272101 -0.508781664 [133,] -0.320335031 -0.490272101 [134,] -0.510148726 -0.320335031 [135,] -0.752756989 -0.510148726 [136,] -1.276855689 -0.752756989 [137,] -0.981452858 -1.276855689 [138,] -0.347663837 -0.981452858 [139,] -0.094869269 -0.347663837 [140,] -0.089776117 -0.094869269 [141,] -0.201825467 -0.089776117 [142,] -0.059217203 -0.201825467 [143,] 0.079664969 -0.059217203 [144,] 0.303267685 0.079664969 [145,] 0.035193661 0.303267685 [146,] -0.531017319 0.035193661 [147,] -0.928658290 -0.531017319 [148,] -0.877230784 -0.928658290 [149,] -0.855491113 -0.877230784 [150,] 0.620906171 -0.855491113 [151,] 1.044508887 0.620906171 [152,] 0.927366385 1.044508887 [153,] 0.750098023 0.927366385 [154,] 0.092210303 0.750098023 [155,] 0.049602039 0.092210303 [156,] 0.244508887 0.049602039 [157,] 0.502396607 0.244508887 [158,] 0.657054221 0.502396607 [159,] 0.199166500 0.657054221 [160,] -0.028162306 0.199166500 [161,] -0.044808825 -0.028162306 [162,] 0.792706286 -0.044808825 [163,] 0.877426830 0.792706286 [164,] 0.902892591 0.877426830 [165,] 0.351465085 0.902892591 [166,] 0.302396607 0.351465085 [167,] 0.565377480 0.302396607 [168,] 0.632955521 0.565377480 [169,] 0.505626714 0.632955521 [170,] 0.054199208 0.505626714 [171,] 0.091714319 0.054199208 [172,] 0.008856821 0.091714319 [173,] -0.454124051 0.008856821 [174,] -0.391639162 -0.454124051 [175,] -0.476359705 -0.391639162 [176,] -0.685178948 -0.476359705 [177,] -0.790272101 -0.685178948 [178,] -0.747663837 -0.790272101 [179,] -0.671266553 -0.747663837 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.455491113 -1.345304808 2 -1.326299261 -1.455491113 3 -1.395740347 -1.326299261 4 -1.495740347 -1.395740347 5 -1.561951327 -1.495740347 6 -1.102696545 -1.561951327 7 -0.852261006 -1.102696545 8 -0.624932199 -0.852261006 9 -0.706422635 -0.624932199 10 -0.670770570 -0.706422635 11 -0.384186981 -0.670770570 12 0.039911719 -0.384186981 13 0.004259653 0.039911719 14 0.085750089 0.004259653 15 -0.024436216 0.085750089 16 -0.136485565 -0.024436216 17 -0.194373286 -0.136485565 18 0.407489760 -0.194373286 19 1.418172048 0.407489760 20 1.429725414 1.418172048 21 1.478793891 1.429725414 22 1.382023998 1.478793891 23 1.568607587 1.382023998 24 1.525999323 1.568607587 25 1.566744542 1.525999323 26 1.369974649 1.566744542 27 1.320906171 1.369974649 28 1.297303455 1.320906171 29 1.299166500 1.297303455 30 1.573700739 1.299166500 31 2.036185628 1.573700739 32 2.046371932 2.036185628 33 1.773204755 2.046371932 34 1.506993776 1.773204755 35 1.340782797 1.506993776 36 1.350969101 1.340782797 37 1.220410188 1.350969101 38 0.979664969 1.220410188 39 0.764385513 0.979664969 40 0.396311488 0.764385513 41 0.240286813 0.396311488 42 0.699541595 0.240286813 43 1.245379965 0.699541595 44 1.399541595 1.245379965 45 1.314821052 1.399541595 46 1.342149858 1.314821052 47 1.237056706 1.342149858 48 1.591714319 1.237056706 49 1.450969101 1.591714319 50 1.327366385 1.450969101 51 1.132459537 1.327366385 52 0.761155406 1.132459537 53 0.510223883 0.761155406 54 0.871341710 0.510223883 55 1.371341710 0.871341710 56 1.396807472 1.371341710 57 1.446371932 1.396807472 58 1.195440410 1.446371932 59 1.182023998 1.195440410 60 0.969974649 1.182023998 61 0.801900624 0.969974649 62 0.337056706 0.801900624 63 0.035193661 0.337056706 64 0.098174533 0.035193661 65 0.179664969 0.098174533 66 0.656062253 0.179664969 67 1.235689644 0.656062253 68 1.218547142 1.235689644 69 0.855566270 1.218547142 70 0.716684097 0.855566270 71 0.579168986 0.716684097 72 0.307368870 0.579168986 73 0.370349743 0.307368870 74 0.412958006 0.370349743 75 0.562522467 0.412958006 76 0.540782797 0.562522467 77 0.303267685 0.540782797 78 0.318051159 0.303267685 79 0.617555175 0.318051159 80 0.911094961 0.617555175 81 0.631467570 0.911094961 82 0.088859307 0.631467570 83 -0.006047541 0.088859307 84 0.177305940 -0.006047541 85 0.092585397 0.177305940 86 0.119914204 0.092585397 87 -0.110644710 0.119914204 88 -0.478718734 -0.110644710 89 -0.729650257 -0.478718734 90 -0.575488627 -0.729650257 91 -0.243066669 -0.575488627 92 -0.400458405 -0.243066669 93 -0.644433730 -0.400458405 94 -0.827291228 -0.644433730 95 -0.718471985 -0.827291228 96 -0.994869269 -0.718471985 97 -1.213378833 -0.994869269 98 -1.455491113 -1.213378833 99 -1.667540463 -1.455491113 100 -1.906422635 -1.667540463 101 -1.705926652 -1.906422635 102 -1.185554043 -1.705926652 103 -0.639715672 -1.185554043 104 -0.595244364 -0.639715672 105 -0.893877302 -0.595244364 106 -1.027666323 -0.893877302 107 -1.538348611 -1.027666323 108 -1.986050026 -1.538348611 109 -2.160584265 -1.986050026 110 -2.242074701 -2.160584265 111 -1.685554043 -2.242074701 112 -1.507293714 -1.685554043 113 -1.914249911 -1.507293714 114 -1.856858174 -1.914249911 115 -1.646671870 -1.856858174 116 -1.455491113 -1.646671870 117 -0.709652742 -1.455491113 118 -0.821702092 -0.709652742 119 -0.696236331 -0.821702092 120 -0.329529368 -0.696236331 121 -0.667044479 -0.329529368 122 -0.746671870 -0.667044479 123 -1.384682965 -0.746671870 124 -1.829154273 -1.384682965 125 -2.158346125 -1.829154273 126 -1.254620035 -2.158346125 127 -1.164806339 -1.254620035 128 -0.964806339 -1.164806339 129 -0.749526882 -0.964806339 130 -0.746296776 -0.749526882 131 -0.508781664 -0.746296776 132 -0.490272101 -0.508781664 133 -0.320335031 -0.490272101 134 -0.510148726 -0.320335031 135 -0.752756989 -0.510148726 136 -1.276855689 -0.752756989 137 -0.981452858 -1.276855689 138 -0.347663837 -0.981452858 139 -0.094869269 -0.347663837 140 -0.089776117 -0.094869269 141 -0.201825467 -0.089776117 142 -0.059217203 -0.201825467 143 0.079664969 -0.059217203 144 0.303267685 0.079664969 145 0.035193661 0.303267685 146 -0.531017319 0.035193661 147 -0.928658290 -0.531017319 148 -0.877230784 -0.928658290 149 -0.855491113 -0.877230784 150 0.620906171 -0.855491113 151 1.044508887 0.620906171 152 0.927366385 1.044508887 153 0.750098023 0.927366385 154 0.092210303 0.750098023 155 0.049602039 0.092210303 156 0.244508887 0.049602039 157 0.502396607 0.244508887 158 0.657054221 0.502396607 159 0.199166500 0.657054221 160 -0.028162306 0.199166500 161 -0.044808825 -0.028162306 162 0.792706286 -0.044808825 163 0.877426830 0.792706286 164 0.902892591 0.877426830 165 0.351465085 0.902892591 166 0.302396607 0.351465085 167 0.565377480 0.302396607 168 0.632955521 0.565377480 169 0.505626714 0.632955521 170 0.054199208 0.505626714 171 0.091714319 0.054199208 172 0.008856821 0.091714319 173 -0.454124051 0.008856821 174 -0.391639162 -0.454124051 175 -0.476359705 -0.391639162 176 -0.685178948 -0.476359705 177 -0.790272101 -0.685178948 178 -0.747663837 -0.790272101 179 -0.671266553 -0.747663837 > 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/7akbk1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/80sud1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9ab0r1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10pzms1258721717.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11k4mi1258721718.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/12egjr1258721718.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/132rjp1258721718.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/14u9kc1258721718.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/159k341258721718.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/16ahx71258721718.tab") + } > system("convert tmp/13ijd1258721717.ps tmp/13ijd1258721717.png") > system("convert tmp/2no7n1258721717.ps tmp/2no7n1258721717.png") > system("convert tmp/3b8ax1258721717.ps tmp/3b8ax1258721717.png") > system("convert tmp/4wb171258721717.ps tmp/4wb171258721717.png") > system("convert tmp/5e7q81258721717.ps tmp/5e7q81258721717.png") > system("convert tmp/6maz01258721717.ps tmp/6maz01258721717.png") > system("convert tmp/7akbk1258721717.ps tmp/7akbk1258721717.png") > system("convert tmp/80sud1258721717.ps tmp/80sud1258721717.png") > system("convert tmp/9ab0r1258721717.ps tmp/9ab0r1258721717.png") > system("convert tmp/10pzms1258721717.ps tmp/10pzms1258721717.png") > > > proc.time() user system elapsed 4.222 1.712 9.229