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(24 + ,11 + ,12 + ,26 + ,14 + ,24 + ,237.588 + ,25 + ,7 + ,8 + ,23 + ,11 + ,25 + ,164.083 + ,17 + ,17 + ,8 + ,25 + ,6 + ,30 + ,278.261 + ,18 + ,10 + ,8 + ,23 + ,12 + ,19 + ,220.36 + ,18 + ,12 + ,9 + ,19 + ,8 + ,22 + ,253.967 + ,16 + ,12 + ,7 + ,29 + ,10 + ,22 + ,422.31 + ,20 + ,11 + ,4 + ,25 + ,10 + ,25 + ,136.921 + ,16 + ,11 + ,11 + ,21 + ,11 + ,23 + ,143.495 + ,18 + ,12 + ,7 + ,22 + ,16 + ,17 + ,189.785 + ,17 + ,13 + ,7 + ,25 + ,11 + ,21 + ,219.529 + ,23 + ,14 + ,12 + ,24 + ,13 + ,19 + ,217.761 + ,30 + ,16 + ,10 + ,18 + ,12 + ,19 + ,221.754 + ,23 + ,11 + ,10 + ,22 + ,8 + ,15 + ,159.854 + ,18 + ,10 + ,8 + ,15 + ,12 + ,16 + ,209.464 + ,15 + ,11 + ,8 + ,22 + ,11 + ,23 + ,174.283 + ,12 + ,15 + ,4 + ,28 + ,4 + ,27 + ,154.55 + ,21 + ,9 + ,9 + ,20 + ,9 + ,22 + ,153.024 + ,15 + ,11 + ,8 + ,12 + ,8 + ,14 + ,162.49 + ,20 + ,17 + ,7 + ,24 + ,8 + ,22 + ,154.462 + ,31 + ,17 + ,11 + ,20 + ,14 + ,23 + ,249.671 + ,27 + ,11 + ,9 + ,21 + ,15 + ,23 + ,259.473 + ,34 + ,18 + ,11 + ,20 + ,16 + ,21 + ,155.337 + ,21 + ,14 + ,13 + ,21 + ,9 + ,19 + ,151.289 + ,31 + ,10 + ,8 + ,23 + ,14 + ,18 + ,276.614 + ,19 + ,11 + ,8 + ,28 + ,11 + ,20 + ,188.214 + ,16 + ,15 + ,9 + ,24 + ,8 + ,23 + ,181.098 + ,20 + ,15 + ,6 + ,24 + ,9 + ,25 + ,240.898 + ,21 + ,13 + ,9 + ,24 + ,9 + ,19 + ,244.551 + ,22 + ,16 + ,9 + ,23 + ,9 + ,24 + ,250.238 + ,17 + ,13 + ,6 + ,23 + ,9 + ,22 + ,183.129 + ,24 + ,9 + ,6 + ,29 + ,10 + ,25 + ,310.331 + ,25 + ,18 + ,16 + ,24 + ,16 + ,26 + ,281.942 + ,26 + ,18 + ,5 + ,18 + ,11 + ,29 + ,230.343 + ,25 + ,12 + ,7 + ,25 + ,8 + ,32 + ,161.563 + ,17 + ,17 + ,9 + ,21 + ,9 + ,25 + ,392.527 + ,32 + ,9 + ,6 + ,26 + ,16 + ,29 + ,1077.414 + ,33 + ,9 + ,6 + ,22 + ,11 + ,28 + ,248.275 + ,13 + ,12 + ,5 + ,22 + ,16 + ,17 + ,557.386 + ,32 + ,18 + ,12 + ,22 + ,12 + ,28 + ,731.874 + ,25 + ,12 + ,7 + ,23 + ,12 + ,29 + ,301.429 + ,29 + ,18 + ,10 + ,30 + ,14 + ,26 + ,226.36 + ,22 + ,14 + ,9 + ,23 + ,9 + ,25 + ,215.018 + ,18 + ,15 + ,8 + ,17 + ,10 + ,14 + ,157.672 + ,17 + ,16 + ,5 + ,23 + ,9 + ,25 + ,219.118 + ,20 + ,10 + ,8 + ,23 + ,10 + ,26 + ,213.019 + ,15 + ,11 + ,8 + ,25 + ,12 + ,20 + ,390.642 + ,20 + ,14 + ,10 + ,24 + ,14 + ,18 + ,157.124 + ,33 + ,9 + ,6 + ,24 + ,14 + ,32 + ,227.652 + ,29 + ,12 + ,8 + ,23 + ,10 + ,25 + ,239.266 + ,23 + ,17 + ,7 + ,21 + ,14 + ,25 + ,506.343 + ,26 + ,5 + ,4 + ,24 + ,16 + ,23 + ,149.219 + ,18 + ,12 + ,8 + ,24 + ,9 + ,21 + ,213.351 + ,20 + ,12 + ,8 + ,28 + ,10 + ,20 + ,174.517 + ,11 + ,6 + ,4 + ,16 + ,6 + ,15 + ,172.531 + ,28 + ,24 + ,20 + ,20 + ,8 + ,30 + ,320.656 + ,26 + ,12 + ,8 + ,29 + ,13 + ,24 + ,305.011 + ,22 + ,12 + ,8 + ,27 + ,10 + ,26 + ,266.495 + ,17 + ,14 + ,6 + ,22 + ,8 + ,24 + ,361.511 + ,12 + ,7 + ,4 + ,28 + ,7 + ,22 + ,361.019 + ,14 + ,13 + ,8 + ,16 + ,15 + ,14 + ,382.187 + ,17 + ,12 + ,9 + ,25 + ,9 + ,24 + ,196.763 + ,21 + ,13 + ,6 + ,24 + ,10 + ,24 + ,273.212 + ,19 + ,14 + ,7 + ,28 + ,12 + ,24 + ,186.397 + ,18 + ,8 + ,9 + ,24 + ,13 + ,24 + ,294.205 + ,10 + ,11 + ,5 + ,23 + ,10 + ,19 + ,364.685 + ,29 + ,9 + ,5 + ,30 + ,11 + ,31 + ,230.501 + ,31 + ,11 + ,8 + ,24 + ,8 + ,22 + ,217.51 + ,19 + ,13 + ,8 + ,21 + ,9 + ,27 + ,262.297 + ,9 + ,10 + ,6 + ,25 + ,13 + ,19 + ,169.246 + ,20 + ,11 + ,8 + ,25 + ,11 + ,25 + ,260.428 + ,28 + ,12 + ,7 + ,22 + ,8 + ,20 + ,348.187 + ,19 + ,9 + ,7 + ,23 + ,9 + ,21 + ,512.937 + ,30 + ,15 + ,9 + ,26 + ,9 + ,27 + ,164.496 + ,29 + ,18 + ,11 + ,23 + ,15 + ,23 + ,111.187 + ,26 + ,15 + ,6 + ,25 + ,9 + ,25 + ,169.999 + ,23 + ,12 + ,8 + ,21 + ,10 + ,20 + ,240.187 + ,13 + ,13 + ,6 + ,25 + ,14 + ,21 + ,187.158 + ,21 + ,14 + ,9 + ,24 + ,12 + ,22 + ,194.096 + ,19 + ,10 + ,8 + ,29 + ,12 + ,23 + ,265.846 + ,28 + ,13 + ,6 + ,22 + ,11 + ,25 + ,283.319 + ,23 + ,13 + ,10 + ,27 + ,14 + ,25 + ,356.938 + ,18 + ,11 + ,8 + ,26 + ,6 + ,17 + ,240.802 + ,21 + ,13 + ,8 + ,22 + ,12 + ,19 + ,326.662 + ,20 + ,16 + ,10 + ,24 + ,8 + ,25 + ,249.266 + ,23 + ,8 + ,5 + ,27 + ,14 + ,19 + ,277.368 + ,21 + ,16 + ,7 + ,24 + ,11 + ,20 + ,394.618 + ,21 + ,11 + ,5 + ,24 + ,10 + ,26 + ,235.686 + ,15 + ,9 + ,8 + ,29 + ,14 + ,23 + ,227.641 + ,28 + ,16 + ,14 + ,22 + ,12 + ,27 + ,159.593 + ,19 + ,12 + ,7 + ,21 + ,10 + ,17 + ,268.866 + ,26 + ,14 + ,8 + ,24 + ,14 + ,17 + ,206.466 + ,10 + ,8 + ,6 + ,24 + ,5 + ,19 + ,233.064 + ,16 + ,9 + ,5 + ,23 + ,11 + ,17 + ,133.824 + ,22 + ,15 + ,6 + ,20 + ,10 + ,22 + ,486.783 + ,19 + ,11 + ,10 + ,27 + ,9 + ,21 + ,228.859 + ,31 + ,21 + ,12 + ,26 + ,10 + ,32 + ,155.238 + ,31 + ,14 + ,9 + ,25 + ,16 + ,21 + ,2042.451 + ,29 + ,18 + ,12 + ,21 + ,13 + ,21 + ,205.218 + ,19 + ,12 + ,7 + ,21 + ,9 + ,18 + ,373.648 + ,22 + ,13 + ,8 + ,19 + ,10 + ,18 + ,229.151 + ,23 + ,15 + ,10 + ,21 + ,10 + ,23 + ,199.156 + ,15 + ,12 + ,6 + ,21 + ,7 + ,19 + ,234.41 + ,20 + ,19 + ,10 + ,16 + ,9 + ,20 + ,56.519 + ,18 + ,15 + ,10 + ,22 + ,8 + ,21 + ,289.239 + ,23 + ,11 + ,10 + ,29 + ,14 + ,20 + ,199.227 + ,25 + ,11 + ,5 + ,15 + ,14 + ,17 + ,274.513 + ,21 + ,10 + ,7 + ,17 + ,8 + ,18 + ,174.499 + ,24 + ,13 + ,10 + ,15 + ,9 + ,19 + ,217.714 + ,25 + ,15 + ,11 + ,21 + ,14 + ,22 + ,239.717 + ,17 + ,12 + ,6 + ,21 + ,14 + ,15 + ,241.529 + ,13 + ,12 + ,7 + ,19 + ,8 + ,14 + ,155.561 + ,28 + ,16 + ,12 + ,24 + ,8 + ,18 + ,204.107 + ,21 + ,9 + ,11 + ,20 + ,8 + ,24 + ,745.97 + ,25 + ,18 + ,11 + ,17 + ,7 + ,35 + ,241.772 + ,9 + ,8 + ,11 + ,23 + ,6 + ,29 + ,110.267 + ,16 + ,13 + ,5 + ,24 + ,8 + ,21 + ,186.58 + ,19 + ,17 + ,8 + ,14 + ,6 + ,25 + ,227.906 + ,17 + ,9 + ,6 + ,19 + ,11 + ,20 + ,197.518 + ,25 + ,15 + ,9 + ,24 + ,14 + ,22 + ,254.094 + ,20 + ,8 + ,4 + ,13 + ,11 + ,13 + ,173.942 + ,29 + ,7 + ,4 + ,22 + ,11 + ,26 + ,294.42 + ,14 + ,12 + ,7 + ,16 + ,11 + ,17 + ,211.924 + ,22 + ,14 + ,11 + ,19 + ,14 + ,25 + ,262.479 + ,15 + ,6 + ,6 + ,25 + ,8 + ,20 + ,193.495 + ,19 + ,8 + ,7 + ,25 + ,20 + ,19 + ,165.972 + ,20 + ,17 + ,8 + ,23 + ,11 + ,21 + ,237.352 + ,15 + ,10 + ,4 + ,24 + ,8 + ,22 + ,205.814 + ,20 + ,11 + ,8 + ,26 + ,11 + ,24 + ,227.526 + ,18 + ,14 + ,9 + ,26 + ,10 + ,21 + ,250.439 + ,33 + ,11 + ,8 + ,25 + ,14 + ,26 + ,470.849 + ,22 + ,13 + ,11 + ,18 + ,11 + ,24 + ,176.469 + ,16 + ,12 + ,8 + ,21 + ,9 + ,16 + ,298.691 + ,17 + ,11 + ,5 + ,26 + ,9 + ,23 + ,193.922 + ,16 + ,9 + ,4 + ,23 + ,8 + ,18 + ,212.422 + ,21 + ,12 + ,8 + ,23 + ,10 + ,16 + ,203.284 + ,26 + ,20 + ,10 + ,22 + ,13 + ,26 + ,240.56 + ,18 + ,12 + ,6 + ,20 + ,13 + ,19 + ,445.327 + ,18 + ,13 + ,9 + ,13 + ,12 + ,21 + ,248.984 + ,17 + ,12 + ,9 + ,24 + ,8 + ,21 + ,174.44 + ,22 + ,12 + ,13 + ,15 + ,13 + ,22 + ,165.024 + ,30 + ,9 + ,9 + ,14 + ,14 + ,23 + ,249.681 + ,30 + ,15 + ,10 + ,22 + ,12 + ,29 + ,238.312 + ,24 + ,24 + ,20 + ,10 + ,14 + ,21 + ,250.437 + ,21 + ,7 + ,5 + ,24 + ,15 + ,21 + ,174.75 + ,21 + ,17 + ,11 + ,22 + ,13 + ,23 + ,4941.633 + ,29 + ,11 + ,6 + ,24 + ,16 + ,27 + ,138.936 + ,31 + ,17 + ,9 + ,19 + ,9 + ,25 + ,203.181 + ,20 + ,11 + ,7 + ,20 + ,9 + ,21 + ,187.747 + ,16 + ,12 + ,9 + ,13 + ,9 + ,10 + ,270.95 + ,22 + ,14 + ,10 + ,20 + ,8 + ,20 + ,307.688 + ,20 + ,11 + ,9 + ,22 + ,7 + ,26 + ,184.477 + ,28 + ,16 + ,8 + ,24 + ,16 + ,24 + ,230.916 + ,38 + ,21 + ,7 + ,29 + ,11 + ,29 + ,187.286 + ,22 + ,14 + ,6 + ,12 + ,9 + ,19 + ,169.376 + ,20 + ,20 + ,13 + ,20 + ,11 + ,24 + ,182.838 + ,17 + ,13 + ,6 + ,21 + ,9 + ,19 + ,176.081 + ,28 + ,11 + ,8 + ,24 + ,14 + ,24 + ,248.056 + ,22 + ,15 + ,10 + ,22 + ,13 + ,22 + ,235.24 + ,31 + ,19 + ,16 + ,20 + ,16 + ,17 + ,76.347) + ,dim=c(7 + ,159) + ,dimnames=list(c('CM' + ,'PE' + ,'PC' + ,'O' + ,'D' + ,'PS' + ,'Time') + ,1:159)) > y <- array(NA,dim=c(7,159),dimnames=list(c('CM','PE','PC','O','D','PS','Time'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '5' > #'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 D CM PE PC O PS Time 1 14 24 11 12 26 24 237.588 2 11 25 7 8 23 25 164.083 3 6 17 17 8 25 30 278.261 4 12 18 10 8 23 19 220.360 5 8 18 12 9 19 22 253.967 6 10 16 12 7 29 22 422.310 7 10 20 11 4 25 25 136.921 8 11 16 11 11 21 23 143.495 9 16 18 12 7 22 17 189.785 10 11 17 13 7 25 21 219.529 11 13 23 14 12 24 19 217.761 12 12 30 16 10 18 19 221.754 13 8 23 11 10 22 15 159.854 14 12 18 10 8 15 16 209.464 15 11 15 11 8 22 23 174.283 16 4 12 15 4 28 27 154.550 17 9 21 9 9 20 22 153.024 18 8 15 11 8 12 14 162.490 19 8 20 17 7 24 22 154.462 20 14 31 17 11 20 23 249.671 21 15 27 11 9 21 23 259.473 22 16 34 18 11 20 21 155.337 23 9 21 14 13 21 19 151.289 24 14 31 10 8 23 18 276.614 25 11 19 11 8 28 20 188.214 26 8 16 15 9 24 23 181.098 27 9 20 15 6 24 25 240.898 28 9 21 13 9 24 19 244.551 29 9 22 16 9 23 24 250.238 30 9 17 13 6 23 22 183.129 31 10 24 9 6 29 25 310.331 32 16 25 18 16 24 26 281.942 33 11 26 18 5 18 29 230.343 34 8 25 12 7 25 32 161.563 35 9 17 17 9 21 25 392.527 36 16 32 9 6 26 29 1077.414 37 11 33 9 6 22 28 248.275 38 16 13 12 5 22 17 557.386 39 12 32 18 12 22 28 731.874 40 12 25 12 7 23 29 301.429 41 14 29 18 10 30 26 226.360 42 9 22 14 9 23 25 215.018 43 10 18 15 8 17 14 157.672 44 9 17 16 5 23 25 219.118 45 10 20 10 8 23 26 213.019 46 12 15 11 8 25 20 390.642 47 14 20 14 10 24 18 157.124 48 14 33 9 6 24 32 227.652 49 10 29 12 8 23 25 239.266 50 14 23 17 7 21 25 506.343 51 16 26 5 4 24 23 149.219 52 9 18 12 8 24 21 213.351 53 10 20 12 8 28 20 174.517 54 6 11 6 4 16 15 172.531 55 8 28 24 20 20 30 320.656 56 13 26 12 8 29 24 305.011 57 10 22 12 8 27 26 266.495 58 8 17 14 6 22 24 361.511 59 7 12 7 4 28 22 361.019 60 15 14 13 8 16 14 382.187 61 9 17 12 9 25 24 196.763 62 10 21 13 6 24 24 273.212 63 12 19 14 7 28 24 186.397 64 13 18 8 9 24 24 294.205 65 10 10 11 5 23 19 364.685 66 11 29 9 5 30 31 230.501 67 8 31 11 8 24 22 217.510 68 9 19 13 8 21 27 262.297 69 13 9 10 6 25 19 169.246 70 11 20 11 8 25 25 260.428 71 8 28 12 7 22 20 348.187 72 9 19 9 7 23 21 512.937 73 9 30 15 9 26 27 164.496 74 15 29 18 11 23 23 111.187 75 9 26 15 6 25 25 169.999 76 10 23 12 8 21 20 240.187 77 14 13 13 6 25 21 187.158 78 12 21 14 9 24 22 194.096 79 12 19 10 8 29 23 265.846 80 11 28 13 6 22 25 283.319 81 14 23 13 10 27 25 356.938 82 6 18 11 8 26 17 240.802 83 12 21 13 8 22 19 326.662 84 8 20 16 10 24 25 249.266 85 14 23 8 5 27 19 277.368 86 11 21 16 7 24 20 394.618 87 10 21 11 5 24 26 235.686 88 14 15 9 8 29 23 227.641 89 12 28 16 14 22 27 159.593 90 10 19 12 7 21 17 268.866 91 14 26 14 8 24 17 206.466 92 5 10 8 6 24 19 233.064 93 11 16 9 5 23 17 133.824 94 10 22 15 6 20 22 486.783 95 9 19 11 10 27 21 228.859 96 10 31 21 12 26 32 155.238 97 16 31 14 9 25 21 2042.451 98 13 29 18 12 21 21 205.218 99 9 19 12 7 21 18 373.648 100 10 22 13 8 19 18 229.151 101 10 23 15 10 21 23 199.156 102 7 15 12 6 21 19 234.410 103 9 20 19 10 16 20 56.519 104 8 18 15 10 22 21 289.239 105 14 23 11 10 29 20 199.227 106 14 25 11 5 15 17 274.513 107 8 21 10 7 17 18 174.499 108 9 24 13 10 15 19 217.714 109 14 25 15 11 21 22 239.717 110 14 17 12 6 21 15 241.529 111 8 13 12 7 19 14 155.561 112 8 28 16 12 24 18 204.107 113 8 21 9 11 20 24 745.970 114 7 25 18 11 17 35 241.772 115 6 9 8 11 23 29 110.267 116 8 16 13 5 24 21 186.580 117 6 19 17 8 14 25 227.906 118 11 17 9 6 19 20 197.518 119 14 25 15 9 24 22 254.094 120 11 20 8 4 13 13 173.942 121 11 29 7 4 22 26 294.420 122 11 14 12 7 16 17 211.924 123 14 22 14 11 19 25 262.479 124 8 15 6 6 25 20 193.495 125 20 19 8 7 25 19 165.972 126 11 20 17 8 23 21 237.352 127 8 15 10 4 24 22 205.814 128 11 20 11 8 26 24 227.526 129 10 18 14 9 26 21 250.439 130 14 33 11 8 25 26 470.849 131 11 22 13 11 18 24 176.469 132 9 16 12 8 21 16 298.691 133 9 17 11 5 26 23 193.922 134 8 16 9 4 23 18 212.422 135 10 21 12 8 23 16 203.284 136 13 26 20 10 22 26 240.560 137 13 18 12 6 20 19 445.327 138 12 18 13 9 13 21 248.984 139 8 17 12 9 24 21 174.440 140 13 22 12 13 15 22 165.024 141 14 30 9 9 14 23 249.681 142 12 30 15 10 22 29 238.312 143 14 24 24 20 10 21 250.437 144 15 21 7 5 24 21 174.750 145 13 21 17 11 22 23 4941.633 146 16 29 11 6 24 27 138.936 147 9 31 17 9 19 25 203.181 148 9 20 11 7 20 21 187.747 149 9 16 12 9 13 10 270.950 150 8 22 14 10 20 20 307.688 151 7 20 11 9 22 26 184.477 152 16 28 16 8 24 24 230.916 153 11 38 21 7 29 29 187.286 154 9 22 14 6 12 19 169.376 155 11 20 20 13 20 24 182.838 156 9 17 13 6 21 19 176.081 157 14 28 11 8 24 24 248.056 158 13 22 15 10 22 22 235.240 159 16 31 19 16 20 17 76.347 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) CM PE PC O PS 7.4732544 0.2467420 -0.1118291 0.1443446 0.1058029 -0.1917108 Time 0.0007842 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.5734 -1.8049 -0.3583 1.5862 8.5901 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.4732544 1.5740901 4.748 4.72e-06 *** CM 0.2467420 0.0398349 6.194 5.23e-09 *** PE -0.1118291 0.0736176 -1.519 0.130826 PC 0.1443446 0.0923782 1.563 0.120240 O 0.1058029 0.0563797 1.877 0.062488 . PS -0.1917108 0.0564464 -3.396 0.000872 *** Time 0.0007842 0.0004755 1.649 0.101178 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.468 on 152 degrees of freedom Multiple R-squared: 0.2529, Adjusted R-squared: 0.2234 F-statistic: 8.576 on 6 and 152 DF, p-value: 4.931e-08 > 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.17319726 0.3463945 0.8268027 [2,] 0.27390789 0.5478158 0.7260921 [3,] 0.15819228 0.3163846 0.8418077 [4,] 0.85428979 0.2914204 0.1457102 [5,] 0.79527067 0.4094587 0.2047293 [6,] 0.72131203 0.5573759 0.2786880 [7,] 0.76623209 0.4675358 0.2337679 [8,] 0.74304904 0.5139019 0.2569510 [9,] 0.72145862 0.5570828 0.2785414 [10,] 0.65217379 0.6956524 0.3478262 [11,] 0.63932681 0.7213464 0.3606732 [12,] 0.62685310 0.7462938 0.3731469 [13,] 0.61405413 0.7718917 0.3859459 [14,] 0.59341097 0.8131781 0.4065890 [15,] 0.55819204 0.8836159 0.4418080 [16,] 0.48541165 0.9708233 0.5145884 [17,] 0.41869671 0.8373934 0.5813033 [18,] 0.35255282 0.7051056 0.6474472 [19,] 0.35001174 0.7000235 0.6499883 [20,] 0.30264354 0.6052871 0.6973565 [21,] 0.24744127 0.4948825 0.7525587 [22,] 0.23503121 0.4700624 0.7649688 [23,] 0.30140205 0.6028041 0.6985979 [24,] 0.26746510 0.5349302 0.7325349 [25,] 0.25202928 0.5040586 0.7479707 [26,] 0.20892643 0.4178529 0.7910736 [27,] 0.17877335 0.3575467 0.8212267 [28,] 0.15870508 0.3174102 0.8412949 [29,] 0.34067894 0.6813579 0.6593211 [30,] 0.37023400 0.7404680 0.6297660 [31,] 0.34494029 0.6898806 0.6550597 [32,] 0.32646274 0.6529255 0.6735373 [33,] 0.29064777 0.5812955 0.7093522 [34,] 0.25040907 0.5008181 0.7495909 [35,] 0.21194280 0.4238856 0.7880572 [36,] 0.17495092 0.3499018 0.8250491 [37,] 0.15019678 0.3003936 0.8498032 [38,] 0.15317620 0.3063524 0.8468238 [39,] 0.15625481 0.3125096 0.8437452 [40,] 0.15103374 0.3020675 0.8489663 [41,] 0.16703358 0.3340672 0.8329664 [42,] 0.24002082 0.4800416 0.7599792 [43,] 0.21461046 0.4292209 0.7853895 [44,] 0.18915031 0.3783006 0.8108497 [45,] 0.20996707 0.4199341 0.7900329 [46,] 0.23100134 0.4620027 0.7689987 [47,] 0.19535513 0.3907103 0.8046449 [48,] 0.16557226 0.3311445 0.8344277 [49,] 0.14441398 0.2888280 0.8555860 [50,] 0.14602700 0.2920540 0.8539730 [51,] 0.21955861 0.4391172 0.7804414 [52,] 0.18708490 0.3741698 0.8129151 [53,] 0.15643214 0.3128643 0.8435679 [54,] 0.14977888 0.2995578 0.8502211 [55,] 0.15452847 0.3090569 0.8454715 [56,] 0.13216418 0.2643284 0.8678358 [57,] 0.10875889 0.2175178 0.8912411 [58,] 0.23356166 0.4671233 0.7664383 [59,] 0.19832848 0.3966570 0.8016715 [60,] 0.28618308 0.5723662 0.7138169 [61,] 0.24938601 0.4987720 0.7506140 [62,] 0.39024545 0.7804909 0.6097545 [63,] 0.40027032 0.8005406 0.5997297 [64,] 0.41925001 0.8385000 0.5807500 [65,] 0.44403922 0.8880784 0.5559608 [66,] 0.42356859 0.8471372 0.5764314 [67,] 0.39617256 0.7923451 0.6038274 [68,] 0.56810129 0.8637974 0.4318987 [69,] 0.53340619 0.9331876 0.4665938 [70,] 0.49287779 0.9857556 0.5071222 [71,] 0.44947399 0.8989480 0.5505260 [72,] 0.44510605 0.8902121 0.5548940 [73,] 0.63194272 0.7361146 0.3680573 [74,] 0.58939130 0.8212174 0.4106087 [75,] 0.57034788 0.8593042 0.4296521 [76,] 0.54008563 0.9198287 0.4599144 [77,] 0.49550309 0.9910062 0.5044969 [78,] 0.44887398 0.8977480 0.5511260 [79,] 0.52724094 0.9455181 0.4727591 [80,] 0.48289548 0.9657910 0.5171045 [81,] 0.44330536 0.8866107 0.5566946 [82,] 0.40647530 0.8129506 0.5935247 [83,] 0.46782102 0.9356420 0.5321790 [84,] 0.42633859 0.8526772 0.5736614 [85,] 0.38423023 0.7684605 0.6157698 [86,] 0.37936292 0.7587258 0.6206371 [87,] 0.34477999 0.6895600 0.6552200 [88,] 0.32404814 0.6480963 0.6759519 [89,] 0.28309834 0.5661967 0.7169017 [90,] 0.26502056 0.5300411 0.7349794 [91,] 0.23701264 0.4740253 0.7629874 [92,] 0.20538210 0.4107642 0.7946179 [93,] 0.19850515 0.3970103 0.8014949 [94,] 0.16680237 0.3336047 0.8331976 [95,] 0.15909244 0.3181849 0.8409076 [96,] 0.13592742 0.2718548 0.8640726 [97,] 0.13202586 0.2640517 0.8679741 [98,] 0.14286087 0.2857217 0.8571391 [99,] 0.14669065 0.2933813 0.8533094 [100,] 0.13753191 0.2750638 0.8624681 [101,] 0.16096950 0.3219390 0.8390305 [102,] 0.14182883 0.2836577 0.8581712 [103,] 0.33552672 0.6710534 0.6644733 [104,] 0.41928090 0.8385618 0.5807191 [105,] 0.38270436 0.7654087 0.6172956 [106,] 0.36994742 0.7398948 0.6300526 [107,] 0.32753687 0.6550737 0.6724631 [108,] 0.31231459 0.6246292 0.6876854 [109,] 0.27346602 0.5469320 0.7265340 [110,] 0.25582328 0.5116466 0.7441767 [111,] 0.21412681 0.4282536 0.7858732 [112,] 0.19017978 0.3803596 0.8098202 [113,] 0.17876974 0.3575395 0.8212303 [114,] 0.19129114 0.3825823 0.8087089 [115,] 0.20184923 0.4036985 0.7981508 [116,] 0.76911857 0.4617629 0.2308814 [117,] 0.73329388 0.5334122 0.2667061 [118,] 0.68228874 0.6354225 0.3177113 [119,] 0.62321554 0.7535689 0.3767845 [120,] 0.56082039 0.8783592 0.4391796 [121,] 0.49928034 0.9985607 0.5007197 [122,] 0.44062174 0.8812435 0.5593783 [123,] 0.38475231 0.7695046 0.6152477 [124,] 0.32191167 0.6438233 0.6780883 [125,] 0.28062419 0.5612484 0.7193758 [126,] 0.24753177 0.4950635 0.7524682 [127,] 0.23345589 0.4669118 0.7665441 [128,] 0.26727588 0.5345518 0.7327241 [129,] 0.27950169 0.5590034 0.7204983 [130,] 0.28028154 0.5605631 0.7197185 [131,] 0.22141332 0.4428266 0.7785867 [132,] 0.16638652 0.3327730 0.8336135 [133,] 0.12238706 0.2447741 0.8776129 [134,] 0.15557418 0.3111484 0.8444258 [135,] 0.14402687 0.2880537 0.8559731 [136,] 0.13573397 0.2714679 0.8642660 [137,] 0.19193026 0.3838605 0.8080697 [138,] 0.15508580 0.3101716 0.8449142 [139,] 0.09292566 0.1858513 0.9070743 [140,] 0.05636212 0.1127242 0.9436379 > postscript(file="/var/www/html/rcomp/tmp/14lyj1290548313.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/24lyj1290548313.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/3xvg41290548313.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/4xvg41290548313.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/5xvg41290548313.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 = 159 Frequency = 1 1 2 3 4 5 6 1.76678835 -0.78312869 -2.03349367 1.08515447 -1.86354313 -0.27141534 7 8 9 10 11 12 0.28497090 1.29616103 5.19951585 0.98419583 0.61761798 -0.96554248 13 14 15 16 17 18 -4.93900614 1.36498984 1.84598959 -3.24158897 -1.96589842 -1.81213058 19 20 21 22 23 24 -1.96017367 1.28854461 2.77973734 2.35070415 -2.66370595 -0.35831682 25 26 27 28 29 30 -0.36185266 -1.31473072 -0.53213907 -2.58870245 -1.44006014 -0.43959773 31 32 33 34 35 36 -1.77354602 4.28571603 1.87717878 -1.94729264 0.19721048 2.73521421 37 38 39 40 41 42 -1.62980613 6.43363763 -0.62191414 1.57949611 1.57358667 -1.44438760 43 44 45 46 47 48 -0.63027607 0.58714350 -0.06059705 1.78377726 2.50237454 1.94160408 49 50 51 52 53 54 -2.26991047 3.91619204 3.84628164 -1.40807209 -1.48602416 -3.04630480 55 56 57 58 59 60 -3.20121904 0.59222938 -0.79557077 -0.97843354 -2.25669118 5.06276903 61 62 63 64 65 66 -0.82333674 -0.21959104 1.88624728 2.51199258 1.49077158 -0.75584571 67 68 69 70 71 72 -5.53909738 -0.11369569 4.42299976 0.61073681 -4.81699215 -1.97509287 73 74 75 76 77 78 -3.20086122 2.68504987 -2.06279382 -1.53712917 5.14089399 1.13782642 79 80 81 82 83 84 0.93476777 -0.55139425 2.51818988 -5.51987747 0.70285543 -2.00425066 85 86 87 88 89 90 1.59290245 0.10950044 0.11394528 3.83986732 0.10978526 -1.00343953 91 92 93 94 95 96 1.08020661 -3.99164437 0.58428410 -0.37036989 -2.38490251 -1.24384823 97 98 99 100 101 102 0.92339063 0.29514917 -1.89390007 -1.34171939 -0.88302172 -2.46168472 103 104 105 106 107 108 -0.62973980 -2.20918056 1.24805092 2.32335760 -3.03165562 -2.50000121 109 110 111 112 113 114 2.25563056 3.27240543 -1.79765924 -5.57343676 -3.33616155 -1.49504204 115 116 117 118 119 120 -1.34741579 -1.34873114 -2.28221096 1.14159176 2.21563653 -0.11044371 121 122 123 124 125 126 -0.99741634 1.80393921 3.65291518 -2.33207394 8.59014492 0.74457047 127 128 129 130 131 132 -1.11650463 0.33902531 -0.56944910 0.42978744 0.52262826 -1.62265817 133 134 135 136 137 138 -0.65307314 -2.14129803 -1.99315435 2.37275786 2.73848859 2.69530012 139 140 141 142 143 144 -2.27516025 2.06507231 1.56415236 0.40353982 3.17344700 3.75586173 145 146 147 148 149 150 -1.13513549 4.26324835 -2.89708372 -1.42575006 -2.04908970 -3.30255046 151 152 153 154 155 156 -2.96492670 4.13318240 -2.16699232 -0.96199395 1.29362627 -0.79759722 157 158 159 1.56059552 2.03790907 1.77613791 > postscript(file="/var/www/html/rcomp/tmp/6p4fp1290548313.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 1.76678835 NA 1 -0.78312869 1.76678835 2 -2.03349367 -0.78312869 3 1.08515447 -2.03349367 4 -1.86354313 1.08515447 5 -0.27141534 -1.86354313 6 0.28497090 -0.27141534 7 1.29616103 0.28497090 8 5.19951585 1.29616103 9 0.98419583 5.19951585 10 0.61761798 0.98419583 11 -0.96554248 0.61761798 12 -4.93900614 -0.96554248 13 1.36498984 -4.93900614 14 1.84598959 1.36498984 15 -3.24158897 1.84598959 16 -1.96589842 -3.24158897 17 -1.81213058 -1.96589842 18 -1.96017367 -1.81213058 19 1.28854461 -1.96017367 20 2.77973734 1.28854461 21 2.35070415 2.77973734 22 -2.66370595 2.35070415 23 -0.35831682 -2.66370595 24 -0.36185266 -0.35831682 25 -1.31473072 -0.36185266 26 -0.53213907 -1.31473072 27 -2.58870245 -0.53213907 28 -1.44006014 -2.58870245 29 -0.43959773 -1.44006014 30 -1.77354602 -0.43959773 31 4.28571603 -1.77354602 32 1.87717878 4.28571603 33 -1.94729264 1.87717878 34 0.19721048 -1.94729264 35 2.73521421 0.19721048 36 -1.62980613 2.73521421 37 6.43363763 -1.62980613 38 -0.62191414 6.43363763 39 1.57949611 -0.62191414 40 1.57358667 1.57949611 41 -1.44438760 1.57358667 42 -0.63027607 -1.44438760 43 0.58714350 -0.63027607 44 -0.06059705 0.58714350 45 1.78377726 -0.06059705 46 2.50237454 1.78377726 47 1.94160408 2.50237454 48 -2.26991047 1.94160408 49 3.91619204 -2.26991047 50 3.84628164 3.91619204 51 -1.40807209 3.84628164 52 -1.48602416 -1.40807209 53 -3.04630480 -1.48602416 54 -3.20121904 -3.04630480 55 0.59222938 -3.20121904 56 -0.79557077 0.59222938 57 -0.97843354 -0.79557077 58 -2.25669118 -0.97843354 59 5.06276903 -2.25669118 60 -0.82333674 5.06276903 61 -0.21959104 -0.82333674 62 1.88624728 -0.21959104 63 2.51199258 1.88624728 64 1.49077158 2.51199258 65 -0.75584571 1.49077158 66 -5.53909738 -0.75584571 67 -0.11369569 -5.53909738 68 4.42299976 -0.11369569 69 0.61073681 4.42299976 70 -4.81699215 0.61073681 71 -1.97509287 -4.81699215 72 -3.20086122 -1.97509287 73 2.68504987 -3.20086122 74 -2.06279382 2.68504987 75 -1.53712917 -2.06279382 76 5.14089399 -1.53712917 77 1.13782642 5.14089399 78 0.93476777 1.13782642 79 -0.55139425 0.93476777 80 2.51818988 -0.55139425 81 -5.51987747 2.51818988 82 0.70285543 -5.51987747 83 -2.00425066 0.70285543 84 1.59290245 -2.00425066 85 0.10950044 1.59290245 86 0.11394528 0.10950044 87 3.83986732 0.11394528 88 0.10978526 3.83986732 89 -1.00343953 0.10978526 90 1.08020661 -1.00343953 91 -3.99164437 1.08020661 92 0.58428410 -3.99164437 93 -0.37036989 0.58428410 94 -2.38490251 -0.37036989 95 -1.24384823 -2.38490251 96 0.92339063 -1.24384823 97 0.29514917 0.92339063 98 -1.89390007 0.29514917 99 -1.34171939 -1.89390007 100 -0.88302172 -1.34171939 101 -2.46168472 -0.88302172 102 -0.62973980 -2.46168472 103 -2.20918056 -0.62973980 104 1.24805092 -2.20918056 105 2.32335760 1.24805092 106 -3.03165562 2.32335760 107 -2.50000121 -3.03165562 108 2.25563056 -2.50000121 109 3.27240543 2.25563056 110 -1.79765924 3.27240543 111 -5.57343676 -1.79765924 112 -3.33616155 -5.57343676 113 -1.49504204 -3.33616155 114 -1.34741579 -1.49504204 115 -1.34873114 -1.34741579 116 -2.28221096 -1.34873114 117 1.14159176 -2.28221096 118 2.21563653 1.14159176 119 -0.11044371 2.21563653 120 -0.99741634 -0.11044371 121 1.80393921 -0.99741634 122 3.65291518 1.80393921 123 -2.33207394 3.65291518 124 8.59014492 -2.33207394 125 0.74457047 8.59014492 126 -1.11650463 0.74457047 127 0.33902531 -1.11650463 128 -0.56944910 0.33902531 129 0.42978744 -0.56944910 130 0.52262826 0.42978744 131 -1.62265817 0.52262826 132 -0.65307314 -1.62265817 133 -2.14129803 -0.65307314 134 -1.99315435 -2.14129803 135 2.37275786 -1.99315435 136 2.73848859 2.37275786 137 2.69530012 2.73848859 138 -2.27516025 2.69530012 139 2.06507231 -2.27516025 140 1.56415236 2.06507231 141 0.40353982 1.56415236 142 3.17344700 0.40353982 143 3.75586173 3.17344700 144 -1.13513549 3.75586173 145 4.26324835 -1.13513549 146 -2.89708372 4.26324835 147 -1.42575006 -2.89708372 148 -2.04908970 -1.42575006 149 -3.30255046 -2.04908970 150 -2.96492670 -3.30255046 151 4.13318240 -2.96492670 152 -2.16699232 4.13318240 153 -0.96199395 -2.16699232 154 1.29362627 -0.96199395 155 -0.79759722 1.29362627 156 1.56059552 -0.79759722 157 2.03790907 1.56059552 158 1.77613791 2.03790907 159 NA 1.77613791 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.78312869 1.76678835 [2,] -2.03349367 -0.78312869 [3,] 1.08515447 -2.03349367 [4,] -1.86354313 1.08515447 [5,] -0.27141534 -1.86354313 [6,] 0.28497090 -0.27141534 [7,] 1.29616103 0.28497090 [8,] 5.19951585 1.29616103 [9,] 0.98419583 5.19951585 [10,] 0.61761798 0.98419583 [11,] -0.96554248 0.61761798 [12,] -4.93900614 -0.96554248 [13,] 1.36498984 -4.93900614 [14,] 1.84598959 1.36498984 [15,] -3.24158897 1.84598959 [16,] -1.96589842 -3.24158897 [17,] -1.81213058 -1.96589842 [18,] -1.96017367 -1.81213058 [19,] 1.28854461 -1.96017367 [20,] 2.77973734 1.28854461 [21,] 2.35070415 2.77973734 [22,] -2.66370595 2.35070415 [23,] -0.35831682 -2.66370595 [24,] -0.36185266 -0.35831682 [25,] -1.31473072 -0.36185266 [26,] -0.53213907 -1.31473072 [27,] -2.58870245 -0.53213907 [28,] -1.44006014 -2.58870245 [29,] -0.43959773 -1.44006014 [30,] -1.77354602 -0.43959773 [31,] 4.28571603 -1.77354602 [32,] 1.87717878 4.28571603 [33,] -1.94729264 1.87717878 [34,] 0.19721048 -1.94729264 [35,] 2.73521421 0.19721048 [36,] -1.62980613 2.73521421 [37,] 6.43363763 -1.62980613 [38,] -0.62191414 6.43363763 [39,] 1.57949611 -0.62191414 [40,] 1.57358667 1.57949611 [41,] -1.44438760 1.57358667 [42,] -0.63027607 -1.44438760 [43,] 0.58714350 -0.63027607 [44,] -0.06059705 0.58714350 [45,] 1.78377726 -0.06059705 [46,] 2.50237454 1.78377726 [47,] 1.94160408 2.50237454 [48,] -2.26991047 1.94160408 [49,] 3.91619204 -2.26991047 [50,] 3.84628164 3.91619204 [51,] -1.40807209 3.84628164 [52,] -1.48602416 -1.40807209 [53,] -3.04630480 -1.48602416 [54,] -3.20121904 -3.04630480 [55,] 0.59222938 -3.20121904 [56,] -0.79557077 0.59222938 [57,] -0.97843354 -0.79557077 [58,] -2.25669118 -0.97843354 [59,] 5.06276903 -2.25669118 [60,] -0.82333674 5.06276903 [61,] -0.21959104 -0.82333674 [62,] 1.88624728 -0.21959104 [63,] 2.51199258 1.88624728 [64,] 1.49077158 2.51199258 [65,] -0.75584571 1.49077158 [66,] -5.53909738 -0.75584571 [67,] -0.11369569 -5.53909738 [68,] 4.42299976 -0.11369569 [69,] 0.61073681 4.42299976 [70,] -4.81699215 0.61073681 [71,] -1.97509287 -4.81699215 [72,] -3.20086122 -1.97509287 [73,] 2.68504987 -3.20086122 [74,] -2.06279382 2.68504987 [75,] -1.53712917 -2.06279382 [76,] 5.14089399 -1.53712917 [77,] 1.13782642 5.14089399 [78,] 0.93476777 1.13782642 [79,] -0.55139425 0.93476777 [80,] 2.51818988 -0.55139425 [81,] -5.51987747 2.51818988 [82,] 0.70285543 -5.51987747 [83,] -2.00425066 0.70285543 [84,] 1.59290245 -2.00425066 [85,] 0.10950044 1.59290245 [86,] 0.11394528 0.10950044 [87,] 3.83986732 0.11394528 [88,] 0.10978526 3.83986732 [89,] -1.00343953 0.10978526 [90,] 1.08020661 -1.00343953 [91,] -3.99164437 1.08020661 [92,] 0.58428410 -3.99164437 [93,] -0.37036989 0.58428410 [94,] -2.38490251 -0.37036989 [95,] -1.24384823 -2.38490251 [96,] 0.92339063 -1.24384823 [97,] 0.29514917 0.92339063 [98,] -1.89390007 0.29514917 [99,] -1.34171939 -1.89390007 [100,] -0.88302172 -1.34171939 [101,] -2.46168472 -0.88302172 [102,] -0.62973980 -2.46168472 [103,] -2.20918056 -0.62973980 [104,] 1.24805092 -2.20918056 [105,] 2.32335760 1.24805092 [106,] -3.03165562 2.32335760 [107,] -2.50000121 -3.03165562 [108,] 2.25563056 -2.50000121 [109,] 3.27240543 2.25563056 [110,] -1.79765924 3.27240543 [111,] -5.57343676 -1.79765924 [112,] -3.33616155 -5.57343676 [113,] -1.49504204 -3.33616155 [114,] -1.34741579 -1.49504204 [115,] -1.34873114 -1.34741579 [116,] -2.28221096 -1.34873114 [117,] 1.14159176 -2.28221096 [118,] 2.21563653 1.14159176 [119,] -0.11044371 2.21563653 [120,] -0.99741634 -0.11044371 [121,] 1.80393921 -0.99741634 [122,] 3.65291518 1.80393921 [123,] -2.33207394 3.65291518 [124,] 8.59014492 -2.33207394 [125,] 0.74457047 8.59014492 [126,] -1.11650463 0.74457047 [127,] 0.33902531 -1.11650463 [128,] -0.56944910 0.33902531 [129,] 0.42978744 -0.56944910 [130,] 0.52262826 0.42978744 [131,] -1.62265817 0.52262826 [132,] -0.65307314 -1.62265817 [133,] -2.14129803 -0.65307314 [134,] -1.99315435 -2.14129803 [135,] 2.37275786 -1.99315435 [136,] 2.73848859 2.37275786 [137,] 2.69530012 2.73848859 [138,] -2.27516025 2.69530012 [139,] 2.06507231 -2.27516025 [140,] 1.56415236 2.06507231 [141,] 0.40353982 1.56415236 [142,] 3.17344700 0.40353982 [143,] 3.75586173 3.17344700 [144,] -1.13513549 3.75586173 [145,] 4.26324835 -1.13513549 [146,] -2.89708372 4.26324835 [147,] -1.42575006 -2.89708372 [148,] -2.04908970 -1.42575006 [149,] -3.30255046 -2.04908970 [150,] -2.96492670 -3.30255046 [151,] 4.13318240 -2.96492670 [152,] -2.16699232 4.13318240 [153,] -0.96199395 -2.16699232 [154,] 1.29362627 -0.96199395 [155,] -0.79759722 1.29362627 [156,] 1.56059552 -0.79759722 [157,] 2.03790907 1.56059552 [158,] 1.77613791 2.03790907 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.78312869 1.76678835 2 -2.03349367 -0.78312869 3 1.08515447 -2.03349367 4 -1.86354313 1.08515447 5 -0.27141534 -1.86354313 6 0.28497090 -0.27141534 7 1.29616103 0.28497090 8 5.19951585 1.29616103 9 0.98419583 5.19951585 10 0.61761798 0.98419583 11 -0.96554248 0.61761798 12 -4.93900614 -0.96554248 13 1.36498984 -4.93900614 14 1.84598959 1.36498984 15 -3.24158897 1.84598959 16 -1.96589842 -3.24158897 17 -1.81213058 -1.96589842 18 -1.96017367 -1.81213058 19 1.28854461 -1.96017367 20 2.77973734 1.28854461 21 2.35070415 2.77973734 22 -2.66370595 2.35070415 23 -0.35831682 -2.66370595 24 -0.36185266 -0.35831682 25 -1.31473072 -0.36185266 26 -0.53213907 -1.31473072 27 -2.58870245 -0.53213907 28 -1.44006014 -2.58870245 29 -0.43959773 -1.44006014 30 -1.77354602 -0.43959773 31 4.28571603 -1.77354602 32 1.87717878 4.28571603 33 -1.94729264 1.87717878 34 0.19721048 -1.94729264 35 2.73521421 0.19721048 36 -1.62980613 2.73521421 37 6.43363763 -1.62980613 38 -0.62191414 6.43363763 39 1.57949611 -0.62191414 40 1.57358667 1.57949611 41 -1.44438760 1.57358667 42 -0.63027607 -1.44438760 43 0.58714350 -0.63027607 44 -0.06059705 0.58714350 45 1.78377726 -0.06059705 46 2.50237454 1.78377726 47 1.94160408 2.50237454 48 -2.26991047 1.94160408 49 3.91619204 -2.26991047 50 3.84628164 3.91619204 51 -1.40807209 3.84628164 52 -1.48602416 -1.40807209 53 -3.04630480 -1.48602416 54 -3.20121904 -3.04630480 55 0.59222938 -3.20121904 56 -0.79557077 0.59222938 57 -0.97843354 -0.79557077 58 -2.25669118 -0.97843354 59 5.06276903 -2.25669118 60 -0.82333674 5.06276903 61 -0.21959104 -0.82333674 62 1.88624728 -0.21959104 63 2.51199258 1.88624728 64 1.49077158 2.51199258 65 -0.75584571 1.49077158 66 -5.53909738 -0.75584571 67 -0.11369569 -5.53909738 68 4.42299976 -0.11369569 69 0.61073681 4.42299976 70 -4.81699215 0.61073681 71 -1.97509287 -4.81699215 72 -3.20086122 -1.97509287 73 2.68504987 -3.20086122 74 -2.06279382 2.68504987 75 -1.53712917 -2.06279382 76 5.14089399 -1.53712917 77 1.13782642 5.14089399 78 0.93476777 1.13782642 79 -0.55139425 0.93476777 80 2.51818988 -0.55139425 81 -5.51987747 2.51818988 82 0.70285543 -5.51987747 83 -2.00425066 0.70285543 84 1.59290245 -2.00425066 85 0.10950044 1.59290245 86 0.11394528 0.10950044 87 3.83986732 0.11394528 88 0.10978526 3.83986732 89 -1.00343953 0.10978526 90 1.08020661 -1.00343953 91 -3.99164437 1.08020661 92 0.58428410 -3.99164437 93 -0.37036989 0.58428410 94 -2.38490251 -0.37036989 95 -1.24384823 -2.38490251 96 0.92339063 -1.24384823 97 0.29514917 0.92339063 98 -1.89390007 0.29514917 99 -1.34171939 -1.89390007 100 -0.88302172 -1.34171939 101 -2.46168472 -0.88302172 102 -0.62973980 -2.46168472 103 -2.20918056 -0.62973980 104 1.24805092 -2.20918056 105 2.32335760 1.24805092 106 -3.03165562 2.32335760 107 -2.50000121 -3.03165562 108 2.25563056 -2.50000121 109 3.27240543 2.25563056 110 -1.79765924 3.27240543 111 -5.57343676 -1.79765924 112 -3.33616155 -5.57343676 113 -1.49504204 -3.33616155 114 -1.34741579 -1.49504204 115 -1.34873114 -1.34741579 116 -2.28221096 -1.34873114 117 1.14159176 -2.28221096 118 2.21563653 1.14159176 119 -0.11044371 2.21563653 120 -0.99741634 -0.11044371 121 1.80393921 -0.99741634 122 3.65291518 1.80393921 123 -2.33207394 3.65291518 124 8.59014492 -2.33207394 125 0.74457047 8.59014492 126 -1.11650463 0.74457047 127 0.33902531 -1.11650463 128 -0.56944910 0.33902531 129 0.42978744 -0.56944910 130 0.52262826 0.42978744 131 -1.62265817 0.52262826 132 -0.65307314 -1.62265817 133 -2.14129803 -0.65307314 134 -1.99315435 -2.14129803 135 2.37275786 -1.99315435 136 2.73848859 2.37275786 137 2.69530012 2.73848859 138 -2.27516025 2.69530012 139 2.06507231 -2.27516025 140 1.56415236 2.06507231 141 0.40353982 1.56415236 142 3.17344700 0.40353982 143 3.75586173 3.17344700 144 -1.13513549 3.75586173 145 4.26324835 -1.13513549 146 -2.89708372 4.26324835 147 -1.42575006 -2.89708372 148 -2.04908970 -1.42575006 149 -3.30255046 -2.04908970 150 -2.96492670 -3.30255046 151 4.13318240 -2.96492670 152 -2.16699232 4.13318240 153 -0.96199395 -2.16699232 154 1.29362627 -0.96199395 155 -0.79759722 1.29362627 156 1.56059552 -0.79759722 157 2.03790907 1.56059552 158 1.77613791 2.03790907 > 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/7p4fp1290548313.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/8ivwa1290548313.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/9ivwa1290548313.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/10tmvd1290548313.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/11enci1290548313.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/12m8zd1290548313.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/13dx8f1290548313.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/14zg6l1290548313.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/152y591290548313.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/166hmf1290548313.tab") + } > > try(system("convert tmp/14lyj1290548313.ps tmp/14lyj1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/24lyj1290548313.ps tmp/24lyj1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/3xvg41290548313.ps tmp/3xvg41290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/4xvg41290548313.ps tmp/4xvg41290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/5xvg41290548313.ps tmp/5xvg41290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/6p4fp1290548313.ps tmp/6p4fp1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/7p4fp1290548313.ps tmp/7p4fp1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/8ivwa1290548313.ps tmp/8ivwa1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/9ivwa1290548313.ps tmp/9ivwa1290548313.png",intern=TRUE)) character(0) > try(system("convert tmp/10tmvd1290548313.ps tmp/10tmvd1290548313.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.199 1.786 10.582