R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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 + ,14 + ,11 + ,12 + ,24 + ,26 + ,237.588 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,164.083 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,278.261 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,220.36 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,253.967 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,422.31 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,136.921 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,143.495 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,189.785 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,219.529 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,217.761 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,221.754 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,159.854 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,209.464 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,174.283 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,154.55 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,153.024 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,162.49 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,154.462 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,249.671 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,259.473 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,155.337 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,151.289 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,276.614 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,188.214 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,181.098 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,240.898 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,244.551 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,250.238 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,183.129 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,310.331 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,281.942 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,230.343 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,161.563 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,392.527 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,1077.414 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,248.275 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,557.386 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,731.874 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,301.429 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,226.36 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,215.018 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,157.672 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,219.118 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,213.019 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,390.642 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,157.124 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,227.652 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,239.266 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,506.343 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,149.219 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,213.351 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,174.517 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,172.531 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,320.656 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,305.011 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,266.495 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,361.511 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,361.019 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,382.187 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,196.763 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,273.212 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,186.397 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,294.205 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,364.685 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,230.501 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,217.51 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,262.297 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,169.246 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,260.428 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,348.187 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,512.937 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,164.496 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,111.187 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,169.999 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,240.187 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,187.158 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,194.096 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,265.846 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,283.319 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,356.938 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,240.802 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,326.662 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,249.266 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,277.368 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,394.618 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,235.686 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,227.641 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,159.593 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,268.866 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,206.466 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,233.064 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,133.824 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,486.783 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,228.859 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,155.238 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,2042.451 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,205.218 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,373.648 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,229.151 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,199.156 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,234.41 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,56.519 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,289.239 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,199.227 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,274.513 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,174.499 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,217.714 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,239.717 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,241.529 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,155.561 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,204.107 + ,21 + ,8 + ,9 + ,11 + ,24 + ,20 + ,745.97 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,241.772 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,110.267 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,186.58 + ,19 + ,6 + ,17 + ,8 + ,25 + ,14 + ,227.906 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,197.518 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,254.094 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,173.942 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,294.42 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,211.924 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,262.479 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,193.495 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,165.972 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,237.352 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,205.814 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,227.526 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,250.439 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,470.849 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,176.469 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,298.691 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,193.922 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,212.422 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,203.284 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,240.56 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,445.327 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,248.984 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,174.44 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,165.024 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,249.681 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,238.312 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,250.437 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,174.75 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,4941.633 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,138.936 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,203.181 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,187.747 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,270.95 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,307.688 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,184.477 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,230.916 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,187.286 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,169.376 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,182.838 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,176.081 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,248.056 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,235.24 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20 + ,76.347) + ,dim=c(7 + ,159) + ,dimnames=list(c('CM' + ,'D' + ,'PE' + ,'PC' + ,'PS' + ,'O' + ,'Time') + ,1:159)) > y <- array(NA,dim=c(7,159),dimnames=list(c('CM','D','PE','PC','PS','O','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 PS CM D PE PC O Time 1 24 24 14 11 12 26 237.588 2 25 25 11 7 8 23 164.083 3 30 17 6 17 8 25 278.261 4 19 18 12 10 8 23 220.360 5 22 18 8 12 9 19 253.967 6 22 16 10 12 7 29 422.310 7 25 20 10 11 4 25 136.921 8 23 16 11 11 11 21 143.495 9 17 18 16 12 7 22 189.785 10 21 17 11 13 7 25 219.529 11 19 23 13 14 12 24 217.761 12 19 30 12 16 10 18 221.754 13 15 23 8 11 10 22 159.854 14 16 18 12 10 8 15 209.464 15 23 15 11 11 8 22 174.283 16 27 12 4 15 4 28 154.550 17 22 21 9 9 9 20 153.024 18 14 15 8 11 8 12 162.490 19 22 20 8 17 7 24 154.462 20 23 31 14 17 11 20 249.671 21 23 27 15 11 9 21 259.473 22 21 34 16 18 11 20 155.337 23 19 21 9 14 13 21 151.289 24 18 31 14 10 8 23 276.614 25 20 19 11 11 8 28 188.214 26 23 16 8 15 9 24 181.098 27 25 20 9 15 6 24 240.898 28 19 21 9 13 9 24 244.551 29 24 22 9 16 9 23 250.238 30 22 17 9 13 6 23 183.129 31 25 24 10 9 6 29 310.331 32 26 25 16 18 16 24 281.942 33 29 26 11 18 5 18 230.343 34 32 25 8 12 7 25 161.563 35 25 17 9 17 9 21 392.527 36 29 32 16 9 6 26 1077.414 37 28 33 11 9 6 22 248.275 38 17 13 16 12 5 22 557.386 39 28 32 12 18 12 22 731.874 40 29 25 12 12 7 23 301.429 41 26 29 14 18 10 30 226.360 42 25 22 9 14 9 23 215.018 43 14 18 10 15 8 17 157.672 44 25 17 9 16 5 23 219.118 45 26 20 10 10 8 23 213.019 46 20 15 12 11 8 25 390.642 47 18 20 14 14 10 24 157.124 48 32 33 14 9 6 24 227.652 49 25 29 10 12 8 23 239.266 50 25 23 14 17 7 21 506.343 51 23 26 16 5 4 24 149.219 52 21 18 9 12 8 24 213.351 53 20 20 10 12 8 28 174.517 54 15 11 6 6 4 16 172.531 55 30 28 8 24 20 20 320.656 56 24 26 13 12 8 29 305.011 57 26 22 10 12 8 27 266.495 58 24 17 8 14 6 22 361.511 59 22 12 7 7 4 28 361.019 60 14 14 15 13 8 16 382.187 61 24 17 9 12 9 25 196.763 62 24 21 10 13 6 24 273.212 63 24 19 12 14 7 28 186.397 64 24 18 13 8 9 24 294.205 65 19 10 10 11 5 23 364.685 66 31 29 11 9 5 30 230.501 67 22 31 8 11 8 24 217.510 68 27 19 9 13 8 21 262.297 69 19 9 13 10 6 25 169.246 70 25 20 11 11 8 25 260.428 71 20 28 8 12 7 22 348.187 72 21 19 9 9 7 23 512.937 73 27 30 9 15 9 26 164.496 74 23 29 15 18 11 23 111.187 75 25 26 9 15 6 25 169.999 76 20 23 10 12 8 21 240.187 77 21 13 14 13 6 25 187.158 78 22 21 12 14 9 24 194.096 79 23 19 12 10 8 29 265.846 80 25 28 11 13 6 22 283.319 81 25 23 14 13 10 27 356.938 82 17 18 6 11 8 26 240.802 83 19 21 12 13 8 22 326.662 84 25 20 8 16 10 24 249.266 85 19 23 14 8 5 27 277.368 86 20 21 11 16 7 24 394.618 87 26 21 10 11 5 24 235.686 88 23 15 14 9 8 29 227.641 89 27 28 12 16 14 22 159.593 90 17 19 10 12 7 21 268.866 91 17 26 14 14 8 24 206.466 92 19 10 5 8 6 24 233.064 93 17 16 11 9 5 23 133.824 94 22 22 10 15 6 20 486.783 95 21 19 9 11 10 27 228.859 96 32 31 10 21 12 26 155.238 97 21 31 16 14 9 25 2042.451 98 21 29 13 18 12 21 205.218 99 18 19 9 12 7 21 373.648 100 18 22 10 13 8 19 229.151 101 23 23 10 15 10 21 199.156 102 19 15 7 12 6 21 234.410 103 20 20 9 19 10 16 56.519 104 21 18 8 15 10 22 289.239 105 20 23 14 11 10 29 199.227 106 17 25 14 11 5 15 274.513 107 18 21 8 10 7 17 174.499 108 19 24 9 13 10 15 217.714 109 22 25 14 15 11 21 239.717 110 15 17 14 12 6 21 241.529 111 14 13 8 12 7 19 155.561 112 18 28 8 16 12 24 204.107 113 24 21 8 9 11 20 745.970 114 35 25 7 18 11 17 241.772 115 29 9 6 8 11 23 110.267 116 21 16 8 13 5 24 186.580 117 25 19 6 17 8 14 227.906 118 20 17 11 9 6 19 197.518 119 22 25 14 15 9 24 254.094 120 13 20 11 8 4 13 173.942 121 26 29 11 7 4 22 294.420 122 17 14 11 12 7 16 211.924 123 25 22 14 14 11 19 262.479 124 20 15 8 6 6 25 193.495 125 19 19 20 8 7 25 165.972 126 21 20 11 17 8 23 237.352 127 22 15 8 10 4 24 205.814 128 24 20 11 11 8 26 227.526 129 21 18 10 14 9 26 250.439 130 26 33 14 11 8 25 470.849 131 24 22 11 13 11 18 176.469 132 16 16 9 12 8 21 298.691 133 23 17 9 11 5 26 193.922 134 18 16 8 9 4 23 212.422 135 16 21 10 12 8 23 203.284 136 26 26 13 20 10 22 240.560 137 19 18 13 12 6 20 445.327 138 21 18 12 13 9 13 248.984 139 21 17 8 12 9 24 174.440 140 22 22 13 12 13 15 165.024 141 23 30 14 9 9 14 249.681 142 29 30 12 15 10 22 238.312 143 21 24 14 24 20 10 250.437 144 21 21 15 7 5 24 174.750 145 23 21 13 17 11 22 4941.633 146 27 29 16 11 6 24 138.936 147 25 31 9 17 9 19 203.181 148 21 20 9 11 7 20 187.747 149 10 16 9 12 9 13 270.950 150 20 22 8 14 10 20 307.688 151 26 20 7 11 9 22 184.477 152 24 28 16 16 8 24 230.916 153 29 38 11 21 7 29 187.286 154 19 22 9 14 6 12 169.376 155 24 20 11 20 13 20 182.838 156 19 17 9 13 6 21 176.081 157 24 28 14 11 8 24 248.056 158 22 22 13 15 10 22 235.240 159 17 31 16 19 16 20 76.347 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) CM D PE PC O 7.4942167 0.3285661 -0.3679288 0.1839608 0.0231775 0.4002793 Time 0.0002462 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.629103 -2.143165 -0.001636 2.208520 11.436603 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.4942167 2.2563151 3.321 0.001122 ** CM 0.3285661 0.0557123 5.898 2.30e-08 *** D -0.3679288 0.1083311 -3.396 0.000872 *** PE 0.1839608 0.1016680 1.809 0.072361 . PC 0.0231775 0.1289859 0.180 0.857635 O 0.4002793 0.0720258 5.557 1.20e-07 *** Time 0.0002462 0.0006643 0.371 0.711400 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.419 on 152 degrees of freedom Multiple R-squared: 0.3676, Adjusted R-squared: 0.3427 F-statistic: 14.73 on 6 and 152 DF, p-value: 3.171e-13 > 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.11182655 0.22365311 0.88817345 [2,] 0.31202322 0.62404644 0.68797678 [3,] 0.19233940 0.38467880 0.80766060 [4,] 0.90421902 0.19156195 0.09578098 [5,] 0.84964149 0.30071702 0.15035851 [6,] 0.79960463 0.40079074 0.20039537 [7,] 0.75465455 0.49069090 0.24534545 [8,] 0.67900832 0.64198335 0.32099168 [9,] 0.64438095 0.71123809 0.35561905 [10,] 0.58564313 0.82871373 0.41435687 [11,] 0.58175757 0.83648486 0.41824243 [12,] 0.56250166 0.87499667 0.43749834 [13,] 0.49309047 0.98618095 0.50690953 [14,] 0.44462124 0.88924248 0.55537876 [15,] 0.48902915 0.97805831 0.51097085 [16,] 0.50208797 0.99582406 0.49791203 [17,] 0.43124697 0.86249395 0.56875303 [18,] 0.37745706 0.75491413 0.62254294 [19,] 0.39145941 0.78291883 0.60854059 [20,] 0.33441509 0.66883017 0.66558491 [21,] 0.27664870 0.55329741 0.72335130 [22,] 0.22525609 0.45051217 0.77474391 [23,] 0.24521505 0.49043011 0.75478495 [24,] 0.39601587 0.79203174 0.60398413 [25,] 0.63266987 0.73466027 0.36733013 [26,] 0.60669986 0.78660027 0.39330014 [27,] 0.57362352 0.85275296 0.42637648 [28,] 0.58044343 0.83911315 0.41955657 [29,] 0.55080495 0.89839010 0.44919505 [30,] 0.49676448 0.99352896 0.50323552 [31,] 0.58959489 0.82081021 0.41040511 [32,] 0.54343864 0.91312271 0.45656136 [33,] 0.49667880 0.99335761 0.50332120 [34,] 0.58224461 0.83551079 0.41775539 [35,] 0.55333947 0.89332107 0.44666053 [36,] 0.58109711 0.83780578 0.41890289 [37,] 0.53280170 0.93439661 0.46719830 [38,] 0.51084114 0.97831772 0.48915886 [39,] 0.65778996 0.68442008 0.34221004 [40,] 0.61376985 0.77246031 0.38623015 [41,] 0.59346799 0.81306403 0.40653201 [42,] 0.55556058 0.88887885 0.44443942 [43,] 0.51369088 0.97261824 0.48630912 [44,] 0.54120541 0.91758919 0.45879459 [45,] 0.51260919 0.97478162 0.48739081 [46,] 0.54533898 0.90932205 0.45466102 [47,] 0.50991183 0.98017634 0.49008817 [48,] 0.46889342 0.93778683 0.53110658 [49,] 0.43409166 0.86818331 0.56590834 [50,] 0.39060250 0.78120501 0.60939750 [51,] 0.35268129 0.70536258 0.64731871 [52,] 0.32271851 0.64543702 0.67728149 [53,] 0.28535789 0.57071578 0.71464211 [54,] 0.24833959 0.49667919 0.75166041 [55,] 0.27476066 0.54952132 0.72523934 [56,] 0.23742467 0.47484934 0.76257533 [57,] 0.25231215 0.50462431 0.74768785 [58,] 0.31220735 0.62441470 0.68779265 [59,] 0.38194041 0.76388081 0.61805959 [60,] 0.34859503 0.69719006 0.65140497 [61,] 0.33286819 0.66573637 0.66713181 [62,] 0.41477135 0.82954270 0.58522865 [63,] 0.37808918 0.75617837 0.62191082 [64,] 0.33598079 0.67196157 0.66401921 [65,] 0.29697895 0.59395789 0.70302105 [66,] 0.26372172 0.52744344 0.73627828 [67,] 0.24175685 0.48351370 0.75824315 [68,] 0.22245349 0.44490699 0.77754651 [69,] 0.18930027 0.37860055 0.81069973 [70,] 0.16045960 0.32091920 0.83954040 [71,] 0.13696580 0.27393160 0.86303420 [72,] 0.11814408 0.23628817 0.88185592 [73,] 0.20550467 0.41100935 0.79449533 [74,] 0.19102690 0.38205379 0.80897310 [75,] 0.16432802 0.32865603 0.83567198 [76,] 0.16471223 0.32942447 0.83528777 [77,] 0.16598753 0.33197506 0.83401247 [78,] 0.17343064 0.34686128 0.82656936 [79,] 0.16253112 0.32506223 0.83746888 [80,] 0.15426056 0.30852111 0.84573944 [81,] 0.15950902 0.31901804 0.84049098 [82,] 0.22444077 0.44888154 0.77555923 [83,] 0.19328339 0.38656678 0.80671661 [84,] 0.17454898 0.34909797 0.82545102 [85,] 0.14832065 0.29664130 0.85167935 [86,] 0.13519100 0.27038201 0.86480900 [87,] 0.14111218 0.28222437 0.85888782 [88,] 0.16542087 0.33084174 0.83457913 [89,] 0.16077397 0.32154794 0.83922603 [90,] 0.15345502 0.30691004 0.84654498 [91,] 0.14801540 0.29603081 0.85198460 [92,] 0.12182807 0.24365614 0.87817193 [93,] 0.10181718 0.20363435 0.89818282 [94,] 0.08212504 0.16425008 0.91787496 [95,] 0.06661620 0.13323241 0.93338380 [96,] 0.07072440 0.14144880 0.92927560 [97,] 0.05815630 0.11631260 0.94184370 [98,] 0.05126356 0.10252712 0.94873644 [99,] 0.04476470 0.08952940 0.95523530 [100,] 0.03429281 0.06858563 0.96570719 [101,] 0.03355394 0.06710788 0.96644606 [102,] 0.04190476 0.08380953 0.95809524 [103,] 0.16900639 0.33801277 0.83099361 [104,] 0.15300492 0.30600985 0.84699508 [105,] 0.57344985 0.85310029 0.42655015 [106,] 0.86136941 0.27726118 0.13863059 [107,] 0.82952069 0.34095861 0.17047931 [108,] 0.88216468 0.23567064 0.11783532 [109,] 0.85837603 0.28324793 0.14162397 [110,] 0.83037307 0.33925387 0.16962693 [111,] 0.86332870 0.27334260 0.13667130 [112,] 0.83993125 0.32013751 0.16006875 [113,] 0.80097622 0.39804755 0.19902378 [114,] 0.83239561 0.33520879 0.16760439 [115,] 0.79148596 0.41702809 0.20851404 [116,] 0.75151416 0.49697167 0.24848584 [117,] 0.70311831 0.59376338 0.29688169 [118,] 0.66755758 0.66488483 0.33244242 [119,] 0.62707027 0.74585947 0.37292973 [120,] 0.56845264 0.86309472 0.43154736 [121,] 0.50601446 0.98797107 0.49398554 [122,] 0.50462007 0.99075987 0.49537993 [123,] 0.50118923 0.99762154 0.49881077 [124,] 0.45301078 0.90602155 0.54698922 [125,] 0.40326806 0.80653612 0.59673194 [126,] 0.54775707 0.90448585 0.45224293 [127,] 0.51373369 0.97253261 0.48626631 [128,] 0.43879450 0.87758899 0.56120550 [129,] 0.45280698 0.90561395 0.54719302 [130,] 0.37808135 0.75616270 0.62191865 [131,] 0.34197505 0.68395010 0.65802495 [132,] 0.29794936 0.59589871 0.70205064 [133,] 0.34617448 0.69234896 0.65382552 [134,] 0.50555877 0.98888245 0.49444123 [135,] 0.42475135 0.84950270 0.57524865 [136,] 0.36504459 0.73008918 0.63495541 [137,] 0.32391802 0.64783605 0.67608198 [138,] 0.27662103 0.55324207 0.72337897 [139,] 0.17632039 0.35264079 0.82367961 [140,] 0.31242086 0.62484172 0.68757914 > postscript(file="/var/www/html/freestat/rcomp/tmp/1xvuj1290610956.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/freestat/rcomp/tmp/2xvuj1290610956.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/freestat/rcomp/tmp/38mbm1290610956.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/freestat/rcomp/tmp/48mbm1290610956.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/freestat/rcomp/tmp/58mbm1290610956.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.003735793 2.618874557 5.739476885 -1.278974249 1.451052720 -1.153848563 7 8 9 10 11 12 2.456773195 3.576221861 -1.744194748 -0.647395718 -3.782068519 -4.370834301 13 14 15 16 17 18 -8.208657394 -1.074057121 3.566459920 2.936706959 1.009743142 -2.531630072 19 20 21 22 23 24 -2.056422015 -0.978114004 1.451506141 -3.388686115 -3.402623019 -5.828328162 25 26 27 28 29 30 -3.152910453 0.572849909 1.681321490 -4.349755167 0.168675199 0.449445988 31 32 33 34 35 36 -0.179743120 2.820228174 6.321352361 6.818523628 3.393065401 4.411248219 37 38 39 40 41 42 3.048326605 -0.145529220 1.831025112 6.056356129 -1.478817384 1.545269555 43 44 45 46 47 48 -5.517523749 2.911879011 4.329843564 -0.319726412 -3.367154722 7.356632925 49 50 51 52 53 54 -0.001636132 3.279641401 2.193965330 -1.149235675 -4.029993364 -1.544298774 55 56 57 58 59 60 3.286208113 -1.330016252 1.690504533 2.253909864 0.461337808 -1.650700097 61 62 63 64 65 66 1.759958349 1.080648648 0.686760960 4.015235398 0.463729331 4.187911271 67 68 69 70 71 72 -4.605587149 5.527022465 1.304432643 2.701578847 -5.012292206 -0.576234260 73 74 75 76 77 78 -0.455616996 -1.303750483 -0.672895813 -2.229907815 1.801803942 -0.417505142 79 80 81 82 83 84 -0.020416595 0.946684493 1.581066735 -6.876379582 -2.442452062 1.034661118 85 86 87 88 89 90 -3.363647839 -3.156378113 3.480988385 2.223074081 2.607777584 -3.899527947 91 92 93 94 95 96 -6.304346484 -1.215078194 -2.714968381 -0.067312900 -2.544852594 3.412728081 97 98 99 100 101 102 -4.086878937 -3.285381886 -3.293258869 -3.282026438 0.181958410 -1.657387889 103 104 105 106 107 108 -0.899595338 -1.333530542 -3.812734574 -1.768608342 -2.300241770 -1.749509226 109 110 111 112 113 114 -0.036623939 -3.740771250 -4.835529679 -8.629102564 2.449449010 11.436602795 115 116 117 118 119 120 9.796046498 -0.967868258 4.497816174 1.518720645 -1.194646895 -3.829180770 121 122 123 124 125 126 2.765504683 0.126649368 4.927988630 -0.776736159 0.939823766 -1.595945067 127 128 129 130 131 132 0.931021489 1.309401558 -1.982097230 0.482190859 3.429621736 -4.312280292 133 134 135 136 137 138 0.637049630 -2.814931749 -6.364246931 1.969767838 -0.087171249 4.141709841 139 140 141 142 143 144 -1.202194297 3.506741173 3.270166617 4.207932146 1.828129189 1.071480968 145 146 147 148 149 150 -0.016314343 4.060679311 -0.359675910 0.008192347 -7.126392700 -2.667818616 151 152 153 154 155 156 3.426226307 0.400436697 -2.612147523 0.029113107 1.950546432 -1.748259965 157 158 159 0.580162362 0.205146249 -6.683385384 > postscript(file="/var/www/html/freestat/rcomp/tmp/61dtp1290610956.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.003735793 NA 1 2.618874557 1.003735793 2 5.739476885 2.618874557 3 -1.278974249 5.739476885 4 1.451052720 -1.278974249 5 -1.153848563 1.451052720 6 2.456773195 -1.153848563 7 3.576221861 2.456773195 8 -1.744194748 3.576221861 9 -0.647395718 -1.744194748 10 -3.782068519 -0.647395718 11 -4.370834301 -3.782068519 12 -8.208657394 -4.370834301 13 -1.074057121 -8.208657394 14 3.566459920 -1.074057121 15 2.936706959 3.566459920 16 1.009743142 2.936706959 17 -2.531630072 1.009743142 18 -2.056422015 -2.531630072 19 -0.978114004 -2.056422015 20 1.451506141 -0.978114004 21 -3.388686115 1.451506141 22 -3.402623019 -3.388686115 23 -5.828328162 -3.402623019 24 -3.152910453 -5.828328162 25 0.572849909 -3.152910453 26 1.681321490 0.572849909 27 -4.349755167 1.681321490 28 0.168675199 -4.349755167 29 0.449445988 0.168675199 30 -0.179743120 0.449445988 31 2.820228174 -0.179743120 32 6.321352361 2.820228174 33 6.818523628 6.321352361 34 3.393065401 6.818523628 35 4.411248219 3.393065401 36 3.048326605 4.411248219 37 -0.145529220 3.048326605 38 1.831025112 -0.145529220 39 6.056356129 1.831025112 40 -1.478817384 6.056356129 41 1.545269555 -1.478817384 42 -5.517523749 1.545269555 43 2.911879011 -5.517523749 44 4.329843564 2.911879011 45 -0.319726412 4.329843564 46 -3.367154722 -0.319726412 47 7.356632925 -3.367154722 48 -0.001636132 7.356632925 49 3.279641401 -0.001636132 50 2.193965330 3.279641401 51 -1.149235675 2.193965330 52 -4.029993364 -1.149235675 53 -1.544298774 -4.029993364 54 3.286208113 -1.544298774 55 -1.330016252 3.286208113 56 1.690504533 -1.330016252 57 2.253909864 1.690504533 58 0.461337808 2.253909864 59 -1.650700097 0.461337808 60 1.759958349 -1.650700097 61 1.080648648 1.759958349 62 0.686760960 1.080648648 63 4.015235398 0.686760960 64 0.463729331 4.015235398 65 4.187911271 0.463729331 66 -4.605587149 4.187911271 67 5.527022465 -4.605587149 68 1.304432643 5.527022465 69 2.701578847 1.304432643 70 -5.012292206 2.701578847 71 -0.576234260 -5.012292206 72 -0.455616996 -0.576234260 73 -1.303750483 -0.455616996 74 -0.672895813 -1.303750483 75 -2.229907815 -0.672895813 76 1.801803942 -2.229907815 77 -0.417505142 1.801803942 78 -0.020416595 -0.417505142 79 0.946684493 -0.020416595 80 1.581066735 0.946684493 81 -6.876379582 1.581066735 82 -2.442452062 -6.876379582 83 1.034661118 -2.442452062 84 -3.363647839 1.034661118 85 -3.156378113 -3.363647839 86 3.480988385 -3.156378113 87 2.223074081 3.480988385 88 2.607777584 2.223074081 89 -3.899527947 2.607777584 90 -6.304346484 -3.899527947 91 -1.215078194 -6.304346484 92 -2.714968381 -1.215078194 93 -0.067312900 -2.714968381 94 -2.544852594 -0.067312900 95 3.412728081 -2.544852594 96 -4.086878937 3.412728081 97 -3.285381886 -4.086878937 98 -3.293258869 -3.285381886 99 -3.282026438 -3.293258869 100 0.181958410 -3.282026438 101 -1.657387889 0.181958410 102 -0.899595338 -1.657387889 103 -1.333530542 -0.899595338 104 -3.812734574 -1.333530542 105 -1.768608342 -3.812734574 106 -2.300241770 -1.768608342 107 -1.749509226 -2.300241770 108 -0.036623939 -1.749509226 109 -3.740771250 -0.036623939 110 -4.835529679 -3.740771250 111 -8.629102564 -4.835529679 112 2.449449010 -8.629102564 113 11.436602795 2.449449010 114 9.796046498 11.436602795 115 -0.967868258 9.796046498 116 4.497816174 -0.967868258 117 1.518720645 4.497816174 118 -1.194646895 1.518720645 119 -3.829180770 -1.194646895 120 2.765504683 -3.829180770 121 0.126649368 2.765504683 122 4.927988630 0.126649368 123 -0.776736159 4.927988630 124 0.939823766 -0.776736159 125 -1.595945067 0.939823766 126 0.931021489 -1.595945067 127 1.309401558 0.931021489 128 -1.982097230 1.309401558 129 0.482190859 -1.982097230 130 3.429621736 0.482190859 131 -4.312280292 3.429621736 132 0.637049630 -4.312280292 133 -2.814931749 0.637049630 134 -6.364246931 -2.814931749 135 1.969767838 -6.364246931 136 -0.087171249 1.969767838 137 4.141709841 -0.087171249 138 -1.202194297 4.141709841 139 3.506741173 -1.202194297 140 3.270166617 3.506741173 141 4.207932146 3.270166617 142 1.828129189 4.207932146 143 1.071480968 1.828129189 144 -0.016314343 1.071480968 145 4.060679311 -0.016314343 146 -0.359675910 4.060679311 147 0.008192347 -0.359675910 148 -7.126392700 0.008192347 149 -2.667818616 -7.126392700 150 3.426226307 -2.667818616 151 0.400436697 3.426226307 152 -2.612147523 0.400436697 153 0.029113107 -2.612147523 154 1.950546432 0.029113107 155 -1.748259965 1.950546432 156 0.580162362 -1.748259965 157 0.205146249 0.580162362 158 -6.683385384 0.205146249 159 NA -6.683385384 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.618874557 1.003735793 [2,] 5.739476885 2.618874557 [3,] -1.278974249 5.739476885 [4,] 1.451052720 -1.278974249 [5,] -1.153848563 1.451052720 [6,] 2.456773195 -1.153848563 [7,] 3.576221861 2.456773195 [8,] -1.744194748 3.576221861 [9,] -0.647395718 -1.744194748 [10,] -3.782068519 -0.647395718 [11,] -4.370834301 -3.782068519 [12,] -8.208657394 -4.370834301 [13,] -1.074057121 -8.208657394 [14,] 3.566459920 -1.074057121 [15,] 2.936706959 3.566459920 [16,] 1.009743142 2.936706959 [17,] -2.531630072 1.009743142 [18,] -2.056422015 -2.531630072 [19,] -0.978114004 -2.056422015 [20,] 1.451506141 -0.978114004 [21,] -3.388686115 1.451506141 [22,] -3.402623019 -3.388686115 [23,] -5.828328162 -3.402623019 [24,] -3.152910453 -5.828328162 [25,] 0.572849909 -3.152910453 [26,] 1.681321490 0.572849909 [27,] -4.349755167 1.681321490 [28,] 0.168675199 -4.349755167 [29,] 0.449445988 0.168675199 [30,] -0.179743120 0.449445988 [31,] 2.820228174 -0.179743120 [32,] 6.321352361 2.820228174 [33,] 6.818523628 6.321352361 [34,] 3.393065401 6.818523628 [35,] 4.411248219 3.393065401 [36,] 3.048326605 4.411248219 [37,] -0.145529220 3.048326605 [38,] 1.831025112 -0.145529220 [39,] 6.056356129 1.831025112 [40,] -1.478817384 6.056356129 [41,] 1.545269555 -1.478817384 [42,] -5.517523749 1.545269555 [43,] 2.911879011 -5.517523749 [44,] 4.329843564 2.911879011 [45,] -0.319726412 4.329843564 [46,] -3.367154722 -0.319726412 [47,] 7.356632925 -3.367154722 [48,] -0.001636132 7.356632925 [49,] 3.279641401 -0.001636132 [50,] 2.193965330 3.279641401 [51,] -1.149235675 2.193965330 [52,] -4.029993364 -1.149235675 [53,] -1.544298774 -4.029993364 [54,] 3.286208113 -1.544298774 [55,] -1.330016252 3.286208113 [56,] 1.690504533 -1.330016252 [57,] 2.253909864 1.690504533 [58,] 0.461337808 2.253909864 [59,] -1.650700097 0.461337808 [60,] 1.759958349 -1.650700097 [61,] 1.080648648 1.759958349 [62,] 0.686760960 1.080648648 [63,] 4.015235398 0.686760960 [64,] 0.463729331 4.015235398 [65,] 4.187911271 0.463729331 [66,] -4.605587149 4.187911271 [67,] 5.527022465 -4.605587149 [68,] 1.304432643 5.527022465 [69,] 2.701578847 1.304432643 [70,] -5.012292206 2.701578847 [71,] -0.576234260 -5.012292206 [72,] -0.455616996 -0.576234260 [73,] -1.303750483 -0.455616996 [74,] -0.672895813 -1.303750483 [75,] -2.229907815 -0.672895813 [76,] 1.801803942 -2.229907815 [77,] -0.417505142 1.801803942 [78,] -0.020416595 -0.417505142 [79,] 0.946684493 -0.020416595 [80,] 1.581066735 0.946684493 [81,] -6.876379582 1.581066735 [82,] -2.442452062 -6.876379582 [83,] 1.034661118 -2.442452062 [84,] -3.363647839 1.034661118 [85,] -3.156378113 -3.363647839 [86,] 3.480988385 -3.156378113 [87,] 2.223074081 3.480988385 [88,] 2.607777584 2.223074081 [89,] -3.899527947 2.607777584 [90,] -6.304346484 -3.899527947 [91,] -1.215078194 -6.304346484 [92,] -2.714968381 -1.215078194 [93,] -0.067312900 -2.714968381 [94,] -2.544852594 -0.067312900 [95,] 3.412728081 -2.544852594 [96,] -4.086878937 3.412728081 [97,] -3.285381886 -4.086878937 [98,] -3.293258869 -3.285381886 [99,] -3.282026438 -3.293258869 [100,] 0.181958410 -3.282026438 [101,] -1.657387889 0.181958410 [102,] -0.899595338 -1.657387889 [103,] -1.333530542 -0.899595338 [104,] -3.812734574 -1.333530542 [105,] -1.768608342 -3.812734574 [106,] -2.300241770 -1.768608342 [107,] -1.749509226 -2.300241770 [108,] -0.036623939 -1.749509226 [109,] -3.740771250 -0.036623939 [110,] -4.835529679 -3.740771250 [111,] -8.629102564 -4.835529679 [112,] 2.449449010 -8.629102564 [113,] 11.436602795 2.449449010 [114,] 9.796046498 11.436602795 [115,] -0.967868258 9.796046498 [116,] 4.497816174 -0.967868258 [117,] 1.518720645 4.497816174 [118,] -1.194646895 1.518720645 [119,] -3.829180770 -1.194646895 [120,] 2.765504683 -3.829180770 [121,] 0.126649368 2.765504683 [122,] 4.927988630 0.126649368 [123,] -0.776736159 4.927988630 [124,] 0.939823766 -0.776736159 [125,] -1.595945067 0.939823766 [126,] 0.931021489 -1.595945067 [127,] 1.309401558 0.931021489 [128,] -1.982097230 1.309401558 [129,] 0.482190859 -1.982097230 [130,] 3.429621736 0.482190859 [131,] -4.312280292 3.429621736 [132,] 0.637049630 -4.312280292 [133,] -2.814931749 0.637049630 [134,] -6.364246931 -2.814931749 [135,] 1.969767838 -6.364246931 [136,] -0.087171249 1.969767838 [137,] 4.141709841 -0.087171249 [138,] -1.202194297 4.141709841 [139,] 3.506741173 -1.202194297 [140,] 3.270166617 3.506741173 [141,] 4.207932146 3.270166617 [142,] 1.828129189 4.207932146 [143,] 1.071480968 1.828129189 [144,] -0.016314343 1.071480968 [145,] 4.060679311 -0.016314343 [146,] -0.359675910 4.060679311 [147,] 0.008192347 -0.359675910 [148,] -7.126392700 0.008192347 [149,] -2.667818616 -7.126392700 [150,] 3.426226307 -2.667818616 [151,] 0.400436697 3.426226307 [152,] -2.612147523 0.400436697 [153,] 0.029113107 -2.612147523 [154,] 1.950546432 0.029113107 [155,] -1.748259965 1.950546432 [156,] 0.580162362 -1.748259965 [157,] 0.205146249 0.580162362 [158,] -6.683385384 0.205146249 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.618874557 1.003735793 2 5.739476885 2.618874557 3 -1.278974249 5.739476885 4 1.451052720 -1.278974249 5 -1.153848563 1.451052720 6 2.456773195 -1.153848563 7 3.576221861 2.456773195 8 -1.744194748 3.576221861 9 -0.647395718 -1.744194748 10 -3.782068519 -0.647395718 11 -4.370834301 -3.782068519 12 -8.208657394 -4.370834301 13 -1.074057121 -8.208657394 14 3.566459920 -1.074057121 15 2.936706959 3.566459920 16 1.009743142 2.936706959 17 -2.531630072 1.009743142 18 -2.056422015 -2.531630072 19 -0.978114004 -2.056422015 20 1.451506141 -0.978114004 21 -3.388686115 1.451506141 22 -3.402623019 -3.388686115 23 -5.828328162 -3.402623019 24 -3.152910453 -5.828328162 25 0.572849909 -3.152910453 26 1.681321490 0.572849909 27 -4.349755167 1.681321490 28 0.168675199 -4.349755167 29 0.449445988 0.168675199 30 -0.179743120 0.449445988 31 2.820228174 -0.179743120 32 6.321352361 2.820228174 33 6.818523628 6.321352361 34 3.393065401 6.818523628 35 4.411248219 3.393065401 36 3.048326605 4.411248219 37 -0.145529220 3.048326605 38 1.831025112 -0.145529220 39 6.056356129 1.831025112 40 -1.478817384 6.056356129 41 1.545269555 -1.478817384 42 -5.517523749 1.545269555 43 2.911879011 -5.517523749 44 4.329843564 2.911879011 45 -0.319726412 4.329843564 46 -3.367154722 -0.319726412 47 7.356632925 -3.367154722 48 -0.001636132 7.356632925 49 3.279641401 -0.001636132 50 2.193965330 3.279641401 51 -1.149235675 2.193965330 52 -4.029993364 -1.149235675 53 -1.544298774 -4.029993364 54 3.286208113 -1.544298774 55 -1.330016252 3.286208113 56 1.690504533 -1.330016252 57 2.253909864 1.690504533 58 0.461337808 2.253909864 59 -1.650700097 0.461337808 60 1.759958349 -1.650700097 61 1.080648648 1.759958349 62 0.686760960 1.080648648 63 4.015235398 0.686760960 64 0.463729331 4.015235398 65 4.187911271 0.463729331 66 -4.605587149 4.187911271 67 5.527022465 -4.605587149 68 1.304432643 5.527022465 69 2.701578847 1.304432643 70 -5.012292206 2.701578847 71 -0.576234260 -5.012292206 72 -0.455616996 -0.576234260 73 -1.303750483 -0.455616996 74 -0.672895813 -1.303750483 75 -2.229907815 -0.672895813 76 1.801803942 -2.229907815 77 -0.417505142 1.801803942 78 -0.020416595 -0.417505142 79 0.946684493 -0.020416595 80 1.581066735 0.946684493 81 -6.876379582 1.581066735 82 -2.442452062 -6.876379582 83 1.034661118 -2.442452062 84 -3.363647839 1.034661118 85 -3.156378113 -3.363647839 86 3.480988385 -3.156378113 87 2.223074081 3.480988385 88 2.607777584 2.223074081 89 -3.899527947 2.607777584 90 -6.304346484 -3.899527947 91 -1.215078194 -6.304346484 92 -2.714968381 -1.215078194 93 -0.067312900 -2.714968381 94 -2.544852594 -0.067312900 95 3.412728081 -2.544852594 96 -4.086878937 3.412728081 97 -3.285381886 -4.086878937 98 -3.293258869 -3.285381886 99 -3.282026438 -3.293258869 100 0.181958410 -3.282026438 101 -1.657387889 0.181958410 102 -0.899595338 -1.657387889 103 -1.333530542 -0.899595338 104 -3.812734574 -1.333530542 105 -1.768608342 -3.812734574 106 -2.300241770 -1.768608342 107 -1.749509226 -2.300241770 108 -0.036623939 -1.749509226 109 -3.740771250 -0.036623939 110 -4.835529679 -3.740771250 111 -8.629102564 -4.835529679 112 2.449449010 -8.629102564 113 11.436602795 2.449449010 114 9.796046498 11.436602795 115 -0.967868258 9.796046498 116 4.497816174 -0.967868258 117 1.518720645 4.497816174 118 -1.194646895 1.518720645 119 -3.829180770 -1.194646895 120 2.765504683 -3.829180770 121 0.126649368 2.765504683 122 4.927988630 0.126649368 123 -0.776736159 4.927988630 124 0.939823766 -0.776736159 125 -1.595945067 0.939823766 126 0.931021489 -1.595945067 127 1.309401558 0.931021489 128 -1.982097230 1.309401558 129 0.482190859 -1.982097230 130 3.429621736 0.482190859 131 -4.312280292 3.429621736 132 0.637049630 -4.312280292 133 -2.814931749 0.637049630 134 -6.364246931 -2.814931749 135 1.969767838 -6.364246931 136 -0.087171249 1.969767838 137 4.141709841 -0.087171249 138 -1.202194297 4.141709841 139 3.506741173 -1.202194297 140 3.270166617 3.506741173 141 4.207932146 3.270166617 142 1.828129189 4.207932146 143 1.071480968 1.828129189 144 -0.016314343 1.071480968 145 4.060679311 -0.016314343 146 -0.359675910 4.060679311 147 0.008192347 -0.359675910 148 -7.126392700 0.008192347 149 -2.667818616 -7.126392700 150 3.426226307 -2.667818616 151 0.400436697 3.426226307 152 -2.612147523 0.400436697 153 0.029113107 -2.612147523 154 1.950546432 0.029113107 155 -1.748259965 1.950546432 156 0.580162362 -1.748259965 157 0.205146249 0.580162362 158 -6.683385384 0.205146249 > 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/freestat/rcomp/tmp/7b4aa1290610956.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/freestat/rcomp/tmp/8b4aa1290610956.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/freestat/rcomp/tmp/9b4aa1290610956.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/freestat/rcomp/tmp/10mw9d1290610956.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/117w701290610956.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/freestat/rcomp/tmp/12tfo61290610956.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/freestat/rcomp/tmp/1377mx1290610956.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/freestat/rcomp/tmp/14a72l1290610956.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/freestat/rcomp/tmp/15eq191290610956.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/freestat/rcomp/tmp/16z8zf1290610956.tab") + } > > try(system("convert tmp/1xvuj1290610956.ps tmp/1xvuj1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/2xvuj1290610956.ps tmp/2xvuj1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/38mbm1290610956.ps tmp/38mbm1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/48mbm1290610956.ps tmp/48mbm1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/58mbm1290610956.ps tmp/58mbm1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/61dtp1290610956.ps tmp/61dtp1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/7b4aa1290610956.ps tmp/7b4aa1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/8b4aa1290610956.ps tmp/8b4aa1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/9b4aa1290610956.ps tmp/9b4aa1290610956.png",intern=TRUE)) character(0) > try(system("convert tmp/10mw9d1290610956.ps tmp/10mw9d1290610956.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.841 2.676 6.321