R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(24 + ,14 + ,11 + ,12 + ,24 + ,26 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,34 + ,16 + ,18 + ,11 + ,21 + ,20 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,24 + ,10 + ,9 + ,6 + ,25 + ,29 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,17 + ,8 + ,14 + ,6 + ,24 + ,22 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,19 + ,12 + ,14 + ,7 + ,24 + ,28 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,26 + ,9 + ,15 + ,6 + ,25 + ,25 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,13 + ,14 + ,13 + ,6 + ,21 + ,25 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,21 + ,10 + ,11 + ,5 + ,26 + ,24 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,10 + ,5 + ,8 + ,6 + ,19 + ,24 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,20 + ,9 + ,19 + ,10 + ,20 + ,16 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,21 + ,8 + ,9 + ,11 + ,24 + ,20 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,19 + ,6 + ,17 + ,8 + ,25 + ,14 + ,17 + ,11 + ,9 + ,6 + ,20 + ,19 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,17 + ,9 + ,13 + ,6 + ,19 + ,21 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,31 + ,16 + ,19 + ,16 + ,17 + ,20) + ,dim=c(6 + ,159) + ,dimnames=list(c('Expectations' + ,'Concerns' + ,'Doubts' + ,'Criticism' + ,'Standards' + ,'Organization ') + ,1:159)) > y <- array(NA,dim=c(6,159),dimnames=list(c('Expectations','Concerns','Doubts','Criticism','Standards','Organization '),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 = '6' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Organization\r Expectations Concerns Doubts Criticism Standards 1 26 24 14 11 12 24 2 23 25 11 7 8 25 3 25 17 6 17 8 30 4 23 18 12 10 8 19 5 19 18 8 12 9 22 6 29 16 10 12 7 22 7 25 20 10 11 4 25 8 21 16 11 11 11 23 9 22 18 16 12 7 17 10 25 17 11 13 7 21 11 24 23 13 14 12 19 12 18 30 12 16 10 19 13 22 23 8 11 10 15 14 15 18 12 10 8 16 15 22 15 11 11 8 23 16 28 12 4 15 4 27 17 20 21 9 9 9 22 18 12 15 8 11 8 14 19 24 20 8 17 7 22 20 20 31 14 17 11 23 21 21 27 15 11 9 23 22 20 34 16 18 11 21 23 21 21 9 14 13 19 24 23 31 14 10 8 18 25 28 19 11 11 8 20 26 24 16 8 15 9 23 27 24 20 9 15 6 25 28 24 21 9 13 9 19 29 23 22 9 16 9 24 30 23 17 9 13 6 22 31 29 24 10 9 6 25 32 24 25 16 18 16 26 33 18 26 11 18 5 29 34 25 25 8 12 7 32 35 21 17 9 17 9 25 36 26 32 16 9 6 29 37 22 33 11 9 6 28 38 22 13 16 12 5 17 39 22 32 12 18 12 28 40 23 25 12 12 7 29 41 30 29 14 18 10 26 42 23 22 9 14 9 25 43 17 18 10 15 8 14 44 23 17 9 16 5 25 45 23 20 10 10 8 26 46 25 15 12 11 8 20 47 24 20 14 14 10 18 48 24 33 14 9 6 32 49 23 29 10 12 8 25 50 21 23 14 17 7 25 51 24 26 16 5 4 23 52 24 18 9 12 8 21 53 28 20 10 12 8 20 54 16 11 6 6 4 15 55 20 28 8 24 20 30 56 29 26 13 12 8 24 57 27 22 10 12 8 26 58 22 17 8 14 6 24 59 28 12 7 7 4 22 60 16 14 15 13 8 14 61 25 17 9 12 9 24 62 24 21 10 13 6 24 63 28 19 12 14 7 24 64 24 18 13 8 9 24 65 23 10 10 11 5 19 66 30 29 11 9 5 31 67 24 31 8 11 8 22 68 21 19 9 13 8 27 69 25 9 13 10 6 19 70 25 20 11 11 8 25 71 22 28 8 12 7 20 72 23 19 9 9 7 21 73 26 30 9 15 9 27 74 23 29 15 18 11 23 75 25 26 9 15 6 25 76 21 23 10 12 8 20 77 25 13 14 13 6 21 78 24 21 12 14 9 22 79 29 19 12 10 8 23 80 22 28 11 13 6 25 81 27 23 14 13 10 25 82 26 18 6 11 8 17 83 22 21 12 13 8 19 84 24 20 8 16 10 25 85 27 23 14 8 5 19 86 24 21 11 16 7 20 87 24 21 10 11 5 26 88 29 15 14 9 8 23 89 22 28 12 16 14 27 90 21 19 10 12 7 17 91 24 26 14 14 8 17 92 24 10 5 8 6 19 93 23 16 11 9 5 17 94 20 22 10 15 6 22 95 27 19 9 11 10 21 96 26 31 10 21 12 32 97 25 31 16 14 9 21 98 21 29 13 18 12 21 99 21 19 9 12 7 18 100 19 22 10 13 8 18 101 21 23 10 15 10 23 102 21 15 7 12 6 19 103 16 20 9 19 10 20 104 22 18 8 15 10 21 105 29 23 14 11 10 20 106 15 25 14 11 5 17 107 17 21 8 10 7 18 108 15 24 9 13 10 19 109 21 25 14 15 11 22 110 21 17 14 12 6 15 111 19 13 8 12 7 14 112 24 28 8 16 12 18 113 20 21 8 9 11 24 114 17 25 7 18 11 35 115 23 9 6 8 11 29 116 24 16 8 13 5 21 117 14 19 6 17 8 25 118 19 17 11 9 6 20 119 24 25 14 15 9 22 120 13 20 11 8 4 13 121 22 29 11 7 4 26 122 16 14 11 12 7 17 123 19 22 14 14 11 25 124 25 15 8 6 6 20 125 25 19 20 8 7 19 126 23 20 11 17 8 21 127 24 15 8 10 4 22 128 26 20 11 11 8 24 129 26 18 10 14 9 21 130 25 33 14 11 8 26 131 18 22 11 13 11 24 132 21 16 9 12 8 16 133 26 17 9 11 5 23 134 23 16 8 9 4 18 135 23 21 10 12 8 16 136 22 26 13 20 10 26 137 20 18 13 12 6 19 138 13 18 12 13 9 21 139 24 17 8 12 9 21 140 15 22 13 12 13 22 141 14 30 14 9 9 23 142 22 30 12 15 10 29 143 10 24 14 24 20 21 144 24 21 15 7 5 21 145 22 21 13 17 11 23 146 24 29 16 11 6 27 147 19 31 9 17 9 25 148 20 20 9 11 7 21 149 13 16 9 12 9 10 150 20 22 8 14 10 20 151 22 20 7 11 9 26 152 24 28 16 16 8 24 153 29 38 11 21 7 29 154 12 22 9 14 6 19 155 20 20 11 20 13 24 156 21 17 9 13 6 19 157 24 28 14 11 8 24 158 22 22 13 15 10 22 159 20 31 16 19 16 17 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Expectations Concerns Doubts Criticism 16.13438 -0.07068 0.21817 -0.14895 -0.25516 Standards 0.42276 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.1549 -1.7377 0.2698 2.2317 7.1717 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.13438 2.00161 8.061 2.02e-13 *** Expectations -0.07068 0.06292 -1.123 0.2631 Concerns 0.21817 0.11262 1.937 0.0546 . Doubts -0.14895 0.10427 -1.429 0.1552 Criticism -0.25516 0.13041 -1.957 0.0522 . Standards 0.42276 0.07562 5.591 1.01e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.499 on 153 degrees of freedom Multiple R-squared: 0.2224, Adjusted R-squared: 0.197 F-statistic: 8.75 on 5 and 153 DF, p-value: 2.548e-07 > 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.725321323 0.549357354 0.2746787 [2,] 0.598646411 0.802707178 0.4013536 [3,] 0.489326082 0.978652163 0.5106739 [4,] 0.444855893 0.889711786 0.5551441 [5,] 0.452954235 0.905908470 0.5470458 [6,] 0.693424169 0.613151662 0.3065758 [7,] 0.624897425 0.750205151 0.3751026 [8,] 0.572942458 0.854115085 0.4270575 [9,] 0.506926763 0.986146474 0.4930732 [10,] 0.637026245 0.725947511 0.3629738 [11,] 0.562011259 0.875977481 0.4379887 [12,] 0.567128160 0.865743681 0.4328718 [13,] 0.519310435 0.961379131 0.4806896 [14,] 0.450175129 0.900350257 0.5498249 [15,] 0.391153994 0.782307989 0.6088460 [16,] 0.391798133 0.783596265 0.6082019 [17,] 0.535610016 0.928779968 0.4643900 [18,] 0.473009182 0.946018364 0.5269908 [19,] 0.409442267 0.818884533 0.5905577 [20,] 0.402731633 0.805463266 0.5972684 [21,] 0.341805979 0.683611957 0.6581940 [22,] 0.285095564 0.570191127 0.7149044 [23,] 0.309301997 0.618603994 0.6906980 [24,] 0.260709370 0.521418739 0.7392906 [25,] 0.485169644 0.970339289 0.5148304 [26,] 0.438774416 0.877548832 0.5612256 [27,] 0.403999253 0.807998506 0.5960007 [28,] 0.348330711 0.696661422 0.6516693 [29,] 0.325699881 0.651399761 0.6743001 [30,] 0.276376932 0.552753864 0.7236231 [31,] 0.231547277 0.463094554 0.7684527 [32,] 0.208251520 0.416503041 0.7917485 [33,] 0.359776282 0.719552564 0.6402237 [34,] 0.309654831 0.619309663 0.6903452 [35,] 0.277892036 0.555784072 0.7221080 [36,] 0.236006680 0.472013360 0.7639933 [37,] 0.203401765 0.406803530 0.7965982 [38,] 0.182515928 0.365031857 0.8174841 [39,] 0.170211098 0.340422195 0.8297889 [40,] 0.157288664 0.314577328 0.8427113 [41,] 0.128207897 0.256415793 0.8717921 [42,] 0.118759202 0.237518403 0.8812408 [43,] 0.097944029 0.195888058 0.9020560 [44,] 0.082903652 0.165807304 0.9170963 [45,] 0.138931976 0.277863951 0.8610680 [46,] 0.170471402 0.340942804 0.8295286 [47,] 0.162698873 0.325397747 0.8373011 [48,] 0.218070248 0.436140496 0.7819298 [49,] 0.208985549 0.417971097 0.7910145 [50,] 0.179227057 0.358454114 0.8207729 [51,] 0.189699480 0.379398960 0.8103005 [52,] 0.218014963 0.436029926 0.7819850 [53,] 0.191967615 0.383935230 0.8080324 [54,] 0.161100317 0.322200635 0.8388997 [55,] 0.175850700 0.351701400 0.8241493 [56,] 0.148204637 0.296409275 0.8517954 [57,] 0.122207971 0.244415942 0.8777920 [58,] 0.118450250 0.236900501 0.8815497 [59,] 0.108257660 0.216515321 0.8917423 [60,] 0.108501929 0.217003858 0.8914981 [61,] 0.092112173 0.184224345 0.9078878 [62,] 0.075137236 0.150274473 0.9248628 [63,] 0.061093221 0.122186442 0.9389068 [64,] 0.048267854 0.096535709 0.9517321 [65,] 0.045358816 0.090717632 0.9546412 [66,] 0.036381888 0.072763775 0.9636181 [67,] 0.030303698 0.060607396 0.9696963 [68,] 0.023281259 0.046562519 0.9767187 [69,] 0.018281921 0.036563842 0.9817181 [70,] 0.014639713 0.029279425 0.9853603 [71,] 0.021949337 0.043898674 0.9780507 [72,] 0.017522162 0.035044323 0.9824778 [73,] 0.017144765 0.034289530 0.9828552 [74,] 0.030841012 0.061682025 0.9691590 [75,] 0.023814650 0.047629299 0.9761854 [76,] 0.019906217 0.039812434 0.9800938 [77,] 0.021894103 0.043788207 0.9781059 [78,] 0.019472449 0.038944898 0.9805276 [79,] 0.014840397 0.029680795 0.9851596 [80,] 0.019433503 0.038867007 0.9805665 [81,] 0.015331480 0.030662959 0.9846685 [82,] 0.011500087 0.023000173 0.9884999 [83,] 0.011620489 0.023240978 0.9883795 [84,] 0.010188723 0.020377446 0.9898113 [85,] 0.007838045 0.015676091 0.9921620 [86,] 0.006501947 0.013003893 0.9934981 [87,] 0.011982282 0.023964564 0.9880177 [88,] 0.010896219 0.021792438 0.9891038 [89,] 0.010409658 0.020819316 0.9895903 [90,] 0.007997341 0.015994681 0.9920027 [91,] 0.005925454 0.011850908 0.9940745 [92,] 0.004556769 0.009113538 0.9954432 [93,] 0.003383170 0.006766340 0.9966168 [94,] 0.002419195 0.004838389 0.9975808 [95,] 0.002601225 0.005202451 0.9973988 [96,] 0.002048888 0.004097777 0.9979511 [97,] 0.008725193 0.017450387 0.9912748 [98,] 0.019600015 0.039200029 0.9804000 [99,] 0.019535725 0.039071449 0.9804643 [100,] 0.024699494 0.049398988 0.9753005 [101,] 0.019175533 0.038351066 0.9808245 [102,] 0.014101682 0.028203365 0.9858983 [103,] 0.010282752 0.020565504 0.9897172 [104,] 0.025191723 0.050383445 0.9748083 [105,] 0.022986166 0.045972332 0.9770138 [106,] 0.063646832 0.127293665 0.9363532 [107,] 0.054629944 0.109259887 0.9453701 [108,] 0.044624498 0.089248995 0.9553755 [109,] 0.129387033 0.258774066 0.8706130 [110,] 0.124835817 0.249671633 0.8751642 [111,] 0.111484017 0.222968035 0.8885160 [112,] 0.192312215 0.384624429 0.8076878 [113,] 0.184371448 0.368742895 0.8156286 [114,] 0.219367209 0.438734418 0.7806328 [115,] 0.213118892 0.426237784 0.7868811 [116,] 0.212845029 0.425690059 0.7871550 [117,] 0.194886459 0.389772918 0.8051135 [118,] 0.160685225 0.321370449 0.8393148 [119,] 0.127496804 0.254993608 0.8725032 [120,] 0.132029072 0.264058144 0.8679709 [121,] 0.187366426 0.374732852 0.8126336 [122,] 0.163448625 0.326897249 0.8365514 [123,] 0.144802100 0.289604201 0.8551979 [124,] 0.127110096 0.254220192 0.8728899 [125,] 0.117873103 0.235746206 0.8821269 [126,] 0.097915894 0.195831787 0.9020841 [127,] 0.132789384 0.265578767 0.8672106 [128,] 0.100909490 0.201818979 0.8990905 [129,] 0.075558355 0.151116711 0.9244416 [130,] 0.185211620 0.370423239 0.8147884 [131,] 0.258473502 0.516947005 0.7415265 [132,] 0.239168503 0.478337007 0.7608315 [133,] 0.483356134 0.966712267 0.5166439 [134,] 0.435364617 0.870729234 0.5646354 [135,] 0.747117314 0.505765373 0.2528827 [136,] 0.696970796 0.606058408 0.3030292 [137,] 0.597987981 0.804024037 0.4020120 [138,] 0.535180865 0.929638269 0.4648191 [139,] 0.558078277 0.883843445 0.4419217 [140,] 0.430789275 0.861578551 0.5692107 [141,] 0.337911227 0.675822454 0.6620888 [142,] 0.241861645 0.483723289 0.7581384 > postscript(file="/var/wessaorg/rcomp/tmp/11ky01322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2fnla1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3lb6z1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4e8ni1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5a2sx1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 159 Frequency = 1 1 2 3 4 5 6 3.061660080 -1.252360362 0.648853683 1.018139502 -2.824368247 6.087610317 7 8 9 10 11 12 0.187603441 -1.681627639 0.033704154 2.511822594 3.769803424 -1.729710422 13 14 15 16 17 18 3.594516129 -5.713589619 -1.517787759 3.681541238 -2.277375757 -7.058454122 19 20 21 22 23 24 2.551427048 -1.382295076 -2.287214675 -0.612148470 1.756308587 1.923330862 25 26 27 28 29 30 6.033185192 2.058384154 0.511914038 3.586708985 0.990460101 0.270251432 31 32 33 34 35 36 4.682721650 1.913794741 -6.999709164 -1.067532288 -1.636720982 -0.751944044 37 38 39 40 41 42 -3.167643235 -0.829996503 -0.584942025 -2.671956073 7.101874941 0.269796210 43 44 45 46 47 48 -1.686961039 -0.806320584 -1.363460848 2.532309455 3.252037096 -3.513192073 49 50 51 52 53 54 -0.006717296 -2.813859274 -1.745592323 2.125053512 6.470987842 -5.092979285 55 56 57 58 59 60 0.094549715 5.549492111 3.075797119 -1.208135355 3.949177314 -4.358438372 61 62 63 64 65 66 2.041268649 0.489265918 4.315682550 -0.356564360 0.272551555 3.026222280 67 68 69 70 71 72 2.690298485 -3.191859263 1.653563107 0.990075911 1.217577783 0.493707099 73 74 75 76 77 78 3.138639899 1.407133688 1.935967145 -0.316985605 1.319437990 1.812870573 79 80 81 82 83 84 5.397787181 -1.656936083 3.355811465 6.321648884 0.677026452 1.899687306 85 86 87 88 89 90 3.871778226 2.664142022 -0.909316467 4.529784312 -0.232471000 0.413421669 91 92 93 94 95 96 3.588524094 2.171721023 1.026037985 -2.296637713 5.557098633 2.536562347 97 98 99 100 101 102 3.069688046 0.944156474 0.208838375 -1.393193738 -0.628073019 -0.315434857 103 104 105 106 107 108 -3.757841165 1.300410643 7.171689333 -6.694496422 -3.729543854 -4.946102927 109 110 111 112 113 114 -0.681498154 -0.010271646 -0.306013227 5.934713235 -2.394392942 -8.203262571 115 116 117 118 119 120 -2.068890088 1.585345006 -8.096010482 -3.916395843 1.808178777 -7.404347105 121 122 123 124 125 126 -3.413061386 -5.158129586 -4.310749053 2.149913723 0.790357225 1.574824544 127 128 129 130 131 132 0.389890598 2.412832871 4.459948311 0.831579685 -4.382424560 1.097487275 133 134 135 136 137 138 2.294426007 1.002640489 3.232691198 -0.594071015 -2.412450301 -9.125352486 139 140 141 142 143 144 2.527713195 -6.611888371 -9.154921387 -2.106233485 -7.692381716 -0.482213861 145 146 147 148 149 150 0.129123412 -1.820549747 -2.647263733 -2.137710451 -4.110809432 -0.143083791 151 152 153 154 155 156 -1.304824850 0.632136011 5.805580515 -8.959146634 -0.970778269 -0.461477688 157 158 159 0.323716015 0.069487424 2.291613951 > postscript(file="/var/wessaorg/rcomp/tmp/6bwzo1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 3.061660080 NA 1 -1.252360362 3.061660080 2 0.648853683 -1.252360362 3 1.018139502 0.648853683 4 -2.824368247 1.018139502 5 6.087610317 -2.824368247 6 0.187603441 6.087610317 7 -1.681627639 0.187603441 8 0.033704154 -1.681627639 9 2.511822594 0.033704154 10 3.769803424 2.511822594 11 -1.729710422 3.769803424 12 3.594516129 -1.729710422 13 -5.713589619 3.594516129 14 -1.517787759 -5.713589619 15 3.681541238 -1.517787759 16 -2.277375757 3.681541238 17 -7.058454122 -2.277375757 18 2.551427048 -7.058454122 19 -1.382295076 2.551427048 20 -2.287214675 -1.382295076 21 -0.612148470 -2.287214675 22 1.756308587 -0.612148470 23 1.923330862 1.756308587 24 6.033185192 1.923330862 25 2.058384154 6.033185192 26 0.511914038 2.058384154 27 3.586708985 0.511914038 28 0.990460101 3.586708985 29 0.270251432 0.990460101 30 4.682721650 0.270251432 31 1.913794741 4.682721650 32 -6.999709164 1.913794741 33 -1.067532288 -6.999709164 34 -1.636720982 -1.067532288 35 -0.751944044 -1.636720982 36 -3.167643235 -0.751944044 37 -0.829996503 -3.167643235 38 -0.584942025 -0.829996503 39 -2.671956073 -0.584942025 40 7.101874941 -2.671956073 41 0.269796210 7.101874941 42 -1.686961039 0.269796210 43 -0.806320584 -1.686961039 44 -1.363460848 -0.806320584 45 2.532309455 -1.363460848 46 3.252037096 2.532309455 47 -3.513192073 3.252037096 48 -0.006717296 -3.513192073 49 -2.813859274 -0.006717296 50 -1.745592323 -2.813859274 51 2.125053512 -1.745592323 52 6.470987842 2.125053512 53 -5.092979285 6.470987842 54 0.094549715 -5.092979285 55 5.549492111 0.094549715 56 3.075797119 5.549492111 57 -1.208135355 3.075797119 58 3.949177314 -1.208135355 59 -4.358438372 3.949177314 60 2.041268649 -4.358438372 61 0.489265918 2.041268649 62 4.315682550 0.489265918 63 -0.356564360 4.315682550 64 0.272551555 -0.356564360 65 3.026222280 0.272551555 66 2.690298485 3.026222280 67 -3.191859263 2.690298485 68 1.653563107 -3.191859263 69 0.990075911 1.653563107 70 1.217577783 0.990075911 71 0.493707099 1.217577783 72 3.138639899 0.493707099 73 1.407133688 3.138639899 74 1.935967145 1.407133688 75 -0.316985605 1.935967145 76 1.319437990 -0.316985605 77 1.812870573 1.319437990 78 5.397787181 1.812870573 79 -1.656936083 5.397787181 80 3.355811465 -1.656936083 81 6.321648884 3.355811465 82 0.677026452 6.321648884 83 1.899687306 0.677026452 84 3.871778226 1.899687306 85 2.664142022 3.871778226 86 -0.909316467 2.664142022 87 4.529784312 -0.909316467 88 -0.232471000 4.529784312 89 0.413421669 -0.232471000 90 3.588524094 0.413421669 91 2.171721023 3.588524094 92 1.026037985 2.171721023 93 -2.296637713 1.026037985 94 5.557098633 -2.296637713 95 2.536562347 5.557098633 96 3.069688046 2.536562347 97 0.944156474 3.069688046 98 0.208838375 0.944156474 99 -1.393193738 0.208838375 100 -0.628073019 -1.393193738 101 -0.315434857 -0.628073019 102 -3.757841165 -0.315434857 103 1.300410643 -3.757841165 104 7.171689333 1.300410643 105 -6.694496422 7.171689333 106 -3.729543854 -6.694496422 107 -4.946102927 -3.729543854 108 -0.681498154 -4.946102927 109 -0.010271646 -0.681498154 110 -0.306013227 -0.010271646 111 5.934713235 -0.306013227 112 -2.394392942 5.934713235 113 -8.203262571 -2.394392942 114 -2.068890088 -8.203262571 115 1.585345006 -2.068890088 116 -8.096010482 1.585345006 117 -3.916395843 -8.096010482 118 1.808178777 -3.916395843 119 -7.404347105 1.808178777 120 -3.413061386 -7.404347105 121 -5.158129586 -3.413061386 122 -4.310749053 -5.158129586 123 2.149913723 -4.310749053 124 0.790357225 2.149913723 125 1.574824544 0.790357225 126 0.389890598 1.574824544 127 2.412832871 0.389890598 128 4.459948311 2.412832871 129 0.831579685 4.459948311 130 -4.382424560 0.831579685 131 1.097487275 -4.382424560 132 2.294426007 1.097487275 133 1.002640489 2.294426007 134 3.232691198 1.002640489 135 -0.594071015 3.232691198 136 -2.412450301 -0.594071015 137 -9.125352486 -2.412450301 138 2.527713195 -9.125352486 139 -6.611888371 2.527713195 140 -9.154921387 -6.611888371 141 -2.106233485 -9.154921387 142 -7.692381716 -2.106233485 143 -0.482213861 -7.692381716 144 0.129123412 -0.482213861 145 -1.820549747 0.129123412 146 -2.647263733 -1.820549747 147 -2.137710451 -2.647263733 148 -4.110809432 -2.137710451 149 -0.143083791 -4.110809432 150 -1.304824850 -0.143083791 151 0.632136011 -1.304824850 152 5.805580515 0.632136011 153 -8.959146634 5.805580515 154 -0.970778269 -8.959146634 155 -0.461477688 -0.970778269 156 0.323716015 -0.461477688 157 0.069487424 0.323716015 158 2.291613951 0.069487424 159 NA 2.291613951 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.252360362 3.061660080 [2,] 0.648853683 -1.252360362 [3,] 1.018139502 0.648853683 [4,] -2.824368247 1.018139502 [5,] 6.087610317 -2.824368247 [6,] 0.187603441 6.087610317 [7,] -1.681627639 0.187603441 [8,] 0.033704154 -1.681627639 [9,] 2.511822594 0.033704154 [10,] 3.769803424 2.511822594 [11,] -1.729710422 3.769803424 [12,] 3.594516129 -1.729710422 [13,] -5.713589619 3.594516129 [14,] -1.517787759 -5.713589619 [15,] 3.681541238 -1.517787759 [16,] -2.277375757 3.681541238 [17,] -7.058454122 -2.277375757 [18,] 2.551427048 -7.058454122 [19,] -1.382295076 2.551427048 [20,] -2.287214675 -1.382295076 [21,] -0.612148470 -2.287214675 [22,] 1.756308587 -0.612148470 [23,] 1.923330862 1.756308587 [24,] 6.033185192 1.923330862 [25,] 2.058384154 6.033185192 [26,] 0.511914038 2.058384154 [27,] 3.586708985 0.511914038 [28,] 0.990460101 3.586708985 [29,] 0.270251432 0.990460101 [30,] 4.682721650 0.270251432 [31,] 1.913794741 4.682721650 [32,] -6.999709164 1.913794741 [33,] -1.067532288 -6.999709164 [34,] -1.636720982 -1.067532288 [35,] -0.751944044 -1.636720982 [36,] -3.167643235 -0.751944044 [37,] -0.829996503 -3.167643235 [38,] -0.584942025 -0.829996503 [39,] -2.671956073 -0.584942025 [40,] 7.101874941 -2.671956073 [41,] 0.269796210 7.101874941 [42,] -1.686961039 0.269796210 [43,] -0.806320584 -1.686961039 [44,] -1.363460848 -0.806320584 [45,] 2.532309455 -1.363460848 [46,] 3.252037096 2.532309455 [47,] -3.513192073 3.252037096 [48,] -0.006717296 -3.513192073 [49,] -2.813859274 -0.006717296 [50,] -1.745592323 -2.813859274 [51,] 2.125053512 -1.745592323 [52,] 6.470987842 2.125053512 [53,] -5.092979285 6.470987842 [54,] 0.094549715 -5.092979285 [55,] 5.549492111 0.094549715 [56,] 3.075797119 5.549492111 [57,] -1.208135355 3.075797119 [58,] 3.949177314 -1.208135355 [59,] -4.358438372 3.949177314 [60,] 2.041268649 -4.358438372 [61,] 0.489265918 2.041268649 [62,] 4.315682550 0.489265918 [63,] -0.356564360 4.315682550 [64,] 0.272551555 -0.356564360 [65,] 3.026222280 0.272551555 [66,] 2.690298485 3.026222280 [67,] -3.191859263 2.690298485 [68,] 1.653563107 -3.191859263 [69,] 0.990075911 1.653563107 [70,] 1.217577783 0.990075911 [71,] 0.493707099 1.217577783 [72,] 3.138639899 0.493707099 [73,] 1.407133688 3.138639899 [74,] 1.935967145 1.407133688 [75,] -0.316985605 1.935967145 [76,] 1.319437990 -0.316985605 [77,] 1.812870573 1.319437990 [78,] 5.397787181 1.812870573 [79,] -1.656936083 5.397787181 [80,] 3.355811465 -1.656936083 [81,] 6.321648884 3.355811465 [82,] 0.677026452 6.321648884 [83,] 1.899687306 0.677026452 [84,] 3.871778226 1.899687306 [85,] 2.664142022 3.871778226 [86,] -0.909316467 2.664142022 [87,] 4.529784312 -0.909316467 [88,] -0.232471000 4.529784312 [89,] 0.413421669 -0.232471000 [90,] 3.588524094 0.413421669 [91,] 2.171721023 3.588524094 [92,] 1.026037985 2.171721023 [93,] -2.296637713 1.026037985 [94,] 5.557098633 -2.296637713 [95,] 2.536562347 5.557098633 [96,] 3.069688046 2.536562347 [97,] 0.944156474 3.069688046 [98,] 0.208838375 0.944156474 [99,] -1.393193738 0.208838375 [100,] -0.628073019 -1.393193738 [101,] -0.315434857 -0.628073019 [102,] -3.757841165 -0.315434857 [103,] 1.300410643 -3.757841165 [104,] 7.171689333 1.300410643 [105,] -6.694496422 7.171689333 [106,] -3.729543854 -6.694496422 [107,] -4.946102927 -3.729543854 [108,] -0.681498154 -4.946102927 [109,] -0.010271646 -0.681498154 [110,] -0.306013227 -0.010271646 [111,] 5.934713235 -0.306013227 [112,] -2.394392942 5.934713235 [113,] -8.203262571 -2.394392942 [114,] -2.068890088 -8.203262571 [115,] 1.585345006 -2.068890088 [116,] -8.096010482 1.585345006 [117,] -3.916395843 -8.096010482 [118,] 1.808178777 -3.916395843 [119,] -7.404347105 1.808178777 [120,] -3.413061386 -7.404347105 [121,] -5.158129586 -3.413061386 [122,] -4.310749053 -5.158129586 [123,] 2.149913723 -4.310749053 [124,] 0.790357225 2.149913723 [125,] 1.574824544 0.790357225 [126,] 0.389890598 1.574824544 [127,] 2.412832871 0.389890598 [128,] 4.459948311 2.412832871 [129,] 0.831579685 4.459948311 [130,] -4.382424560 0.831579685 [131,] 1.097487275 -4.382424560 [132,] 2.294426007 1.097487275 [133,] 1.002640489 2.294426007 [134,] 3.232691198 1.002640489 [135,] -0.594071015 3.232691198 [136,] -2.412450301 -0.594071015 [137,] -9.125352486 -2.412450301 [138,] 2.527713195 -9.125352486 [139,] -6.611888371 2.527713195 [140,] -9.154921387 -6.611888371 [141,] -2.106233485 -9.154921387 [142,] -7.692381716 -2.106233485 [143,] -0.482213861 -7.692381716 [144,] 0.129123412 -0.482213861 [145,] -1.820549747 0.129123412 [146,] -2.647263733 -1.820549747 [147,] -2.137710451 -2.647263733 [148,] -4.110809432 -2.137710451 [149,] -0.143083791 -4.110809432 [150,] -1.304824850 -0.143083791 [151,] 0.632136011 -1.304824850 [152,] 5.805580515 0.632136011 [153,] -8.959146634 5.805580515 [154,] -0.970778269 -8.959146634 [155,] -0.461477688 -0.970778269 [156,] 0.323716015 -0.461477688 [157,] 0.069487424 0.323716015 [158,] 2.291613951 0.069487424 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.252360362 3.061660080 2 0.648853683 -1.252360362 3 1.018139502 0.648853683 4 -2.824368247 1.018139502 5 6.087610317 -2.824368247 6 0.187603441 6.087610317 7 -1.681627639 0.187603441 8 0.033704154 -1.681627639 9 2.511822594 0.033704154 10 3.769803424 2.511822594 11 -1.729710422 3.769803424 12 3.594516129 -1.729710422 13 -5.713589619 3.594516129 14 -1.517787759 -5.713589619 15 3.681541238 -1.517787759 16 -2.277375757 3.681541238 17 -7.058454122 -2.277375757 18 2.551427048 -7.058454122 19 -1.382295076 2.551427048 20 -2.287214675 -1.382295076 21 -0.612148470 -2.287214675 22 1.756308587 -0.612148470 23 1.923330862 1.756308587 24 6.033185192 1.923330862 25 2.058384154 6.033185192 26 0.511914038 2.058384154 27 3.586708985 0.511914038 28 0.990460101 3.586708985 29 0.270251432 0.990460101 30 4.682721650 0.270251432 31 1.913794741 4.682721650 32 -6.999709164 1.913794741 33 -1.067532288 -6.999709164 34 -1.636720982 -1.067532288 35 -0.751944044 -1.636720982 36 -3.167643235 -0.751944044 37 -0.829996503 -3.167643235 38 -0.584942025 -0.829996503 39 -2.671956073 -0.584942025 40 7.101874941 -2.671956073 41 0.269796210 7.101874941 42 -1.686961039 0.269796210 43 -0.806320584 -1.686961039 44 -1.363460848 -0.806320584 45 2.532309455 -1.363460848 46 3.252037096 2.532309455 47 -3.513192073 3.252037096 48 -0.006717296 -3.513192073 49 -2.813859274 -0.006717296 50 -1.745592323 -2.813859274 51 2.125053512 -1.745592323 52 6.470987842 2.125053512 53 -5.092979285 6.470987842 54 0.094549715 -5.092979285 55 5.549492111 0.094549715 56 3.075797119 5.549492111 57 -1.208135355 3.075797119 58 3.949177314 -1.208135355 59 -4.358438372 3.949177314 60 2.041268649 -4.358438372 61 0.489265918 2.041268649 62 4.315682550 0.489265918 63 -0.356564360 4.315682550 64 0.272551555 -0.356564360 65 3.026222280 0.272551555 66 2.690298485 3.026222280 67 -3.191859263 2.690298485 68 1.653563107 -3.191859263 69 0.990075911 1.653563107 70 1.217577783 0.990075911 71 0.493707099 1.217577783 72 3.138639899 0.493707099 73 1.407133688 3.138639899 74 1.935967145 1.407133688 75 -0.316985605 1.935967145 76 1.319437990 -0.316985605 77 1.812870573 1.319437990 78 5.397787181 1.812870573 79 -1.656936083 5.397787181 80 3.355811465 -1.656936083 81 6.321648884 3.355811465 82 0.677026452 6.321648884 83 1.899687306 0.677026452 84 3.871778226 1.899687306 85 2.664142022 3.871778226 86 -0.909316467 2.664142022 87 4.529784312 -0.909316467 88 -0.232471000 4.529784312 89 0.413421669 -0.232471000 90 3.588524094 0.413421669 91 2.171721023 3.588524094 92 1.026037985 2.171721023 93 -2.296637713 1.026037985 94 5.557098633 -2.296637713 95 2.536562347 5.557098633 96 3.069688046 2.536562347 97 0.944156474 3.069688046 98 0.208838375 0.944156474 99 -1.393193738 0.208838375 100 -0.628073019 -1.393193738 101 -0.315434857 -0.628073019 102 -3.757841165 -0.315434857 103 1.300410643 -3.757841165 104 7.171689333 1.300410643 105 -6.694496422 7.171689333 106 -3.729543854 -6.694496422 107 -4.946102927 -3.729543854 108 -0.681498154 -4.946102927 109 -0.010271646 -0.681498154 110 -0.306013227 -0.010271646 111 5.934713235 -0.306013227 112 -2.394392942 5.934713235 113 -8.203262571 -2.394392942 114 -2.068890088 -8.203262571 115 1.585345006 -2.068890088 116 -8.096010482 1.585345006 117 -3.916395843 -8.096010482 118 1.808178777 -3.916395843 119 -7.404347105 1.808178777 120 -3.413061386 -7.404347105 121 -5.158129586 -3.413061386 122 -4.310749053 -5.158129586 123 2.149913723 -4.310749053 124 0.790357225 2.149913723 125 1.574824544 0.790357225 126 0.389890598 1.574824544 127 2.412832871 0.389890598 128 4.459948311 2.412832871 129 0.831579685 4.459948311 130 -4.382424560 0.831579685 131 1.097487275 -4.382424560 132 2.294426007 1.097487275 133 1.002640489 2.294426007 134 3.232691198 1.002640489 135 -0.594071015 3.232691198 136 -2.412450301 -0.594071015 137 -9.125352486 -2.412450301 138 2.527713195 -9.125352486 139 -6.611888371 2.527713195 140 -9.154921387 -6.611888371 141 -2.106233485 -9.154921387 142 -7.692381716 -2.106233485 143 -0.482213861 -7.692381716 144 0.129123412 -0.482213861 145 -1.820549747 0.129123412 146 -2.647263733 -1.820549747 147 -2.137710451 -2.647263733 148 -4.110809432 -2.137710451 149 -0.143083791 -4.110809432 150 -1.304824850 -0.143083791 151 0.632136011 -1.304824850 152 5.805580515 0.632136011 153 -8.959146634 5.805580515 154 -0.970778269 -8.959146634 155 -0.461477688 -0.970778269 156 0.323716015 -0.461477688 157 0.069487424 0.323716015 158 2.291613951 0.069487424 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7g7w71322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8dmef1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/97dfn1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/1001ym1322213409.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11c4mr1322213409.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12c9an1322213409.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13b3ln1322213409.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14zkcg1322213409.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15r9n41322213409.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16w2k31322213409.tab") + } > > try(system("convert tmp/11ky01322213409.ps tmp/11ky01322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/2fnla1322213409.ps tmp/2fnla1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/3lb6z1322213409.ps tmp/3lb6z1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/4e8ni1322213409.ps tmp/4e8ni1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/5a2sx1322213409.ps tmp/5a2sx1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/6bwzo1322213409.ps tmp/6bwzo1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/7g7w71322213409.ps tmp/7g7w71322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/8dmef1322213409.ps tmp/8dmef1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/97dfn1322213409.ps tmp/97dfn1322213409.png",intern=TRUE)) character(0) > try(system("convert tmp/1001ym1322213409.ps tmp/1001ym1322213409.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.905 0.777 5.748