R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(8.64 + ,8.89 + ,8.87 + ,8.81 + ,8.87 + ,9.06 + ,9.12 + ,8.66 + ,8.17 + ,8.04 + ,7.71 + ,7.55 + ,7.52 + ,7.38 + ,7.52 + ,7.31 + ,6.92 + ,7.09 + ,7.05 + ,7.37 + ,7.05 + ,6.79 + ,6.35 + ,6.44 + ,6.89 + ,7.16 + ,7.46 + ,7.91 + ,7.86 + ,8.02 + ,8.38 + ,8.50 + ,8.40 + ,8.24 + ,8.33 + ,8.28 + ,8.15 + ,8.06 + ,7.79 + ,7.28 + ,7.52 + ,7.23 + ,7.13 + ,7.21 + ,6.99 + ,6.77 + ,6.69 + ,6.39 + ,6.85 + ,6.74 + ,6.56 + ,6.62 + ,6.71 + ,6.67 + ,6.54 + ,6.14 + ,6.13 + ,5.86 + ,5.88 + ,5.75 + ,5.53 + ,5.86 + ,5.90 + ,5.95 + ,5.69 + ,5.53 + ,5.71 + ,5.60 + ,5.73 + ,5.60 + ,5.41 + ,5.13 + ,5.00 + ,5.04 + ,5.10 + ,4.96 + ,4.90 + ,4.80 + ,4.48 + ,4.29 + ,4.27 + ,4.18 + ,4.02 + ,3.82 + ,4.13 + ,4.16 + ,3.98 + ,4.26 + ,4.70 + ,4.96 + ,5.13 + ,5.35 + ,5.41 + ,5.42 + ,5.51 + ,5.75 + ,5.67 + ,5.46 + ,5.56 + ,5.56 + ,5.54 + ,5.53 + ,5.65 + ,5.58 + ,5.57 + ,5.36 + ,5.23 + ,5.11 + ,5.07 + ,5.04 + ,5.34 + ,5.43 + ,5.31 + ,5.12 + ,4.97 + ,5.00 + ,4.64 + ,4.80 + ,5.10 + ,5.11 + ,5.12 + ,5.36 + ,5.26 + ,5.27 + ,5.10 + ,4.94 + ,4.68 + ,4.41 + ,4.60 + ,4.53 + ,4.18 + ,4.00 + ,3.87 + ,4.09 + ,4.13 + ,3.74 + ,3.81 + ,4.11 + ,4.14 + ,3.99 + ,4.28 + ,4.37 + ,4.24 + ,4.19 + ,4.01 + ,3.95 + ,4.30 + ,4.37 + ,4.40 + ,4.29 + ,4.12 + ,4.07 + ,3.93 + ,3.79 + ,3.67 + ,3.53 + ,3.69 + ,3.69 + ,3.48 + ,3.31 + ,3.16 + ,3.25 + ,3.14 + ,3.19 + ,3.43 + ,3.45 + ,3.31 + ,3.51 + ,3.53 + ,3.83 + ,4.02 + ,3.99 + ,4.11 + ,3.96 + ,3.83 + ,3.71 + ,3.81 + ,3.73 + ,3.99 + ,4.17 + ,4.00 + ,4.10 + ,4.24 + ,4.45 + ,4.62 + ,4.49 + ,4.45 + ,4.49 + ,4.36 + ,4.32 + ,4.45 + ,4.13 + ,4.14 + ,4.30 + ,4.42 + ,4.67 + ,4.96 + ,4.73 + ,4.52 + ,4.36 + ,4.15 + ,3.92 + ,3.88 + ,4.20 + ,3.95 + ,3.78 + ,3.69 + ,3.77 + ,3.66 + ,3.53 + ,3.50 + ,3.14 + ,3.42 + ,3.30 + ,2.81 + ,3.15 + ,3.37 + ,4.05 + ,4.00 + ,4.20 + ,4.21 + ,4.24 + ,4.24 + ,4.17 + ,4.12 + ,4.35 + ,3.98 + ,3.62 + ,4.39 + ,5.01 + ,4.07 + ,3.70 + ,3.59 + ,3.44 + ,3.33 + ,2.98 + ,3.14 + ,2.55 + ,2.49 + ,2.53 + ,2.43) + ,dim=c(1 + ,241) + ,dimnames=list(c('OLO') + ,1:241)) > y <- array(NA,dim=c(1,241),dimnames=list(c('OLO'),1:241)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '1' > par3 <- 'Linear Trend' > par2 <- 'Include Monthly Dummies' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 OLO M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 8.64 1 0 0 0 0 0 0 0 0 0 0 1 2 8.89 0 1 0 0 0 0 0 0 0 0 0 2 3 8.87 0 0 1 0 0 0 0 0 0 0 0 3 4 8.81 0 0 0 1 0 0 0 0 0 0 0 4 5 8.87 0 0 0 0 1 0 0 0 0 0 0 5 6 9.06 0 0 0 0 0 1 0 0 0 0 0 6 7 9.12 0 0 0 0 0 0 1 0 0 0 0 7 8 8.66 0 0 0 0 0 0 0 1 0 0 0 8 9 8.17 0 0 0 0 0 0 0 0 1 0 0 9 10 8.04 0 0 0 0 0 0 0 0 0 1 0 10 11 7.71 0 0 0 0 0 0 0 0 0 0 1 11 12 7.55 0 0 0 0 0 0 0 0 0 0 0 12 13 7.52 1 0 0 0 0 0 0 0 0 0 0 13 14 7.38 0 1 0 0 0 0 0 0 0 0 0 14 15 7.52 0 0 1 0 0 0 0 0 0 0 0 15 16 7.31 0 0 0 1 0 0 0 0 0 0 0 16 17 6.92 0 0 0 0 1 0 0 0 0 0 0 17 18 7.09 0 0 0 0 0 1 0 0 0 0 0 18 19 7.05 0 0 0 0 0 0 1 0 0 0 0 19 20 7.37 0 0 0 0 0 0 0 1 0 0 0 20 21 7.05 0 0 0 0 0 0 0 0 1 0 0 21 22 6.79 0 0 0 0 0 0 0 0 0 1 0 22 23 6.35 0 0 0 0 0 0 0 0 0 0 1 23 24 6.44 0 0 0 0 0 0 0 0 0 0 0 24 25 6.89 1 0 0 0 0 0 0 0 0 0 0 25 26 7.16 0 1 0 0 0 0 0 0 0 0 0 26 27 7.46 0 0 1 0 0 0 0 0 0 0 0 27 28 7.91 0 0 0 1 0 0 0 0 0 0 0 28 29 7.86 0 0 0 0 1 0 0 0 0 0 0 29 30 8.02 0 0 0 0 0 1 0 0 0 0 0 30 31 8.38 0 0 0 0 0 0 1 0 0 0 0 31 32 8.50 0 0 0 0 0 0 0 1 0 0 0 32 33 8.40 0 0 0 0 0 0 0 0 1 0 0 33 34 8.24 0 0 0 0 0 0 0 0 0 1 0 34 35 8.33 0 0 0 0 0 0 0 0 0 0 1 35 36 8.28 0 0 0 0 0 0 0 0 0 0 0 36 37 8.15 1 0 0 0 0 0 0 0 0 0 0 37 38 8.06 0 1 0 0 0 0 0 0 0 0 0 38 39 7.79 0 0 1 0 0 0 0 0 0 0 0 39 40 7.28 0 0 0 1 0 0 0 0 0 0 0 40 41 7.52 0 0 0 0 1 0 0 0 0 0 0 41 42 7.23 0 0 0 0 0 1 0 0 0 0 0 42 43 7.13 0 0 0 0 0 0 1 0 0 0 0 43 44 7.21 0 0 0 0 0 0 0 1 0 0 0 44 45 6.99 0 0 0 0 0 0 0 0 1 0 0 45 46 6.77 0 0 0 0 0 0 0 0 0 1 0 46 47 6.69 0 0 0 0 0 0 0 0 0 0 1 47 48 6.39 0 0 0 0 0 0 0 0 0 0 0 48 49 6.85 1 0 0 0 0 0 0 0 0 0 0 49 50 6.74 0 1 0 0 0 0 0 0 0 0 0 50 51 6.56 0 0 1 0 0 0 0 0 0 0 0 51 52 6.62 0 0 0 1 0 0 0 0 0 0 0 52 53 6.71 0 0 0 0 1 0 0 0 0 0 0 53 54 6.67 0 0 0 0 0 1 0 0 0 0 0 54 55 6.54 0 0 0 0 0 0 1 0 0 0 0 55 56 6.14 0 0 0 0 0 0 0 1 0 0 0 56 57 6.13 0 0 0 0 0 0 0 0 1 0 0 57 58 5.86 0 0 0 0 0 0 0 0 0 1 0 58 59 5.88 0 0 0 0 0 0 0 0 0 0 1 59 60 5.75 0 0 0 0 0 0 0 0 0 0 0 60 61 5.53 1 0 0 0 0 0 0 0 0 0 0 61 62 5.86 0 1 0 0 0 0 0 0 0 0 0 62 63 5.90 0 0 1 0 0 0 0 0 0 0 0 63 64 5.95 0 0 0 1 0 0 0 0 0 0 0 64 65 5.69 0 0 0 0 1 0 0 0 0 0 0 65 66 5.53 0 0 0 0 0 1 0 0 0 0 0 66 67 5.71 0 0 0 0 0 0 1 0 0 0 0 67 68 5.60 0 0 0 0 0 0 0 1 0 0 0 68 69 5.73 0 0 0 0 0 0 0 0 1 0 0 69 70 5.60 0 0 0 0 0 0 0 0 0 1 0 70 71 5.41 0 0 0 0 0 0 0 0 0 0 1 71 72 5.13 0 0 0 0 0 0 0 0 0 0 0 72 73 5.00 1 0 0 0 0 0 0 0 0 0 0 73 74 5.04 0 1 0 0 0 0 0 0 0 0 0 74 75 5.10 0 0 1 0 0 0 0 0 0 0 0 75 76 4.96 0 0 0 1 0 0 0 0 0 0 0 76 77 4.90 0 0 0 0 1 0 0 0 0 0 0 77 78 4.80 0 0 0 0 0 1 0 0 0 0 0 78 79 4.48 0 0 0 0 0 0 1 0 0 0 0 79 80 4.29 0 0 0 0 0 0 0 1 0 0 0 80 81 4.27 0 0 0 0 0 0 0 0 1 0 0 81 82 4.18 0 0 0 0 0 0 0 0 0 1 0 82 83 4.02 0 0 0 0 0 0 0 0 0 0 1 83 84 3.82 0 0 0 0 0 0 0 0 0 0 0 84 85 4.13 1 0 0 0 0 0 0 0 0 0 0 85 86 4.16 0 1 0 0 0 0 0 0 0 0 0 86 87 3.98 0 0 1 0 0 0 0 0 0 0 0 87 88 4.26 0 0 0 1 0 0 0 0 0 0 0 88 89 4.70 0 0 0 0 1 0 0 0 0 0 0 89 90 4.96 0 0 0 0 0 1 0 0 0 0 0 90 91 5.13 0 0 0 0 0 0 1 0 0 0 0 91 92 5.35 0 0 0 0 0 0 0 1 0 0 0 92 93 5.41 0 0 0 0 0 0 0 0 1 0 0 93 94 5.42 0 0 0 0 0 0 0 0 0 1 0 94 95 5.51 0 0 0 0 0 0 0 0 0 0 1 95 96 5.75 0 0 0 0 0 0 0 0 0 0 0 96 97 5.67 1 0 0 0 0 0 0 0 0 0 0 97 98 5.46 0 1 0 0 0 0 0 0 0 0 0 98 99 5.56 0 0 1 0 0 0 0 0 0 0 0 99 100 5.56 0 0 0 1 0 0 0 0 0 0 0 100 101 5.54 0 0 0 0 1 0 0 0 0 0 0 101 102 5.53 0 0 0 0 0 1 0 0 0 0 0 102 103 5.65 0 0 0 0 0 0 1 0 0 0 0 103 104 5.58 0 0 0 0 0 0 0 1 0 0 0 104 105 5.57 0 0 0 0 0 0 0 0 1 0 0 105 106 5.36 0 0 0 0 0 0 0 0 0 1 0 106 107 5.23 0 0 0 0 0 0 0 0 0 0 1 107 108 5.11 0 0 0 0 0 0 0 0 0 0 0 108 109 5.07 1 0 0 0 0 0 0 0 0 0 0 109 110 5.04 0 1 0 0 0 0 0 0 0 0 0 110 111 5.34 0 0 1 0 0 0 0 0 0 0 0 111 112 5.43 0 0 0 1 0 0 0 0 0 0 0 112 113 5.31 0 0 0 0 1 0 0 0 0 0 0 113 114 5.12 0 0 0 0 0 1 0 0 0 0 0 114 115 4.97 0 0 0 0 0 0 1 0 0 0 0 115 116 5.00 0 0 0 0 0 0 0 1 0 0 0 116 117 4.64 0 0 0 0 0 0 0 0 1 0 0 117 118 4.80 0 0 0 0 0 0 0 0 0 1 0 118 119 5.10 0 0 0 0 0 0 0 0 0 0 1 119 120 5.11 0 0 0 0 0 0 0 0 0 0 0 120 121 5.12 1 0 0 0 0 0 0 0 0 0 0 121 122 5.36 0 1 0 0 0 0 0 0 0 0 0 122 123 5.26 0 0 1 0 0 0 0 0 0 0 0 123 124 5.27 0 0 0 1 0 0 0 0 0 0 0 124 125 5.10 0 0 0 0 1 0 0 0 0 0 0 125 126 4.94 0 0 0 0 0 1 0 0 0 0 0 126 127 4.68 0 0 0 0 0 0 1 0 0 0 0 127 128 4.41 0 0 0 0 0 0 0 1 0 0 0 128 129 4.60 0 0 0 0 0 0 0 0 1 0 0 129 130 4.53 0 0 0 0 0 0 0 0 0 1 0 130 131 4.18 0 0 0 0 0 0 0 0 0 0 1 131 132 4.00 0 0 0 0 0 0 0 0 0 0 0 132 133 3.87 1 0 0 0 0 0 0 0 0 0 0 133 134 4.09 0 1 0 0 0 0 0 0 0 0 0 134 135 4.13 0 0 1 0 0 0 0 0 0 0 0 135 136 3.74 0 0 0 1 0 0 0 0 0 0 0 136 137 3.81 0 0 0 0 1 0 0 0 0 0 0 137 138 4.11 0 0 0 0 0 1 0 0 0 0 0 138 139 4.14 0 0 0 0 0 0 1 0 0 0 0 139 140 3.99 0 0 0 0 0 0 0 1 0 0 0 140 141 4.28 0 0 0 0 0 0 0 0 1 0 0 141 142 4.37 0 0 0 0 0 0 0 0 0 1 0 142 143 4.24 0 0 0 0 0 0 0 0 0 0 1 143 144 4.19 0 0 0 0 0 0 0 0 0 0 0 144 145 4.01 1 0 0 0 0 0 0 0 0 0 0 145 146 3.95 0 1 0 0 0 0 0 0 0 0 0 146 147 4.30 0 0 1 0 0 0 0 0 0 0 0 147 148 4.37 0 0 0 1 0 0 0 0 0 0 0 148 149 4.40 0 0 0 0 1 0 0 0 0 0 0 149 150 4.29 0 0 0 0 0 1 0 0 0 0 0 150 151 4.12 0 0 0 0 0 0 1 0 0 0 0 151 152 4.07 0 0 0 0 0 0 0 1 0 0 0 152 153 3.93 0 0 0 0 0 0 0 0 1 0 0 153 154 3.79 0 0 0 0 0 0 0 0 0 1 0 154 155 3.67 0 0 0 0 0 0 0 0 0 0 1 155 156 3.53 0 0 0 0 0 0 0 0 0 0 0 156 157 3.69 1 0 0 0 0 0 0 0 0 0 0 157 158 3.69 0 1 0 0 0 0 0 0 0 0 0 158 159 3.48 0 0 1 0 0 0 0 0 0 0 0 159 160 3.31 0 0 0 1 0 0 0 0 0 0 0 160 161 3.16 0 0 0 0 1 0 0 0 0 0 0 161 162 3.25 0 0 0 0 0 1 0 0 0 0 0 162 163 3.14 0 0 0 0 0 0 1 0 0 0 0 163 164 3.19 0 0 0 0 0 0 0 1 0 0 0 164 165 3.43 0 0 0 0 0 0 0 0 1 0 0 165 166 3.45 0 0 0 0 0 0 0 0 0 1 0 166 167 3.31 0 0 0 0 0 0 0 0 0 0 1 167 168 3.51 0 0 0 0 0 0 0 0 0 0 0 168 169 3.53 1 0 0 0 0 0 0 0 0 0 0 169 170 3.83 0 1 0 0 0 0 0 0 0 0 0 170 171 4.02 0 0 1 0 0 0 0 0 0 0 0 171 172 3.99 0 0 0 1 0 0 0 0 0 0 0 172 173 4.11 0 0 0 0 1 0 0 0 0 0 0 173 174 3.96 0 0 0 0 0 1 0 0 0 0 0 174 175 3.83 0 0 0 0 0 0 1 0 0 0 0 175 176 3.71 0 0 0 0 0 0 0 1 0 0 0 176 177 3.81 0 0 0 0 0 0 0 0 1 0 0 177 178 3.73 0 0 0 0 0 0 0 0 0 1 0 178 179 3.99 0 0 0 0 0 0 0 0 0 0 1 179 180 4.17 0 0 0 0 0 0 0 0 0 0 0 180 181 4.00 1 0 0 0 0 0 0 0 0 0 0 181 182 4.10 0 1 0 0 0 0 0 0 0 0 0 182 183 4.24 0 0 1 0 0 0 0 0 0 0 0 183 184 4.45 0 0 0 1 0 0 0 0 0 0 0 184 185 4.62 0 0 0 0 1 0 0 0 0 0 0 185 186 4.49 0 0 0 0 0 1 0 0 0 0 0 186 187 4.45 0 0 0 0 0 0 1 0 0 0 0 187 188 4.49 0 0 0 0 0 0 0 1 0 0 0 188 189 4.36 0 0 0 0 0 0 0 0 1 0 0 189 190 4.32 0 0 0 0 0 0 0 0 0 1 0 190 191 4.45 0 0 0 0 0 0 0 0 0 0 1 191 192 4.13 0 0 0 0 0 0 0 0 0 0 0 192 193 4.14 1 0 0 0 0 0 0 0 0 0 0 193 194 4.30 0 1 0 0 0 0 0 0 0 0 0 194 195 4.42 0 0 1 0 0 0 0 0 0 0 0 195 196 4.67 0 0 0 1 0 0 0 0 0 0 0 196 197 4.96 0 0 0 0 1 0 0 0 0 0 0 197 198 4.73 0 0 0 0 0 1 0 0 0 0 0 198 199 4.52 0 0 0 0 0 0 1 0 0 0 0 199 200 4.36 0 0 0 0 0 0 0 1 0 0 0 200 201 4.15 0 0 0 0 0 0 0 0 1 0 0 201 202 3.92 0 0 0 0 0 0 0 0 0 1 0 202 203 3.88 0 0 0 0 0 0 0 0 0 0 1 203 204 4.20 0 0 0 0 0 0 0 0 0 0 0 204 205 3.95 1 0 0 0 0 0 0 0 0 0 0 205 206 3.78 0 1 0 0 0 0 0 0 0 0 0 206 207 3.69 0 0 1 0 0 0 0 0 0 0 0 207 208 3.77 0 0 0 1 0 0 0 0 0 0 0 208 209 3.66 0 0 0 0 1 0 0 0 0 0 0 209 210 3.53 0 0 0 0 0 1 0 0 0 0 0 210 211 3.50 0 0 0 0 0 0 1 0 0 0 0 211 212 3.14 0 0 0 0 0 0 0 1 0 0 0 212 213 3.42 0 0 0 0 0 0 0 0 1 0 0 213 214 3.30 0 0 0 0 0 0 0 0 0 1 0 214 215 2.81 0 0 0 0 0 0 0 0 0 0 1 215 216 3.15 0 0 0 0 0 0 0 0 0 0 0 216 217 3.37 1 0 0 0 0 0 0 0 0 0 0 217 218 4.05 0 1 0 0 0 0 0 0 0 0 0 218 219 4.00 0 0 1 0 0 0 0 0 0 0 0 219 220 4.20 0 0 0 1 0 0 0 0 0 0 0 220 221 4.21 0 0 0 0 1 0 0 0 0 0 0 221 222 4.24 0 0 0 0 0 1 0 0 0 0 0 222 223 4.24 0 0 0 0 0 0 1 0 0 0 0 223 224 4.17 0 0 0 0 0 0 0 1 0 0 0 224 225 4.12 0 0 0 0 0 0 0 0 1 0 0 225 226 4.35 0 0 0 0 0 0 0 0 0 1 0 226 227 3.98 0 0 0 0 0 0 0 0 0 0 1 227 228 3.62 0 0 0 0 0 0 0 0 0 0 0 228 229 4.39 1 0 0 0 0 0 0 0 0 0 0 229 230 5.01 0 1 0 0 0 0 0 0 0 0 0 230 231 4.07 0 0 1 0 0 0 0 0 0 0 0 231 232 3.70 0 0 0 1 0 0 0 0 0 0 0 232 233 3.59 0 0 0 0 1 0 0 0 0 0 0 233 234 3.44 0 0 0 0 0 1 0 0 0 0 0 234 235 3.33 0 0 0 0 0 0 1 0 0 0 0 235 236 2.98 0 0 0 0 0 0 0 1 0 0 0 236 237 3.14 0 0 0 0 0 0 0 0 1 0 0 237 238 2.55 0 0 0 0 0 0 0 0 0 1 0 238 239 2.49 0 0 0 0 0 0 0 0 0 0 1 239 240 2.53 0 0 0 0 0 0 0 0 0 0 0 240 241 2.43 1 0 0 0 0 0 0 0 0 0 0 241 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 7.25671 0.13046 0.28595 0.29231 0.30516 0.32852 M6 M7 M8 M9 M10 M11 0.31537 0.29073 0.21508 0.20394 0.11179 0.02415 t -0.01935 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.8851 -0.4599 -0.0133 0.5122 1.9189 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.2567078 0.1990105 36.464 <2e-16 *** M1 0.1304640 0.2465122 0.529 0.597 M2 0.2859518 0.2495800 1.146 0.253 M3 0.2923066 0.2495597 1.171 0.243 M4 0.3051614 0.2495415 1.223 0.223 M5 0.3285162 0.2495254 1.317 0.189 M6 0.3153711 0.2495115 1.264 0.208 M7 0.2907259 0.2494997 1.165 0.245 M8 0.2150807 0.2494900 0.862 0.390 M9 0.2039355 0.2494825 0.817 0.415 M10 0.1117904 0.2494772 0.448 0.655 M11 0.0241452 0.2494740 0.097 0.923 t -0.0193548 0.0007311 -26.472 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7889 on 228 degrees of freedom Multiple R-squared: 0.7572, Adjusted R-squared: 0.7444 F-statistic: 59.26 on 12 and 228 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.0069048133 1.380963e-02 9.930952e-01 [2,] 0.0121995813 2.439916e-02 9.878004e-01 [3,] 0.0080028758 1.600575e-02 9.919971e-01 [4,] 0.0054137620 1.082752e-02 9.945862e-01 [5,] 0.0024606206 4.921241e-03 9.975394e-01 [6,] 0.0015523189 3.104638e-03 9.984477e-01 [7,] 0.0006422223 1.284445e-03 9.993578e-01 [8,] 0.0002149240 4.298481e-04 9.997851e-01 [9,] 0.0001110518 2.221035e-04 9.998889e-01 [10,] 0.0008048385 1.609677e-03 9.991952e-01 [11,] 0.0025932964 5.186593e-03 9.974067e-01 [12,] 0.0068551486 1.371030e-02 9.931449e-01 [13,] 0.0352284754 7.045695e-02 9.647715e-01 [14,] 0.0844760379 1.689521e-01 9.155240e-01 [15,] 0.1314790454 2.629581e-01 8.685210e-01 [16,] 0.2368333652 4.736667e-01 7.631666e-01 [17,] 0.3864929533 7.729859e-01 6.135070e-01 [18,] 0.5825761381 8.348477e-01 4.174239e-01 [19,] 0.7314574468 5.370851e-01 2.685426e-01 [20,] 0.8917982928 2.164034e-01 1.082017e-01 [21,] 0.9604617711 7.907646e-02 3.953823e-02 [22,] 0.9750472854 4.990543e-02 2.495271e-02 [23,] 0.9801912777 3.961744e-02 1.980872e-02 [24,] 0.9804995659 3.900087e-02 1.950043e-02 [25,] 0.9781667863 4.366643e-02 2.183321e-02 [26,] 0.9766597617 4.668048e-02 2.334024e-02 [27,] 0.9752246210 4.955076e-02 2.477538e-02 [28,] 0.9757715904 4.845682e-02 2.422841e-02 [29,] 0.9772366416 4.552672e-02 2.276336e-02 [30,] 0.9761824853 4.763503e-02 2.381751e-02 [31,] 0.9745179902 5.096402e-02 2.548201e-02 [32,] 0.9721514080 5.569718e-02 2.784859e-02 [33,] 0.9694602833 6.107943e-02 3.053972e-02 [34,] 0.9696311864 6.073763e-02 3.036881e-02 [35,] 0.9680323390 6.393532e-02 3.196766e-02 [36,] 0.9673408322 6.531834e-02 3.265917e-02 [37,] 0.9652546236 6.949075e-02 3.474538e-02 [38,] 0.9631363503 7.372730e-02 3.686365e-02 [39,] 0.9623069939 7.538601e-02 3.769301e-02 [40,] 0.9632865158 7.342697e-02 3.671348e-02 [41,] 0.9683187925 6.336241e-02 3.168121e-02 [42,] 0.9672205820 6.555884e-02 3.277942e-02 [43,] 0.9654933838 6.901323e-02 3.450662e-02 [44,] 0.9615200247 7.695995e-02 3.847998e-02 [45,] 0.9564366582 8.712668e-02 4.356334e-02 [46,] 0.9579107967 8.417841e-02 4.208920e-02 [47,] 0.9531900838 9.361983e-02 4.680992e-02 [48,] 0.9475811003 1.048378e-01 5.241890e-02 [49,] 0.9404023846 1.191952e-01 5.959762e-02 [50,] 0.9338049150 1.323902e-01 6.619508e-02 [51,] 0.9307596467 1.384807e-01 6.924035e-02 [52,] 0.9249466376 1.501067e-01 7.505336e-02 [53,] 0.9193797749 1.612405e-01 8.062023e-02 [54,] 0.9083686212 1.832628e-01 9.163138e-02 [55,] 0.8949820114 2.100360e-01 1.050180e-01 [56,] 0.8788322232 2.423356e-01 1.211678e-01 [57,] 0.8597762696 2.804475e-01 1.402237e-01 [58,] 0.8463151258 3.073697e-01 1.536849e-01 [59,] 0.8332695967 3.334608e-01 1.667304e-01 [60,] 0.8154859239 3.690282e-01 1.845141e-01 [61,] 0.8015482769 3.969034e-01 1.984517e-01 [62,] 0.7875890657 4.248219e-01 2.124109e-01 [63,] 0.7789080603 4.421839e-01 2.210919e-01 [64,] 0.8026896171 3.946208e-01 1.973104e-01 [65,] 0.8338122150 3.323756e-01 1.661878e-01 [66,] 0.8509768607 2.980463e-01 1.490231e-01 [67,] 0.8609302813 2.781394e-01 1.390697e-01 [68,] 0.8732219951 2.535560e-01 1.267780e-01 [69,] 0.8958598301 2.082803e-01 1.041402e-01 [70,] 0.8983362171 2.033276e-01 1.016638e-01 [71,] 0.9094346144 1.811308e-01 9.056539e-02 [72,] 0.9313861911 1.372276e-01 6.861381e-02 [73,] 0.9358578929 1.282842e-01 6.414211e-02 [74,] 0.9289529096 1.420942e-01 7.104709e-02 [75,] 0.9202006610 1.595987e-01 7.979934e-02 [76,] 0.9128722710 1.742555e-01 8.712773e-02 [77,] 0.9167950022 1.664100e-01 8.320500e-02 [78,] 0.9276372497 1.447255e-01 7.236275e-02 [79,] 0.9436910593 1.126179e-01 5.630894e-02 [80,] 0.9644323780 7.113524e-02 3.556762e-02 [81,] 0.9858720688 2.825586e-02 1.412793e-02 [82,] 0.9928671660 1.426567e-02 7.132834e-03 [83,] 0.9942691388 1.146172e-02 5.730861e-03 [84,] 0.9957975692 8.404862e-03 4.202431e-03 [85,] 0.9968450934 6.309813e-03 3.154907e-03 [86,] 0.9974836845 5.032631e-03 2.516315e-03 [87,] 0.9979514814 4.097037e-03 2.048519e-03 [88,] 0.9986140794 2.771841e-03 1.385921e-03 [89,] 0.9990903214 1.819357e-03 9.096786e-04 [90,] 0.9994333497 1.133301e-03 5.666503e-04 [91,] 0.9995899376 8.201249e-04 4.100624e-04 [92,] 0.9996920489 6.159021e-04 3.079511e-04 [93,] 0.9997424760 5.150479e-04 2.575240e-04 [94,] 0.9997502452 4.995095e-04 2.497548e-04 [95,] 0.9997082290 5.835421e-04 2.917710e-04 [96,] 0.9997508322 4.983356e-04 2.491678e-04 [97,] 0.9998128834 3.742331e-04 1.871166e-04 [98,] 0.9998308994 3.382012e-04 1.691006e-04 [99,] 0.9998155814 3.688371e-04 1.844186e-04 [100,] 0.9997797220 4.405559e-04 2.202780e-04 [101,] 0.9997708736 4.582528e-04 2.291264e-04 [102,] 0.9996884729 6.230541e-04 3.115271e-04 [103,] 0.9996491013 7.017974e-04 3.508987e-04 [104,] 0.9997711100 4.577800e-04 2.288900e-04 [105,] 0.9998660310 2.679380e-04 1.339690e-04 [106,] 0.9999170203 1.659594e-04 8.297969e-05 [107,] 0.9999519853 9.602935e-05 4.801467e-05 [108,] 0.9999686605 6.267901e-05 3.133951e-05 [109,] 0.9999809296 3.814081e-05 1.907040e-05 [110,] 0.9999840847 3.183053e-05 1.591527e-05 [111,] 0.9999843095 3.138097e-05 1.569049e-05 [112,] 0.9999807066 3.858671e-05 1.929336e-05 [113,] 0.9999734943 5.301135e-05 2.650568e-05 [114,] 0.9999685567 6.288660e-05 3.144330e-05 [115,] 0.9999644251 7.114987e-05 3.557493e-05 [116,] 0.9999507792 9.844150e-05 4.922075e-05 [117,] 0.9999271708 1.456584e-04 7.282918e-05 [118,] 0.9998923855 2.152290e-04 1.076145e-04 [119,] 0.9998446544 3.106911e-04 1.553456e-04 [120,] 0.9997737586 4.524828e-04 2.262414e-04 [121,] 0.9997312296 5.375407e-04 2.687704e-04 [122,] 0.9996714285 6.571429e-04 3.285715e-04 [123,] 0.9995304514 9.390971e-04 4.695486e-04 [124,] 0.9993324735 1.335053e-03 6.675265e-04 [125,] 0.9990562531 1.887494e-03 9.437469e-04 [126,] 0.9987825036 2.434993e-03 1.217496e-03 [127,] 0.9986483304 2.703339e-03 1.351670e-03 [128,] 0.9984770188 3.045962e-03 1.522981e-03 [129,] 0.9982395474 3.520905e-03 1.760453e-03 [130,] 0.9976601398 4.679720e-03 2.339860e-03 [131,] 0.9969710668 6.057866e-03 3.028933e-03 [132,] 0.9961517040 7.696592e-03 3.848296e-03 [133,] 0.9952751638 9.449672e-03 4.724836e-03 [134,] 0.9942655871 1.146883e-02 5.734413e-03 [135,] 0.9928553085 1.428938e-02 7.144691e-03 [136,] 0.9907944866 1.841103e-02 9.205513e-03 [137,] 0.9884410059 2.311799e-02 1.155899e-02 [138,] 0.9850983517 2.980330e-02 1.490165e-02 [139,] 0.9808702772 3.825945e-02 1.912972e-02 [140,] 0.9756153737 4.876925e-02 2.438463e-02 [141,] 0.9695544073 6.089119e-02 3.044559e-02 [142,] 0.9620758930 7.584821e-02 3.792411e-02 [143,] 0.9586134838 8.277303e-02 4.138652e-02 [144,] 0.9574854431 8.502911e-02 4.251456e-02 [145,] 0.9634713515 7.305730e-02 3.652865e-02 [146,] 0.9760256751 4.794865e-02 2.397432e-02 [147,] 0.9818206215 3.635876e-02 1.817938e-02 [148,] 0.9877143007 2.457140e-02 1.228570e-02 [149,] 0.9900804867 1.983903e-02 9.919513e-03 [150,] 0.9905104765 1.897905e-02 9.489523e-03 [151,] 0.9900071154 1.998577e-02 9.992885e-03 [152,] 0.9900882260 1.982355e-02 9.911774e-03 [153,] 0.9894229430 2.115411e-02 1.057706e-02 [154,] 0.9893512151 2.129757e-02 1.064878e-02 [155,] 0.9913942483 1.721150e-02 8.605752e-03 [156,] 0.9910785279 1.784294e-02 8.921472e-03 [157,] 0.9915654369 1.686913e-02 8.434563e-03 [158,] 0.9919819928 1.603601e-02 8.018007e-03 [159,] 0.9924050613 1.518988e-02 7.594939e-03 [160,] 0.9932247869 1.355043e-02 6.775213e-03 [161,] 0.9937504280 1.249914e-02 6.249572e-03 [162,] 0.9940740167 1.185197e-02 5.925983e-03 [163,] 0.9941888171 1.162237e-02 5.811183e-03 [164,] 0.9932468305 1.350634e-02 6.753170e-03 [165,] 0.9924458057 1.510839e-02 7.554194e-03 [166,] 0.9915704381 1.685912e-02 8.429562e-03 [167,] 0.9934129484 1.317410e-02 6.587052e-03 [168,] 0.9930673912 1.386522e-02 6.932609e-03 [169,] 0.9925297263 1.494055e-02 7.470274e-03 [170,] 0.9919286183 1.614276e-02 8.071382e-03 [171,] 0.9907939216 1.841216e-02 9.206078e-03 [172,] 0.9892566622 2.148668e-02 1.074334e-02 [173,] 0.9877322768 2.453545e-02 1.226772e-02 [174,] 0.9853006784 2.939864e-02 1.469932e-02 [175,] 0.9826432307 3.471354e-02 1.735677e-02 [176,] 0.9831422110 3.371558e-02 1.685779e-02 [177,] 0.9794648585 4.107028e-02 2.053514e-02 [178,] 0.9743169780 5.136604e-02 2.568302e-02 [179,] 0.9721457684 5.570846e-02 2.785423e-02 [180,] 0.9658600737 6.827985e-02 3.413993e-02 [181,] 0.9613645012 7.727100e-02 3.863550e-02 [182,] 0.9650806217 6.983876e-02 3.491938e-02 [183,] 0.9640619740 7.187605e-02 3.593803e-02 [184,] 0.9588547690 8.229046e-02 4.114523e-02 [185,] 0.9548180457 9.036391e-02 4.518195e-02 [186,] 0.9428615070 1.142770e-01 5.713849e-02 [187,] 0.9264534406 1.470931e-01 7.354656e-02 [188,] 0.9137289288 1.725421e-01 8.627107e-02 [189,] 0.9217262646 1.565475e-01 7.827374e-02 [190,] 0.9042584643 1.914831e-01 9.574154e-02 [191,] 0.9072097121 1.855806e-01 9.279029e-02 [192,] 0.8892026545 2.215947e-01 1.107973e-01 [193,] 0.8625140273 2.749719e-01 1.374860e-01 [194,] 0.8349548749 3.300903e-01 1.650451e-01 [195,] 0.8107507270 3.784985e-01 1.892493e-01 [196,] 0.7864561408 4.270877e-01 2.135439e-01 [197,] 0.7839654799 4.320690e-01 2.160345e-01 [198,] 0.7663603539 4.672793e-01 2.336396e-01 [199,] 0.7515951325 4.968097e-01 2.484049e-01 [200,] 0.8048683204 3.902634e-01 1.951317e-01 [201,] 0.8058527187 3.882946e-01 1.941473e-01 [202,] 0.8649711492 2.700577e-01 1.350289e-01 [203,] 0.9818409073 3.631819e-02 1.815909e-02 [204,] 0.9938802533 1.223949e-02 6.119747e-03 [205,] 0.9937935570 1.241289e-02 6.206443e-03 [206,] 0.9932050283 1.358994e-02 6.794972e-03 [207,] 0.9903078047 1.938439e-02 9.692195e-03 [208,] 0.9846607825 3.067844e-02 1.533922e-02 [209,] 0.9619193962 7.616121e-02 3.808060e-02 [210,] 0.9476255945 1.047488e-01 5.237441e-02 > postscript(file="/var/wessaorg/rcomp/tmp/15vs41355684043.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/wessaorg/rcomp/tmp/2n3y21355684043.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/wessaorg/rcomp/tmp/3xtwl1355684043.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/wessaorg/rcomp/tmp/4md5w1355684043.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/wessaorg/rcomp/tmp/5e5ob1355684043.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 = 241 Frequency = 1 1 2 3 4 5 6 1.272183055 1.386050093 1.379050093 1.325550093 1.381550093 1.604050093 7 8 9 10 11 12 1.708050093 1.343050093 0.883550093 0.865050093 0.642050093 0.525550093 13 14 15 16 17 18 0.384440940 0.108307978 0.261307978 0.057807978 -0.336192022 -0.133692022 19 20 21 22 23 24 -0.129692022 0.285307978 -0.004192022 -0.152692022 -0.485692022 -0.352192022 25 26 27 28 29 30 -0.013301175 0.120565863 0.433565863 0.890065863 0.836065863 1.028565863 31 32 33 34 35 36 1.432565863 1.647565863 1.578065863 1.529565863 1.726565863 1.720065863 37 38 39 40 41 42 1.478956710 1.252823748 0.995823748 0.492323748 0.728323748 0.470823748 43 44 45 46 47 48 0.414823748 0.589823748 0.400323748 0.291823748 0.318823748 0.062323748 49 50 51 52 53 54 0.411214595 0.165081633 -0.001918367 0.064581633 0.150581633 0.143081633 55 56 57 58 59 60 0.057081633 -0.247918367 -0.227418367 -0.385918367 -0.258918367 -0.345418367 61 62 63 64 65 66 -0.676527520 -0.482660482 -0.429660482 -0.373160482 -0.637160482 -0.764660482 67 68 69 70 71 72 -0.540660482 -0.555660482 -0.395160482 -0.413660482 -0.496660482 -0.733160482 73 74 75 76 77 78 -0.974269635 -1.070402597 -0.997402597 -1.130902597 -1.194902597 -1.262402597 79 80 81 82 83 84 -1.538402597 -1.633402597 -1.622902597 -1.601402597 -1.654402597 -1.810902597 85 86 87 88 89 90 -1.612011750 -1.718144712 -1.885144712 -1.598644712 -1.162644712 -0.870144712 91 92 93 94 95 96 -0.656144712 -0.341144712 -0.250644712 -0.129144712 0.067855288 0.351355288 97 98 99 100 101 102 0.160246135 -0.185886827 -0.072886827 -0.066386827 -0.090386827 -0.067886827 103 104 105 106 107 108 0.096113173 0.121113173 0.141613173 0.043113173 0.020113173 -0.056386827 109 110 111 112 113 114 -0.207495980 -0.373628942 -0.060628942 0.035871058 -0.088128942 -0.245628942 115 116 117 118 119 120 -0.351628942 -0.226628942 -0.556128942 -0.284628942 0.122371058 0.175871058 121 122 123 124 125 126 0.074761905 0.178628942 0.091628942 0.108128942 -0.065871058 -0.193371058 127 128 129 130 131 132 -0.409371058 -0.584371058 -0.363871058 -0.322371058 -0.565371058 -0.701871058 133 134 135 136 137 138 -0.942980210 -0.859113173 -0.806113173 -1.189613173 -1.123613173 -0.791113173 139 140 141 142 143 144 -0.717113173 -0.772113173 -0.451613173 -0.250113173 -0.273113173 -0.279613173 145 146 147 148 149 150 -0.570722325 -0.766855288 -0.403855288 -0.327355288 -0.301355288 -0.378855288 151 152 153 154 155 156 -0.504855288 -0.459855288 -0.569355288 -0.597855288 -0.610855288 -0.707355288 157 158 159 160 161 162 -0.658464440 -0.794597403 -0.991597403 -1.155097403 -1.309097403 -1.186597403 163 164 165 166 167 168 -1.252597403 -1.107597403 -0.837097403 -0.705597403 -0.738597403 -0.495097403 169 170 171 172 173 174 -0.586206555 -0.422339518 -0.219339518 -0.242839518 -0.126839518 -0.244339518 175 176 177 178 179 180 -0.330339518 -0.355339518 -0.224839518 -0.193339518 0.173660482 0.397160482 181 182 183 184 185 186 0.116051330 0.079918367 0.232918367 0.449418367 0.615418367 0.517918367 187 188 189 190 191 192 0.521918367 0.656918367 0.557418367 0.628918367 0.865918367 0.589418367 193 194 195 196 197 198 0.488309215 0.512176252 0.645176252 0.901676252 1.187676252 0.990176252 199 200 201 202 203 204 0.824176252 0.759176252 0.579676252 0.461176252 0.528176252 0.891676252 205 206 207 208 209 210 0.530567100 0.224434137 0.147434137 0.233934137 0.119934137 0.022434137 211 212 213 214 215 216 0.036434137 -0.228565863 0.081934137 0.073434137 -0.309565863 0.073934137 217 218 219 220 221 222 0.182824985 0.726692022 0.689692022 0.896192022 0.902192022 0.964692022 223 224 225 226 227 228 1.008692022 1.033692022 1.014192022 1.355692022 1.092692022 0.776192022 229 230 231 232 233 234 1.435082870 1.918949907 0.991949907 0.628449907 0.514449907 0.396949907 235 236 237 238 239 240 0.330949907 0.075949907 0.266449907 -0.212050093 -0.165050093 -0.081550093 241 -0.292659246 > postscript(file="/var/wessaorg/rcomp/tmp/6arq11355684043.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 = 241 Frequency = 1 lag(myerror, k = 1) myerror 0 1.272183055 NA 1 1.386050093 1.272183055 2 1.379050093 1.386050093 3 1.325550093 1.379050093 4 1.381550093 1.325550093 5 1.604050093 1.381550093 6 1.708050093 1.604050093 7 1.343050093 1.708050093 8 0.883550093 1.343050093 9 0.865050093 0.883550093 10 0.642050093 0.865050093 11 0.525550093 0.642050093 12 0.384440940 0.525550093 13 0.108307978 0.384440940 14 0.261307978 0.108307978 15 0.057807978 0.261307978 16 -0.336192022 0.057807978 17 -0.133692022 -0.336192022 18 -0.129692022 -0.133692022 19 0.285307978 -0.129692022 20 -0.004192022 0.285307978 21 -0.152692022 -0.004192022 22 -0.485692022 -0.152692022 23 -0.352192022 -0.485692022 24 -0.013301175 -0.352192022 25 0.120565863 -0.013301175 26 0.433565863 0.120565863 27 0.890065863 0.433565863 28 0.836065863 0.890065863 29 1.028565863 0.836065863 30 1.432565863 1.028565863 31 1.647565863 1.432565863 32 1.578065863 1.647565863 33 1.529565863 1.578065863 34 1.726565863 1.529565863 35 1.720065863 1.726565863 36 1.478956710 1.720065863 37 1.252823748 1.478956710 38 0.995823748 1.252823748 39 0.492323748 0.995823748 40 0.728323748 0.492323748 41 0.470823748 0.728323748 42 0.414823748 0.470823748 43 0.589823748 0.414823748 44 0.400323748 0.589823748 45 0.291823748 0.400323748 46 0.318823748 0.291823748 47 0.062323748 0.318823748 48 0.411214595 0.062323748 49 0.165081633 0.411214595 50 -0.001918367 0.165081633 51 0.064581633 -0.001918367 52 0.150581633 0.064581633 53 0.143081633 0.150581633 54 0.057081633 0.143081633 55 -0.247918367 0.057081633 56 -0.227418367 -0.247918367 57 -0.385918367 -0.227418367 58 -0.258918367 -0.385918367 59 -0.345418367 -0.258918367 60 -0.676527520 -0.345418367 61 -0.482660482 -0.676527520 62 -0.429660482 -0.482660482 63 -0.373160482 -0.429660482 64 -0.637160482 -0.373160482 65 -0.764660482 -0.637160482 66 -0.540660482 -0.764660482 67 -0.555660482 -0.540660482 68 -0.395160482 -0.555660482 69 -0.413660482 -0.395160482 70 -0.496660482 -0.413660482 71 -0.733160482 -0.496660482 72 -0.974269635 -0.733160482 73 -1.070402597 -0.974269635 74 -0.997402597 -1.070402597 75 -1.130902597 -0.997402597 76 -1.194902597 -1.130902597 77 -1.262402597 -1.194902597 78 -1.538402597 -1.262402597 79 -1.633402597 -1.538402597 80 -1.622902597 -1.633402597 81 -1.601402597 -1.622902597 82 -1.654402597 -1.601402597 83 -1.810902597 -1.654402597 84 -1.612011750 -1.810902597 85 -1.718144712 -1.612011750 86 -1.885144712 -1.718144712 87 -1.598644712 -1.885144712 88 -1.162644712 -1.598644712 89 -0.870144712 -1.162644712 90 -0.656144712 -0.870144712 91 -0.341144712 -0.656144712 92 -0.250644712 -0.341144712 93 -0.129144712 -0.250644712 94 0.067855288 -0.129144712 95 0.351355288 0.067855288 96 0.160246135 0.351355288 97 -0.185886827 0.160246135 98 -0.072886827 -0.185886827 99 -0.066386827 -0.072886827 100 -0.090386827 -0.066386827 101 -0.067886827 -0.090386827 102 0.096113173 -0.067886827 103 0.121113173 0.096113173 104 0.141613173 0.121113173 105 0.043113173 0.141613173 106 0.020113173 0.043113173 107 -0.056386827 0.020113173 108 -0.207495980 -0.056386827 109 -0.373628942 -0.207495980 110 -0.060628942 -0.373628942 111 0.035871058 -0.060628942 112 -0.088128942 0.035871058 113 -0.245628942 -0.088128942 114 -0.351628942 -0.245628942 115 -0.226628942 -0.351628942 116 -0.556128942 -0.226628942 117 -0.284628942 -0.556128942 118 0.122371058 -0.284628942 119 0.175871058 0.122371058 120 0.074761905 0.175871058 121 0.178628942 0.074761905 122 0.091628942 0.178628942 123 0.108128942 0.091628942 124 -0.065871058 0.108128942 125 -0.193371058 -0.065871058 126 -0.409371058 -0.193371058 127 -0.584371058 -0.409371058 128 -0.363871058 -0.584371058 129 -0.322371058 -0.363871058 130 -0.565371058 -0.322371058 131 -0.701871058 -0.565371058 132 -0.942980210 -0.701871058 133 -0.859113173 -0.942980210 134 -0.806113173 -0.859113173 135 -1.189613173 -0.806113173 136 -1.123613173 -1.189613173 137 -0.791113173 -1.123613173 138 -0.717113173 -0.791113173 139 -0.772113173 -0.717113173 140 -0.451613173 -0.772113173 141 -0.250113173 -0.451613173 142 -0.273113173 -0.250113173 143 -0.279613173 -0.273113173 144 -0.570722325 -0.279613173 145 -0.766855288 -0.570722325 146 -0.403855288 -0.766855288 147 -0.327355288 -0.403855288 148 -0.301355288 -0.327355288 149 -0.378855288 -0.301355288 150 -0.504855288 -0.378855288 151 -0.459855288 -0.504855288 152 -0.569355288 -0.459855288 153 -0.597855288 -0.569355288 154 -0.610855288 -0.597855288 155 -0.707355288 -0.610855288 156 -0.658464440 -0.707355288 157 -0.794597403 -0.658464440 158 -0.991597403 -0.794597403 159 -1.155097403 -0.991597403 160 -1.309097403 -1.155097403 161 -1.186597403 -1.309097403 162 -1.252597403 -1.186597403 163 -1.107597403 -1.252597403 164 -0.837097403 -1.107597403 165 -0.705597403 -0.837097403 166 -0.738597403 -0.705597403 167 -0.495097403 -0.738597403 168 -0.586206555 -0.495097403 169 -0.422339518 -0.586206555 170 -0.219339518 -0.422339518 171 -0.242839518 -0.219339518 172 -0.126839518 -0.242839518 173 -0.244339518 -0.126839518 174 -0.330339518 -0.244339518 175 -0.355339518 -0.330339518 176 -0.224839518 -0.355339518 177 -0.193339518 -0.224839518 178 0.173660482 -0.193339518 179 0.397160482 0.173660482 180 0.116051330 0.397160482 181 0.079918367 0.116051330 182 0.232918367 0.079918367 183 0.449418367 0.232918367 184 0.615418367 0.449418367 185 0.517918367 0.615418367 186 0.521918367 0.517918367 187 0.656918367 0.521918367 188 0.557418367 0.656918367 189 0.628918367 0.557418367 190 0.865918367 0.628918367 191 0.589418367 0.865918367 192 0.488309215 0.589418367 193 0.512176252 0.488309215 194 0.645176252 0.512176252 195 0.901676252 0.645176252 196 1.187676252 0.901676252 197 0.990176252 1.187676252 198 0.824176252 0.990176252 199 0.759176252 0.824176252 200 0.579676252 0.759176252 201 0.461176252 0.579676252 202 0.528176252 0.461176252 203 0.891676252 0.528176252 204 0.530567100 0.891676252 205 0.224434137 0.530567100 206 0.147434137 0.224434137 207 0.233934137 0.147434137 208 0.119934137 0.233934137 209 0.022434137 0.119934137 210 0.036434137 0.022434137 211 -0.228565863 0.036434137 212 0.081934137 -0.228565863 213 0.073434137 0.081934137 214 -0.309565863 0.073434137 215 0.073934137 -0.309565863 216 0.182824985 0.073934137 217 0.726692022 0.182824985 218 0.689692022 0.726692022 219 0.896192022 0.689692022 220 0.902192022 0.896192022 221 0.964692022 0.902192022 222 1.008692022 0.964692022 223 1.033692022 1.008692022 224 1.014192022 1.033692022 225 1.355692022 1.014192022 226 1.092692022 1.355692022 227 0.776192022 1.092692022 228 1.435082870 0.776192022 229 1.918949907 1.435082870 230 0.991949907 1.918949907 231 0.628449907 0.991949907 232 0.514449907 0.628449907 233 0.396949907 0.514449907 234 0.330949907 0.396949907 235 0.075949907 0.330949907 236 0.266449907 0.075949907 237 -0.212050093 0.266449907 238 -0.165050093 -0.212050093 239 -0.081550093 -0.165050093 240 -0.292659246 -0.081550093 241 NA -0.292659246 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.386050093 1.272183055 [2,] 1.379050093 1.386050093 [3,] 1.325550093 1.379050093 [4,] 1.381550093 1.325550093 [5,] 1.604050093 1.381550093 [6,] 1.708050093 1.604050093 [7,] 1.343050093 1.708050093 [8,] 0.883550093 1.343050093 [9,] 0.865050093 0.883550093 [10,] 0.642050093 0.865050093 [11,] 0.525550093 0.642050093 [12,] 0.384440940 0.525550093 [13,] 0.108307978 0.384440940 [14,] 0.261307978 0.108307978 [15,] 0.057807978 0.261307978 [16,] -0.336192022 0.057807978 [17,] -0.133692022 -0.336192022 [18,] -0.129692022 -0.133692022 [19,] 0.285307978 -0.129692022 [20,] -0.004192022 0.285307978 [21,] -0.152692022 -0.004192022 [22,] -0.485692022 -0.152692022 [23,] -0.352192022 -0.485692022 [24,] -0.013301175 -0.352192022 [25,] 0.120565863 -0.013301175 [26,] 0.433565863 0.120565863 [27,] 0.890065863 0.433565863 [28,] 0.836065863 0.890065863 [29,] 1.028565863 0.836065863 [30,] 1.432565863 1.028565863 [31,] 1.647565863 1.432565863 [32,] 1.578065863 1.647565863 [33,] 1.529565863 1.578065863 [34,] 1.726565863 1.529565863 [35,] 1.720065863 1.726565863 [36,] 1.478956710 1.720065863 [37,] 1.252823748 1.478956710 [38,] 0.995823748 1.252823748 [39,] 0.492323748 0.995823748 [40,] 0.728323748 0.492323748 [41,] 0.470823748 0.728323748 [42,] 0.414823748 0.470823748 [43,] 0.589823748 0.414823748 [44,] 0.400323748 0.589823748 [45,] 0.291823748 0.400323748 [46,] 0.318823748 0.291823748 [47,] 0.062323748 0.318823748 [48,] 0.411214595 0.062323748 [49,] 0.165081633 0.411214595 [50,] -0.001918367 0.165081633 [51,] 0.064581633 -0.001918367 [52,] 0.150581633 0.064581633 [53,] 0.143081633 0.150581633 [54,] 0.057081633 0.143081633 [55,] -0.247918367 0.057081633 [56,] -0.227418367 -0.247918367 [57,] -0.385918367 -0.227418367 [58,] -0.258918367 -0.385918367 [59,] -0.345418367 -0.258918367 [60,] -0.676527520 -0.345418367 [61,] -0.482660482 -0.676527520 [62,] -0.429660482 -0.482660482 [63,] -0.373160482 -0.429660482 [64,] -0.637160482 -0.373160482 [65,] -0.764660482 -0.637160482 [66,] -0.540660482 -0.764660482 [67,] -0.555660482 -0.540660482 [68,] -0.395160482 -0.555660482 [69,] -0.413660482 -0.395160482 [70,] -0.496660482 -0.413660482 [71,] -0.733160482 -0.496660482 [72,] -0.974269635 -0.733160482 [73,] -1.070402597 -0.974269635 [74,] -0.997402597 -1.070402597 [75,] -1.130902597 -0.997402597 [76,] -1.194902597 -1.130902597 [77,] -1.262402597 -1.194902597 [78,] -1.538402597 -1.262402597 [79,] -1.633402597 -1.538402597 [80,] -1.622902597 -1.633402597 [81,] -1.601402597 -1.622902597 [82,] -1.654402597 -1.601402597 [83,] -1.810902597 -1.654402597 [84,] -1.612011750 -1.810902597 [85,] -1.718144712 -1.612011750 [86,] -1.885144712 -1.718144712 [87,] -1.598644712 -1.885144712 [88,] -1.162644712 -1.598644712 [89,] -0.870144712 -1.162644712 [90,] -0.656144712 -0.870144712 [91,] -0.341144712 -0.656144712 [92,] -0.250644712 -0.341144712 [93,] -0.129144712 -0.250644712 [94,] 0.067855288 -0.129144712 [95,] 0.351355288 0.067855288 [96,] 0.160246135 0.351355288 [97,] -0.185886827 0.160246135 [98,] -0.072886827 -0.185886827 [99,] -0.066386827 -0.072886827 [100,] -0.090386827 -0.066386827 [101,] -0.067886827 -0.090386827 [102,] 0.096113173 -0.067886827 [103,] 0.121113173 0.096113173 [104,] 0.141613173 0.121113173 [105,] 0.043113173 0.141613173 [106,] 0.020113173 0.043113173 [107,] -0.056386827 0.020113173 [108,] -0.207495980 -0.056386827 [109,] -0.373628942 -0.207495980 [110,] -0.060628942 -0.373628942 [111,] 0.035871058 -0.060628942 [112,] -0.088128942 0.035871058 [113,] -0.245628942 -0.088128942 [114,] -0.351628942 -0.245628942 [115,] -0.226628942 -0.351628942 [116,] -0.556128942 -0.226628942 [117,] -0.284628942 -0.556128942 [118,] 0.122371058 -0.284628942 [119,] 0.175871058 0.122371058 [120,] 0.074761905 0.175871058 [121,] 0.178628942 0.074761905 [122,] 0.091628942 0.178628942 [123,] 0.108128942 0.091628942 [124,] -0.065871058 0.108128942 [125,] -0.193371058 -0.065871058 [126,] -0.409371058 -0.193371058 [127,] -0.584371058 -0.409371058 [128,] -0.363871058 -0.584371058 [129,] -0.322371058 -0.363871058 [130,] -0.565371058 -0.322371058 [131,] -0.701871058 -0.565371058 [132,] -0.942980210 -0.701871058 [133,] -0.859113173 -0.942980210 [134,] -0.806113173 -0.859113173 [135,] -1.189613173 -0.806113173 [136,] -1.123613173 -1.189613173 [137,] -0.791113173 -1.123613173 [138,] -0.717113173 -0.791113173 [139,] -0.772113173 -0.717113173 [140,] -0.451613173 -0.772113173 [141,] -0.250113173 -0.451613173 [142,] -0.273113173 -0.250113173 [143,] -0.279613173 -0.273113173 [144,] -0.570722325 -0.279613173 [145,] -0.766855288 -0.570722325 [146,] -0.403855288 -0.766855288 [147,] -0.327355288 -0.403855288 [148,] -0.301355288 -0.327355288 [149,] -0.378855288 -0.301355288 [150,] -0.504855288 -0.378855288 [151,] -0.459855288 -0.504855288 [152,] -0.569355288 -0.459855288 [153,] -0.597855288 -0.569355288 [154,] -0.610855288 -0.597855288 [155,] -0.707355288 -0.610855288 [156,] -0.658464440 -0.707355288 [157,] -0.794597403 -0.658464440 [158,] -0.991597403 -0.794597403 [159,] -1.155097403 -0.991597403 [160,] -1.309097403 -1.155097403 [161,] -1.186597403 -1.309097403 [162,] -1.252597403 -1.186597403 [163,] -1.107597403 -1.252597403 [164,] -0.837097403 -1.107597403 [165,] -0.705597403 -0.837097403 [166,] -0.738597403 -0.705597403 [167,] -0.495097403 -0.738597403 [168,] -0.586206555 -0.495097403 [169,] -0.422339518 -0.586206555 [170,] -0.219339518 -0.422339518 [171,] -0.242839518 -0.219339518 [172,] -0.126839518 -0.242839518 [173,] -0.244339518 -0.126839518 [174,] -0.330339518 -0.244339518 [175,] -0.355339518 -0.330339518 [176,] -0.224839518 -0.355339518 [177,] -0.193339518 -0.224839518 [178,] 0.173660482 -0.193339518 [179,] 0.397160482 0.173660482 [180,] 0.116051330 0.397160482 [181,] 0.079918367 0.116051330 [182,] 0.232918367 0.079918367 [183,] 0.449418367 0.232918367 [184,] 0.615418367 0.449418367 [185,] 0.517918367 0.615418367 [186,] 0.521918367 0.517918367 [187,] 0.656918367 0.521918367 [188,] 0.557418367 0.656918367 [189,] 0.628918367 0.557418367 [190,] 0.865918367 0.628918367 [191,] 0.589418367 0.865918367 [192,] 0.488309215 0.589418367 [193,] 0.512176252 0.488309215 [194,] 0.645176252 0.512176252 [195,] 0.901676252 0.645176252 [196,] 1.187676252 0.901676252 [197,] 0.990176252 1.187676252 [198,] 0.824176252 0.990176252 [199,] 0.759176252 0.824176252 [200,] 0.579676252 0.759176252 [201,] 0.461176252 0.579676252 [202,] 0.528176252 0.461176252 [203,] 0.891676252 0.528176252 [204,] 0.530567100 0.891676252 [205,] 0.224434137 0.530567100 [206,] 0.147434137 0.224434137 [207,] 0.233934137 0.147434137 [208,] 0.119934137 0.233934137 [209,] 0.022434137 0.119934137 [210,] 0.036434137 0.022434137 [211,] -0.228565863 0.036434137 [212,] 0.081934137 -0.228565863 [213,] 0.073434137 0.081934137 [214,] -0.309565863 0.073434137 [215,] 0.073934137 -0.309565863 [216,] 0.182824985 0.073934137 [217,] 0.726692022 0.182824985 [218,] 0.689692022 0.726692022 [219,] 0.896192022 0.689692022 [220,] 0.902192022 0.896192022 [221,] 0.964692022 0.902192022 [222,] 1.008692022 0.964692022 [223,] 1.033692022 1.008692022 [224,] 1.014192022 1.033692022 [225,] 1.355692022 1.014192022 [226,] 1.092692022 1.355692022 [227,] 0.776192022 1.092692022 [228,] 1.435082870 0.776192022 [229,] 1.918949907 1.435082870 [230,] 0.991949907 1.918949907 [231,] 0.628449907 0.991949907 [232,] 0.514449907 0.628449907 [233,] 0.396949907 0.514449907 [234,] 0.330949907 0.396949907 [235,] 0.075949907 0.330949907 [236,] 0.266449907 0.075949907 [237,] -0.212050093 0.266449907 [238,] -0.165050093 -0.212050093 [239,] -0.081550093 -0.165050093 [240,] -0.292659246 -0.081550093 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.386050093 1.272183055 2 1.379050093 1.386050093 3 1.325550093 1.379050093 4 1.381550093 1.325550093 5 1.604050093 1.381550093 6 1.708050093 1.604050093 7 1.343050093 1.708050093 8 0.883550093 1.343050093 9 0.865050093 0.883550093 10 0.642050093 0.865050093 11 0.525550093 0.642050093 12 0.384440940 0.525550093 13 0.108307978 0.384440940 14 0.261307978 0.108307978 15 0.057807978 0.261307978 16 -0.336192022 0.057807978 17 -0.133692022 -0.336192022 18 -0.129692022 -0.133692022 19 0.285307978 -0.129692022 20 -0.004192022 0.285307978 21 -0.152692022 -0.004192022 22 -0.485692022 -0.152692022 23 -0.352192022 -0.485692022 24 -0.013301175 -0.352192022 25 0.120565863 -0.013301175 26 0.433565863 0.120565863 27 0.890065863 0.433565863 28 0.836065863 0.890065863 29 1.028565863 0.836065863 30 1.432565863 1.028565863 31 1.647565863 1.432565863 32 1.578065863 1.647565863 33 1.529565863 1.578065863 34 1.726565863 1.529565863 35 1.720065863 1.726565863 36 1.478956710 1.720065863 37 1.252823748 1.478956710 38 0.995823748 1.252823748 39 0.492323748 0.995823748 40 0.728323748 0.492323748 41 0.470823748 0.728323748 42 0.414823748 0.470823748 43 0.589823748 0.414823748 44 0.400323748 0.589823748 45 0.291823748 0.400323748 46 0.318823748 0.291823748 47 0.062323748 0.318823748 48 0.411214595 0.062323748 49 0.165081633 0.411214595 50 -0.001918367 0.165081633 51 0.064581633 -0.001918367 52 0.150581633 0.064581633 53 0.143081633 0.150581633 54 0.057081633 0.143081633 55 -0.247918367 0.057081633 56 -0.227418367 -0.247918367 57 -0.385918367 -0.227418367 58 -0.258918367 -0.385918367 59 -0.345418367 -0.258918367 60 -0.676527520 -0.345418367 61 -0.482660482 -0.676527520 62 -0.429660482 -0.482660482 63 -0.373160482 -0.429660482 64 -0.637160482 -0.373160482 65 -0.764660482 -0.637160482 66 -0.540660482 -0.764660482 67 -0.555660482 -0.540660482 68 -0.395160482 -0.555660482 69 -0.413660482 -0.395160482 70 -0.496660482 -0.413660482 71 -0.733160482 -0.496660482 72 -0.974269635 -0.733160482 73 -1.070402597 -0.974269635 74 -0.997402597 -1.070402597 75 -1.130902597 -0.997402597 76 -1.194902597 -1.130902597 77 -1.262402597 -1.194902597 78 -1.538402597 -1.262402597 79 -1.633402597 -1.538402597 80 -1.622902597 -1.633402597 81 -1.601402597 -1.622902597 82 -1.654402597 -1.601402597 83 -1.810902597 -1.654402597 84 -1.612011750 -1.810902597 85 -1.718144712 -1.612011750 86 -1.885144712 -1.718144712 87 -1.598644712 -1.885144712 88 -1.162644712 -1.598644712 89 -0.870144712 -1.162644712 90 -0.656144712 -0.870144712 91 -0.341144712 -0.656144712 92 -0.250644712 -0.341144712 93 -0.129144712 -0.250644712 94 0.067855288 -0.129144712 95 0.351355288 0.067855288 96 0.160246135 0.351355288 97 -0.185886827 0.160246135 98 -0.072886827 -0.185886827 99 -0.066386827 -0.072886827 100 -0.090386827 -0.066386827 101 -0.067886827 -0.090386827 102 0.096113173 -0.067886827 103 0.121113173 0.096113173 104 0.141613173 0.121113173 105 0.043113173 0.141613173 106 0.020113173 0.043113173 107 -0.056386827 0.020113173 108 -0.207495980 -0.056386827 109 -0.373628942 -0.207495980 110 -0.060628942 -0.373628942 111 0.035871058 -0.060628942 112 -0.088128942 0.035871058 113 -0.245628942 -0.088128942 114 -0.351628942 -0.245628942 115 -0.226628942 -0.351628942 116 -0.556128942 -0.226628942 117 -0.284628942 -0.556128942 118 0.122371058 -0.284628942 119 0.175871058 0.122371058 120 0.074761905 0.175871058 121 0.178628942 0.074761905 122 0.091628942 0.178628942 123 0.108128942 0.091628942 124 -0.065871058 0.108128942 125 -0.193371058 -0.065871058 126 -0.409371058 -0.193371058 127 -0.584371058 -0.409371058 128 -0.363871058 -0.584371058 129 -0.322371058 -0.363871058 130 -0.565371058 -0.322371058 131 -0.701871058 -0.565371058 132 -0.942980210 -0.701871058 133 -0.859113173 -0.942980210 134 -0.806113173 -0.859113173 135 -1.189613173 -0.806113173 136 -1.123613173 -1.189613173 137 -0.791113173 -1.123613173 138 -0.717113173 -0.791113173 139 -0.772113173 -0.717113173 140 -0.451613173 -0.772113173 141 -0.250113173 -0.451613173 142 -0.273113173 -0.250113173 143 -0.279613173 -0.273113173 144 -0.570722325 -0.279613173 145 -0.766855288 -0.570722325 146 -0.403855288 -0.766855288 147 -0.327355288 -0.403855288 148 -0.301355288 -0.327355288 149 -0.378855288 -0.301355288 150 -0.504855288 -0.378855288 151 -0.459855288 -0.504855288 152 -0.569355288 -0.459855288 153 -0.597855288 -0.569355288 154 -0.610855288 -0.597855288 155 -0.707355288 -0.610855288 156 -0.658464440 -0.707355288 157 -0.794597403 -0.658464440 158 -0.991597403 -0.794597403 159 -1.155097403 -0.991597403 160 -1.309097403 -1.155097403 161 -1.186597403 -1.309097403 162 -1.252597403 -1.186597403 163 -1.107597403 -1.252597403 164 -0.837097403 -1.107597403 165 -0.705597403 -0.837097403 166 -0.738597403 -0.705597403 167 -0.495097403 -0.738597403 168 -0.586206555 -0.495097403 169 -0.422339518 -0.586206555 170 -0.219339518 -0.422339518 171 -0.242839518 -0.219339518 172 -0.126839518 -0.242839518 173 -0.244339518 -0.126839518 174 -0.330339518 -0.244339518 175 -0.355339518 -0.330339518 176 -0.224839518 -0.355339518 177 -0.193339518 -0.224839518 178 0.173660482 -0.193339518 179 0.397160482 0.173660482 180 0.116051330 0.397160482 181 0.079918367 0.116051330 182 0.232918367 0.079918367 183 0.449418367 0.232918367 184 0.615418367 0.449418367 185 0.517918367 0.615418367 186 0.521918367 0.517918367 187 0.656918367 0.521918367 188 0.557418367 0.656918367 189 0.628918367 0.557418367 190 0.865918367 0.628918367 191 0.589418367 0.865918367 192 0.488309215 0.589418367 193 0.512176252 0.488309215 194 0.645176252 0.512176252 195 0.901676252 0.645176252 196 1.187676252 0.901676252 197 0.990176252 1.187676252 198 0.824176252 0.990176252 199 0.759176252 0.824176252 200 0.579676252 0.759176252 201 0.461176252 0.579676252 202 0.528176252 0.461176252 203 0.891676252 0.528176252 204 0.530567100 0.891676252 205 0.224434137 0.530567100 206 0.147434137 0.224434137 207 0.233934137 0.147434137 208 0.119934137 0.233934137 209 0.022434137 0.119934137 210 0.036434137 0.022434137 211 -0.228565863 0.036434137 212 0.081934137 -0.228565863 213 0.073434137 0.081934137 214 -0.309565863 0.073434137 215 0.073934137 -0.309565863 216 0.182824985 0.073934137 217 0.726692022 0.182824985 218 0.689692022 0.726692022 219 0.896192022 0.689692022 220 0.902192022 0.896192022 221 0.964692022 0.902192022 222 1.008692022 0.964692022 223 1.033692022 1.008692022 224 1.014192022 1.033692022 225 1.355692022 1.014192022 226 1.092692022 1.355692022 227 0.776192022 1.092692022 228 1.435082870 0.776192022 229 1.918949907 1.435082870 230 0.991949907 1.918949907 231 0.628449907 0.991949907 232 0.514449907 0.628449907 233 0.396949907 0.514449907 234 0.330949907 0.396949907 235 0.075949907 0.330949907 236 0.266449907 0.075949907 237 -0.212050093 0.266449907 238 -0.165050093 -0.212050093 239 -0.081550093 -0.165050093 240 -0.292659246 -0.081550093 > 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/wessaorg/rcomp/tmp/7cgbz1355684043.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/wessaorg/rcomp/tmp/87z3s1355684043.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/wessaorg/rcomp/tmp/9cua71355684043.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/wessaorg/rcomp/tmp/10bn6n1355684043.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11njw41355684043.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/wessaorg/rcomp/tmp/12a9ls1355684043.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/wessaorg/rcomp/tmp/13adsn1355684043.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/wessaorg/rcomp/tmp/14na4r1355684043.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/wessaorg/rcomp/tmp/1522lw1355684043.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/wessaorg/rcomp/tmp/16hzd41355684043.tab") + } > > try(system("convert tmp/15vs41355684043.ps tmp/15vs41355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/2n3y21355684043.ps tmp/2n3y21355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/3xtwl1355684043.ps tmp/3xtwl1355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/4md5w1355684043.ps tmp/4md5w1355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/5e5ob1355684043.ps tmp/5e5ob1355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/6arq11355684043.ps tmp/6arq11355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/7cgbz1355684043.ps tmp/7cgbz1355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/87z3s1355684043.ps tmp/87z3s1355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/9cua71355684043.ps tmp/9cua71355684043.png",intern=TRUE)) character(0) > try(system("convert tmp/10bn6n1355684043.ps tmp/10bn6n1355684043.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 10.349 1.227 11.577