R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(0,24,0,25,0,17,0,18,0,18,0,16,1,20,1,16,1,18,1,17,1,23,1,30,1,23,1,18,1,15,1,12,1,21,1,15,1,20,1,31,1,27,1,34,1,21,1,31,1,19,1,16,1,20,1,21,1,22,1,17,1,24,1,25,1,26,1,25,1,17,1,32,1,33,1,13,1,32,1,25,1,29,1,22,1,18,1,17,1,20,1,15,1,20,1,33,1,29,1,23,1,26,1,18,1,20,1,11,1,28,1,26,1,22,1,17,1,12,1,14,1,17,1,21,1,19,1,18,1,10,1,29,1,31,1,19,1,9,1,20,1,28,1,19,1,30,1,29,1,26,1,23,1,13,1,21,1,19,1,28,1,23,1,18,1,21,1,20,1,23,1,21,1,21,1,15,1,28,1,19,1,26,1,10,1,16,1,22,1,19,1,31,1,31,1,29,1,19,1,22,1,23,1,15,1,20,1,18,1,23,1,25,1,21,1,24,1,25,1,17,1,13,1,28,1,21,1,25,1,9,1,16,1,19,1,17,1,25,1,20,1,29,1,14,1,22,1,15,1,19,1,20,1,15,1,20,1,18,1,33,1,22,1,16,1,17,1,16,1,21,1,26,1,18,1,18,1,17,1,22,1,30,1,30,1,24,1,21,1,21,1,29,1,31,1,20,1,16,1,22,1,20,1,28,1,38,1,22,1,20,1,17,1,28,1,22,1,31),dim=c(2,159),dimnames=list(c('Month','Concernovermistakes'),1:159)) > y <- array(NA,dim=c(2,159),dimnames=list(c('Month','Concernovermistakes'),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 = 'Linear Trend' > par2 = 'Include Monthly Dummies' > par1 = '2' > #'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 Concernovermistakes Month M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 24 0 1 0 0 0 0 0 0 0 0 0 0 1 2 25 0 0 1 0 0 0 0 0 0 0 0 0 2 3 17 0 0 0 1 0 0 0 0 0 0 0 0 3 4 18 0 0 0 0 1 0 0 0 0 0 0 0 4 5 18 0 0 0 0 0 1 0 0 0 0 0 0 5 6 16 0 0 0 0 0 0 1 0 0 0 0 0 6 7 20 1 0 0 0 0 0 0 1 0 0 0 0 7 8 16 1 0 0 0 0 0 0 0 1 0 0 0 8 9 18 1 0 0 0 0 0 0 0 0 1 0 0 9 10 17 1 0 0 0 0 0 0 0 0 0 1 0 10 11 23 1 0 0 0 0 0 0 0 0 0 0 1 11 12 30 1 0 0 0 0 0 0 0 0 0 0 0 12 13 23 1 1 0 0 0 0 0 0 0 0 0 0 13 14 18 1 0 1 0 0 0 0 0 0 0 0 0 14 15 15 1 0 0 1 0 0 0 0 0 0 0 0 15 16 12 1 0 0 0 1 0 0 0 0 0 0 0 16 17 21 1 0 0 0 0 1 0 0 0 0 0 0 17 18 15 1 0 0 0 0 0 1 0 0 0 0 0 18 19 20 1 0 0 0 0 0 0 1 0 0 0 0 19 20 31 1 0 0 0 0 0 0 0 1 0 0 0 20 21 27 1 0 0 0 0 0 0 0 0 1 0 0 21 22 34 1 0 0 0 0 0 0 0 0 0 1 0 22 23 21 1 0 0 0 0 0 0 0 0 0 0 1 23 24 31 1 0 0 0 0 0 0 0 0 0 0 0 24 25 19 1 1 0 0 0 0 0 0 0 0 0 0 25 26 16 1 0 1 0 0 0 0 0 0 0 0 0 26 27 20 1 0 0 1 0 0 0 0 0 0 0 0 27 28 21 1 0 0 0 1 0 0 0 0 0 0 0 28 29 22 1 0 0 0 0 1 0 0 0 0 0 0 29 30 17 1 0 0 0 0 0 1 0 0 0 0 0 30 31 24 1 0 0 0 0 0 0 1 0 0 0 0 31 32 25 1 0 0 0 0 0 0 0 1 0 0 0 32 33 26 1 0 0 0 0 0 0 0 0 1 0 0 33 34 25 1 0 0 0 0 0 0 0 0 0 1 0 34 35 17 1 0 0 0 0 0 0 0 0 0 0 1 35 36 32 1 0 0 0 0 0 0 0 0 0 0 0 36 37 33 1 1 0 0 0 0 0 0 0 0 0 0 37 38 13 1 0 1 0 0 0 0 0 0 0 0 0 38 39 32 1 0 0 1 0 0 0 0 0 0 0 0 39 40 25 1 0 0 0 1 0 0 0 0 0 0 0 40 41 29 1 0 0 0 0 1 0 0 0 0 0 0 41 42 22 1 0 0 0 0 0 1 0 0 0 0 0 42 43 18 1 0 0 0 0 0 0 1 0 0 0 0 43 44 17 1 0 0 0 0 0 0 0 1 0 0 0 44 45 20 1 0 0 0 0 0 0 0 0 1 0 0 45 46 15 1 0 0 0 0 0 0 0 0 0 1 0 46 47 20 1 0 0 0 0 0 0 0 0 0 0 1 47 48 33 1 0 0 0 0 0 0 0 0 0 0 0 48 49 29 1 1 0 0 0 0 0 0 0 0 0 0 49 50 23 1 0 1 0 0 0 0 0 0 0 0 0 50 51 26 1 0 0 1 0 0 0 0 0 0 0 0 51 52 18 1 0 0 0 1 0 0 0 0 0 0 0 52 53 20 1 0 0 0 0 1 0 0 0 0 0 0 53 54 11 1 0 0 0 0 0 1 0 0 0 0 0 54 55 28 1 0 0 0 0 0 0 1 0 0 0 0 55 56 26 1 0 0 0 0 0 0 0 1 0 0 0 56 57 22 1 0 0 0 0 0 0 0 0 1 0 0 57 58 17 1 0 0 0 0 0 0 0 0 0 1 0 58 59 12 1 0 0 0 0 0 0 0 0 0 0 1 59 60 14 1 0 0 0 0 0 0 0 0 0 0 0 60 61 17 1 1 0 0 0 0 0 0 0 0 0 0 61 62 21 1 0 1 0 0 0 0 0 0 0 0 0 62 63 19 1 0 0 1 0 0 0 0 0 0 0 0 63 64 18 1 0 0 0 1 0 0 0 0 0 0 0 64 65 10 1 0 0 0 0 1 0 0 0 0 0 0 65 66 29 1 0 0 0 0 0 1 0 0 0 0 0 66 67 31 1 0 0 0 0 0 0 1 0 0 0 0 67 68 19 1 0 0 0 0 0 0 0 1 0 0 0 68 69 9 1 0 0 0 0 0 0 0 0 1 0 0 69 70 20 1 0 0 0 0 0 0 0 0 0 1 0 70 71 28 1 0 0 0 0 0 0 0 0 0 0 1 71 72 19 1 0 0 0 0 0 0 0 0 0 0 0 72 73 30 1 1 0 0 0 0 0 0 0 0 0 0 73 74 29 1 0 1 0 0 0 0 0 0 0 0 0 74 75 26 1 0 0 1 0 0 0 0 0 0 0 0 75 76 23 1 0 0 0 1 0 0 0 0 0 0 0 76 77 13 1 0 0 0 0 1 0 0 0 0 0 0 77 78 21 1 0 0 0 0 0 1 0 0 0 0 0 78 79 19 1 0 0 0 0 0 0 1 0 0 0 0 79 80 28 1 0 0 0 0 0 0 0 1 0 0 0 80 81 23 1 0 0 0 0 0 0 0 0 1 0 0 81 82 18 1 0 0 0 0 0 0 0 0 0 1 0 82 83 21 1 0 0 0 0 0 0 0 0 0 0 1 83 84 20 1 0 0 0 0 0 0 0 0 0 0 0 84 85 23 1 1 0 0 0 0 0 0 0 0 0 0 85 86 21 1 0 1 0 0 0 0 0 0 0 0 0 86 87 21 1 0 0 1 0 0 0 0 0 0 0 0 87 88 15 1 0 0 0 1 0 0 0 0 0 0 0 88 89 28 1 0 0 0 0 1 0 0 0 0 0 0 89 90 19 1 0 0 0 0 0 1 0 0 0 0 0 90 91 26 1 0 0 0 0 0 0 1 0 0 0 0 91 92 10 1 0 0 0 0 0 0 0 1 0 0 0 92 93 16 1 0 0 0 0 0 0 0 0 1 0 0 93 94 22 1 0 0 0 0 0 0 0 0 0 1 0 94 95 19 1 0 0 0 0 0 0 0 0 0 0 1 95 96 31 1 0 0 0 0 0 0 0 0 0 0 0 96 97 31 1 1 0 0 0 0 0 0 0 0 0 0 97 98 29 1 0 1 0 0 0 0 0 0 0 0 0 98 99 19 1 0 0 1 0 0 0 0 0 0 0 0 99 100 22 1 0 0 0 1 0 0 0 0 0 0 0 100 101 23 1 0 0 0 0 1 0 0 0 0 0 0 101 102 15 1 0 0 0 0 0 1 0 0 0 0 0 102 103 20 1 0 0 0 0 0 0 1 0 0 0 0 103 104 18 1 0 0 0 0 0 0 0 1 0 0 0 104 105 23 1 0 0 0 0 0 0 0 0 1 0 0 105 106 25 1 0 0 0 0 0 0 0 0 0 1 0 106 107 21 1 0 0 0 0 0 0 0 0 0 0 1 107 108 24 1 0 0 0 0 0 0 0 0 0 0 0 108 109 25 1 1 0 0 0 0 0 0 0 0 0 0 109 110 17 1 0 1 0 0 0 0 0 0 0 0 0 110 111 13 1 0 0 1 0 0 0 0 0 0 0 0 111 112 28 1 0 0 0 1 0 0 0 0 0 0 0 112 113 21 1 0 0 0 0 1 0 0 0 0 0 0 113 114 25 1 0 0 0 0 0 1 0 0 0 0 0 114 115 9 1 0 0 0 0 0 0 1 0 0 0 0 115 116 16 1 0 0 0 0 0 0 0 1 0 0 0 116 117 19 1 0 0 0 0 0 0 0 0 1 0 0 117 118 17 1 0 0 0 0 0 0 0 0 0 1 0 118 119 25 1 0 0 0 0 0 0 0 0 0 0 1 119 120 20 1 0 0 0 0 0 0 0 0 0 0 0 120 121 29 1 1 0 0 0 0 0 0 0 0 0 0 121 122 14 1 0 1 0 0 0 0 0 0 0 0 0 122 123 22 1 0 0 1 0 0 0 0 0 0 0 0 123 124 15 1 0 0 0 1 0 0 0 0 0 0 0 124 125 19 1 0 0 0 0 1 0 0 0 0 0 0 125 126 20 1 0 0 0 0 0 1 0 0 0 0 0 126 127 15 1 0 0 0 0 0 0 1 0 0 0 0 127 128 20 1 0 0 0 0 0 0 0 1 0 0 0 128 129 18 1 0 0 0 0 0 0 0 0 1 0 0 129 130 33 1 0 0 0 0 0 0 0 0 0 1 0 130 131 22 1 0 0 0 0 0 0 0 0 0 0 1 131 132 16 1 0 0 0 0 0 0 0 0 0 0 0 132 133 17 1 1 0 0 0 0 0 0 0 0 0 0 133 134 16 1 0 1 0 0 0 0 0 0 0 0 0 134 135 21 1 0 0 1 0 0 0 0 0 0 0 0 135 136 26 1 0 0 0 1 0 0 0 0 0 0 0 136 137 18 1 0 0 0 0 1 0 0 0 0 0 0 137 138 18 1 0 0 0 0 0 1 0 0 0 0 0 138 139 17 1 0 0 0 0 0 0 1 0 0 0 0 139 140 22 1 0 0 0 0 0 0 0 1 0 0 0 140 141 30 1 0 0 0 0 0 0 0 0 1 0 0 141 142 30 1 0 0 0 0 0 0 0 0 0 1 0 142 143 24 1 0 0 0 0 0 0 0 0 0 0 1 143 144 21 1 0 0 0 0 0 0 0 0 0 0 0 144 145 21 1 1 0 0 0 0 0 0 0 0 0 0 145 146 29 1 0 1 0 0 0 0 0 0 0 0 0 146 147 31 1 0 0 1 0 0 0 0 0 0 0 0 147 148 20 1 0 0 0 1 0 0 0 0 0 0 0 148 149 16 1 0 0 0 0 1 0 0 0 0 0 0 149 150 22 1 0 0 0 0 0 1 0 0 0 0 0 150 151 20 1 0 0 0 0 0 0 1 0 0 0 0 151 152 28 1 0 0 0 0 0 0 0 1 0 0 0 152 153 38 1 0 0 0 0 0 0 0 0 1 0 0 153 154 22 1 0 0 0 0 0 0 0 0 0 1 0 154 155 20 1 0 0 0 0 0 0 0 0 0 0 1 155 156 17 1 0 0 0 0 0 0 0 0 0 0 0 156 157 28 1 1 0 0 0 0 0 0 0 0 0 0 157 158 22 1 0 1 0 0 0 0 0 0 0 0 0 158 159 31 1 0 0 1 0 0 0 0 0 0 0 0 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Month M1 M2 M3 M4 21.995338 1.401515 1.353959 -2.649559 -1.224505 -3.479437 M5 M6 M7 M8 M9 M10 -3.713724 -4.332626 -3.136260 -2.447469 -1.450987 -0.992965 M11 t -2.688790 0.003517 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -13.1886 -3.9043 -0.3808 3.8485 15.5160 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 21.995338 2.899528 7.586 3.66e-12 *** Month 1.401515 2.571152 0.545 0.5865 M1 1.353959 2.209902 0.613 0.5410 M2 -2.649559 2.209966 -1.199 0.2325 M3 -1.224505 2.210080 -0.554 0.5804 M4 -3.479437 2.251334 -1.546 0.1244 M5 -3.713724 2.251272 -1.650 0.1012 M6 -4.332626 2.251259 -1.925 0.0562 . M7 -3.136260 2.244117 -1.398 0.1644 M8 -2.447469 2.243896 -1.091 0.2772 M9 -1.450987 2.243725 -0.647 0.5189 M10 -0.992965 2.243603 -0.443 0.6587 M11 -2.688790 2.243529 -1.198 0.2327 t 0.003517 0.010483 0.336 0.7377 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 5.72 on 145 degrees of freedom Multiple R-squared: 0.08323, Adjusted R-squared: 0.001042 F-statistic: 1.013 on 13 and 145 DF, p-value: 0.4423 > 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.18601825 0.37203649 0.8139818 [2,] 0.08719651 0.17439301 0.9128035 [3,] 0.03555638 0.07111276 0.9644436 [4,] 0.14682814 0.29365627 0.8531719 [5,] 0.08521086 0.17042173 0.9147891 [6,] 0.11100531 0.22201061 0.8889947 [7,] 0.19888196 0.39776392 0.8011180 [8,] 0.18491054 0.36982108 0.8150895 [9,] 0.24764662 0.49529324 0.7523534 [10,] 0.28044952 0.56089903 0.7195505 [11,] 0.21782132 0.43564264 0.7821787 [12,] 0.17494416 0.34988832 0.8250558 [13,] 0.12593877 0.25187755 0.8740612 [14,] 0.08942307 0.17884614 0.9105769 [15,] 0.06431445 0.12862889 0.9356856 [16,] 0.05168322 0.10336643 0.9483168 [17,] 0.03572991 0.07145982 0.9642701 [18,] 0.03119843 0.06239685 0.9688016 [19,] 0.04491927 0.08983854 0.9550807 [20,] 0.03628672 0.07257344 0.9637133 [21,] 0.05160556 0.10321112 0.9483944 [22,] 0.08894690 0.17789379 0.9110531 [23,] 0.17674347 0.35348695 0.8232565 [24,] 0.15658979 0.31317958 0.8434102 [25,] 0.15871656 0.31743311 0.8412834 [26,] 0.12666050 0.25332100 0.8733395 [27,] 0.15523601 0.31047202 0.8447640 [28,] 0.23085718 0.46171436 0.7691428 [29,] 0.23317953 0.46635907 0.7668205 [30,] 0.35683720 0.71367440 0.6431628 [31,] 0.30923222 0.61846445 0.6907678 [32,] 0.32130091 0.64260183 0.6786991 [33,] 0.28629265 0.57258530 0.7137074 [34,] 0.24742088 0.49484175 0.7525791 [35,] 0.21664688 0.43329376 0.7833531 [36,] 0.18813571 0.37627142 0.8118643 [37,] 0.17120738 0.34241476 0.8287926 [38,] 0.20761874 0.41523749 0.7923813 [39,] 0.21997439 0.43994879 0.7800256 [40,] 0.20012014 0.40024029 0.7998799 [41,] 0.17157487 0.34314974 0.8284251 [42,] 0.18310777 0.36621553 0.8168922 [43,] 0.23853608 0.47707217 0.7614639 [44,] 0.47223917 0.94447833 0.5277608 [45,] 0.51010435 0.97979131 0.4898957 [46,] 0.46237893 0.92475785 0.5376211 [47,] 0.42265021 0.84530041 0.5773498 [48,] 0.37632429 0.75264857 0.6236757 [49,] 0.47026994 0.94053988 0.5297301 [50,] 0.59981924 0.80036151 0.4001808 [51,] 0.70719379 0.58561243 0.2928062 [52,] 0.67247246 0.65505508 0.3275275 [53,] 0.81644207 0.36711586 0.1835579 [54,] 0.78633164 0.42733673 0.2136684 [55,] 0.81787052 0.36425895 0.1821295 [56,] 0.81480409 0.37039183 0.1851959 [57,] 0.81376631 0.37246737 0.1862337 [58,] 0.85241216 0.29517567 0.1475878 [59,] 0.83877887 0.32244226 0.1612211 [60,] 0.81780880 0.36438239 0.1821912 [61,] 0.82439163 0.35121673 0.1756084 [62,] 0.79575217 0.40849565 0.2042478 [63,] 0.77089206 0.45821588 0.2291079 [64,] 0.80483513 0.39032975 0.1951649 [65,] 0.77169454 0.45661091 0.2283055 [66,] 0.75292671 0.49414658 0.2470733 [67,] 0.71259264 0.57481472 0.2874074 [68,] 0.68966250 0.62067500 0.3103375 [69,] 0.64658743 0.70682515 0.3534126 [70,] 0.60076184 0.79847633 0.3992382 [71,] 0.55244861 0.89510278 0.4475514 [72,] 0.53609127 0.92781745 0.4639087 [73,] 0.60251954 0.79496091 0.3974805 [74,] 0.55355638 0.89288723 0.4464436 [75,] 0.61092884 0.77814233 0.3890712 [76,] 0.70105638 0.59788725 0.2989436 [77,] 0.71005940 0.57988120 0.2899406 [78,] 0.66933240 0.66133521 0.3306676 [79,] 0.62550460 0.74899079 0.3744954 [80,] 0.72477294 0.55045412 0.2752271 [81,] 0.76057922 0.47884156 0.2394208 [82,] 0.84483234 0.31033532 0.1551677 [83,] 0.81630097 0.36739805 0.1836990 [84,] 0.78582019 0.42835962 0.2141798 [85,] 0.78696517 0.42606966 0.2130348 [86,] 0.76141526 0.47716948 0.2385847 [87,] 0.76993592 0.46012815 0.2300641 [88,] 0.73112477 0.53775046 0.2688752 [89,] 0.68800816 0.62398368 0.3119918 [90,] 0.65140953 0.69718094 0.3485905 [91,] 0.60181931 0.79636137 0.3981807 [92,] 0.63495837 0.73008326 0.3650416 [93,] 0.61147256 0.77705489 0.3885274 [94,] 0.56723380 0.86553240 0.4327662 [95,] 0.63613227 0.72773546 0.3638677 [96,] 0.73072825 0.53854350 0.2692718 [97,] 0.72971659 0.54056682 0.2702834 [98,] 0.77602181 0.44795639 0.2239782 [99,] 0.79734792 0.40530417 0.2026521 [100,] 0.76864934 0.46270133 0.2313507 [101,] 0.75749744 0.48500512 0.2425026 [102,] 0.78246821 0.43506359 0.2175318 [103,] 0.78030470 0.43939060 0.2196953 [104,] 0.77178651 0.45642697 0.2282135 [105,] 0.86125171 0.27749658 0.1387483 [106,] 0.84258184 0.31483631 0.1574182 [107,] 0.79998547 0.40002906 0.2000145 [108,] 0.77920508 0.44158984 0.2207949 [109,] 0.75480371 0.49039258 0.2451963 [110,] 0.71030117 0.57939766 0.2896988 [111,] 0.65214320 0.69571359 0.3478568 [112,] 0.58395917 0.83208165 0.4160408 [113,] 0.77017018 0.45965965 0.2298298 [114,] 0.86116099 0.27767801 0.1388390 [115,] 0.82461829 0.35076342 0.1753817 [116,] 0.77519262 0.44961476 0.2248074 [117,] 0.74293325 0.51413349 0.2570667 [118,] 0.75738802 0.48522395 0.2426120 [119,] 0.83647067 0.32705867 0.1635293 [120,] 0.82272279 0.35455443 0.1772772 [121,] 0.75112756 0.49774488 0.2488724 [122,] 0.67629722 0.64740556 0.3237028 [123,] 0.57910368 0.84179265 0.4208963 [124,] 0.54507911 0.90984178 0.4549209 [125,] 0.66097681 0.67804639 0.3390232 [126,] 0.60505931 0.78988138 0.3949407 > postscript(file="/var/www/rcomp/tmp/10hcs1290853552.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/rcomp/tmp/20hcs1290853552.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/rcomp/tmp/3tqbd1290853552.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/rcomp/tmp/4tqbd1290853552.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/rcomp/tmp/5tqbd1290853552.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.471861e-01 5.647186e+00 -3.781385e+00 -5.299700e-01 -2.992008e-01 6 7 8 9 10 -1.683816e+00 -2.852148e-01 -4.977522e+00 -3.977522e+00 -5.439061e+00 11 12 13 14 15 2.253247e+00 6.560939e+00 -1.796537e+00 -2.796537e+00 -7.225108e+00 16 17 18 19 20 -7.973693e+00 1.257076e+00 -4.127539e+00 -3.274226e-01 9.980270e+00 21 22 23 24 25 4.980270e+00 1.151873e+01 2.110390e-01 7.518731e+00 -5.838745e+00 26 27 28 29 30 -4.838745e+00 -2.267316e+00 9.840992e-01 2.214868e+00 -2.169747e+00 31 32 33 34 35 3.630370e+00 3.938062e+00 3.938062e+00 2.476523e+00 -3.831169e+00 36 37 38 39 40 8.476523e+00 8.119048e+00 -7.880952e+00 9.690476e+00 4.941891e+00 41 42 43 44 45 9.172661e+00 2.788045e+00 -2.411838e+00 -4.104146e+00 -2.104146e+00 46 47 48 49 50 -7.565684e+00 -8.733766e-01 9.434316e+00 4.076840e+00 2.076840e+00 51 52 53 54 55 3.648268e+00 -2.100316e+00 1.304529e-01 -8.254163e+00 7.545954e+00 56 57 58 59 60 4.853646e+00 -1.463536e-01 -5.607892e+00 -8.915584e+00 -9.607892e+00 61 62 63 64 65 -7.965368e+00 3.463203e-02 -3.393939e+00 -2.142524e+00 -9.911755e+00 66 67 68 69 70 9.703630e+00 1.050375e+01 -2.188561e+00 -1.318856e+01 -2.650100e+00 71 72 73 74 75 7.042208e+00 -4.650100e+00 4.992424e+00 7.992424e+00 3.563853e+00 76 77 78 79 80 2.815268e+00 -6.953963e+00 1.661422e+00 -1.538462e+00 6.769231e+00 81 82 83 84 85 7.692308e-01 -4.692308e+00 -5.431175e-17 -3.692308e+00 -2.049784e+00 86 87 88 89 90 -4.978355e-02 -1.478355e+00 -5.226940e+00 8.003830e+00 -3.807859e-01 91 92 93 94 95 5.419331e+00 -1.127298e+01 -6.272977e+00 -7.345155e-01 -2.042208e+00 96 97 98 99 100 7.265485e+00 5.908009e+00 7.908009e+00 -3.520563e+00 1.730852e+00 101 102 103 104 105 2.961622e+00 -4.422994e+00 -6.228771e-01 -3.315185e+00 6.848152e-01 106 107 108 109 110 2.223277e+00 -8.441558e-02 2.232767e-01 -1.341991e-01 -4.134199e+00 111 112 113 114 115 -9.562771e+00 7.688645e+00 9.194139e-01 5.534799e+00 -1.166508e+01 116 117 118 119 120 -5.357393e+00 -3.357393e+00 -5.818931e+00 3.873377e+00 -3.818931e+00 121 122 123 124 125 3.823593e+00 -7.176407e+00 -6.049784e-01 -5.353563e+00 -1.122794e+00 126 127 128 129 130 4.925907e-01 -5.707293e+00 -1.399600e+00 -4.399600e+00 1.013886e+01 131 132 133 134 135 8.311688e-01 -7.861139e+00 -8.218615e+00 -5.218615e+00 -1.647186e+00 136 137 138 139 140 5.604229e+00 -2.165002e+00 -1.549617e+00 -3.749500e+00 5.581918e-01 141 142 143 144 145 7.558192e+00 7.096653e+00 2.788961e+00 -2.903347e+00 -4.260823e+00 146 147 148 149 150 7.739177e+00 8.310606e+00 -4.379787e-01 -4.207209e+00 2.408175e+00 151 152 153 154 155 -7.917083e-01 6.515984e+00 1.551598e+01 -9.455544e-01 -1.253247e+00 156 157 158 159 -6.945554e+00 2.696970e+00 6.969697e-01 8.268398e+00 > postscript(file="/var/www/rcomp/tmp/6miag1290853552.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 6.471861e-01 NA 1 5.647186e+00 6.471861e-01 2 -3.781385e+00 5.647186e+00 3 -5.299700e-01 -3.781385e+00 4 -2.992008e-01 -5.299700e-01 5 -1.683816e+00 -2.992008e-01 6 -2.852148e-01 -1.683816e+00 7 -4.977522e+00 -2.852148e-01 8 -3.977522e+00 -4.977522e+00 9 -5.439061e+00 -3.977522e+00 10 2.253247e+00 -5.439061e+00 11 6.560939e+00 2.253247e+00 12 -1.796537e+00 6.560939e+00 13 -2.796537e+00 -1.796537e+00 14 -7.225108e+00 -2.796537e+00 15 -7.973693e+00 -7.225108e+00 16 1.257076e+00 -7.973693e+00 17 -4.127539e+00 1.257076e+00 18 -3.274226e-01 -4.127539e+00 19 9.980270e+00 -3.274226e-01 20 4.980270e+00 9.980270e+00 21 1.151873e+01 4.980270e+00 22 2.110390e-01 1.151873e+01 23 7.518731e+00 2.110390e-01 24 -5.838745e+00 7.518731e+00 25 -4.838745e+00 -5.838745e+00 26 -2.267316e+00 -4.838745e+00 27 9.840992e-01 -2.267316e+00 28 2.214868e+00 9.840992e-01 29 -2.169747e+00 2.214868e+00 30 3.630370e+00 -2.169747e+00 31 3.938062e+00 3.630370e+00 32 3.938062e+00 3.938062e+00 33 2.476523e+00 3.938062e+00 34 -3.831169e+00 2.476523e+00 35 8.476523e+00 -3.831169e+00 36 8.119048e+00 8.476523e+00 37 -7.880952e+00 8.119048e+00 38 9.690476e+00 -7.880952e+00 39 4.941891e+00 9.690476e+00 40 9.172661e+00 4.941891e+00 41 2.788045e+00 9.172661e+00 42 -2.411838e+00 2.788045e+00 43 -4.104146e+00 -2.411838e+00 44 -2.104146e+00 -4.104146e+00 45 -7.565684e+00 -2.104146e+00 46 -8.733766e-01 -7.565684e+00 47 9.434316e+00 -8.733766e-01 48 4.076840e+00 9.434316e+00 49 2.076840e+00 4.076840e+00 50 3.648268e+00 2.076840e+00 51 -2.100316e+00 3.648268e+00 52 1.304529e-01 -2.100316e+00 53 -8.254163e+00 1.304529e-01 54 7.545954e+00 -8.254163e+00 55 4.853646e+00 7.545954e+00 56 -1.463536e-01 4.853646e+00 57 -5.607892e+00 -1.463536e-01 58 -8.915584e+00 -5.607892e+00 59 -9.607892e+00 -8.915584e+00 60 -7.965368e+00 -9.607892e+00 61 3.463203e-02 -7.965368e+00 62 -3.393939e+00 3.463203e-02 63 -2.142524e+00 -3.393939e+00 64 -9.911755e+00 -2.142524e+00 65 9.703630e+00 -9.911755e+00 66 1.050375e+01 9.703630e+00 67 -2.188561e+00 1.050375e+01 68 -1.318856e+01 -2.188561e+00 69 -2.650100e+00 -1.318856e+01 70 7.042208e+00 -2.650100e+00 71 -4.650100e+00 7.042208e+00 72 4.992424e+00 -4.650100e+00 73 7.992424e+00 4.992424e+00 74 3.563853e+00 7.992424e+00 75 2.815268e+00 3.563853e+00 76 -6.953963e+00 2.815268e+00 77 1.661422e+00 -6.953963e+00 78 -1.538462e+00 1.661422e+00 79 6.769231e+00 -1.538462e+00 80 7.692308e-01 6.769231e+00 81 -4.692308e+00 7.692308e-01 82 -5.431175e-17 -4.692308e+00 83 -3.692308e+00 -5.431175e-17 84 -2.049784e+00 -3.692308e+00 85 -4.978355e-02 -2.049784e+00 86 -1.478355e+00 -4.978355e-02 87 -5.226940e+00 -1.478355e+00 88 8.003830e+00 -5.226940e+00 89 -3.807859e-01 8.003830e+00 90 5.419331e+00 -3.807859e-01 91 -1.127298e+01 5.419331e+00 92 -6.272977e+00 -1.127298e+01 93 -7.345155e-01 -6.272977e+00 94 -2.042208e+00 -7.345155e-01 95 7.265485e+00 -2.042208e+00 96 5.908009e+00 7.265485e+00 97 7.908009e+00 5.908009e+00 98 -3.520563e+00 7.908009e+00 99 1.730852e+00 -3.520563e+00 100 2.961622e+00 1.730852e+00 101 -4.422994e+00 2.961622e+00 102 -6.228771e-01 -4.422994e+00 103 -3.315185e+00 -6.228771e-01 104 6.848152e-01 -3.315185e+00 105 2.223277e+00 6.848152e-01 106 -8.441558e-02 2.223277e+00 107 2.232767e-01 -8.441558e-02 108 -1.341991e-01 2.232767e-01 109 -4.134199e+00 -1.341991e-01 110 -9.562771e+00 -4.134199e+00 111 7.688645e+00 -9.562771e+00 112 9.194139e-01 7.688645e+00 113 5.534799e+00 9.194139e-01 114 -1.166508e+01 5.534799e+00 115 -5.357393e+00 -1.166508e+01 116 -3.357393e+00 -5.357393e+00 117 -5.818931e+00 -3.357393e+00 118 3.873377e+00 -5.818931e+00 119 -3.818931e+00 3.873377e+00 120 3.823593e+00 -3.818931e+00 121 -7.176407e+00 3.823593e+00 122 -6.049784e-01 -7.176407e+00 123 -5.353563e+00 -6.049784e-01 124 -1.122794e+00 -5.353563e+00 125 4.925907e-01 -1.122794e+00 126 -5.707293e+00 4.925907e-01 127 -1.399600e+00 -5.707293e+00 128 -4.399600e+00 -1.399600e+00 129 1.013886e+01 -4.399600e+00 130 8.311688e-01 1.013886e+01 131 -7.861139e+00 8.311688e-01 132 -8.218615e+00 -7.861139e+00 133 -5.218615e+00 -8.218615e+00 134 -1.647186e+00 -5.218615e+00 135 5.604229e+00 -1.647186e+00 136 -2.165002e+00 5.604229e+00 137 -1.549617e+00 -2.165002e+00 138 -3.749500e+00 -1.549617e+00 139 5.581918e-01 -3.749500e+00 140 7.558192e+00 5.581918e-01 141 7.096653e+00 7.558192e+00 142 2.788961e+00 7.096653e+00 143 -2.903347e+00 2.788961e+00 144 -4.260823e+00 -2.903347e+00 145 7.739177e+00 -4.260823e+00 146 8.310606e+00 7.739177e+00 147 -4.379787e-01 8.310606e+00 148 -4.207209e+00 -4.379787e-01 149 2.408175e+00 -4.207209e+00 150 -7.917083e-01 2.408175e+00 151 6.515984e+00 -7.917083e-01 152 1.551598e+01 6.515984e+00 153 -9.455544e-01 1.551598e+01 154 -1.253247e+00 -9.455544e-01 155 -6.945554e+00 -1.253247e+00 156 2.696970e+00 -6.945554e+00 157 6.969697e-01 2.696970e+00 158 8.268398e+00 6.969697e-01 159 NA 8.268398e+00 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 5.647186e+00 6.471861e-01 [2,] -3.781385e+00 5.647186e+00 [3,] -5.299700e-01 -3.781385e+00 [4,] -2.992008e-01 -5.299700e-01 [5,] -1.683816e+00 -2.992008e-01 [6,] -2.852148e-01 -1.683816e+00 [7,] -4.977522e+00 -2.852148e-01 [8,] -3.977522e+00 -4.977522e+00 [9,] -5.439061e+00 -3.977522e+00 [10,] 2.253247e+00 -5.439061e+00 [11,] 6.560939e+00 2.253247e+00 [12,] -1.796537e+00 6.560939e+00 [13,] -2.796537e+00 -1.796537e+00 [14,] -7.225108e+00 -2.796537e+00 [15,] -7.973693e+00 -7.225108e+00 [16,] 1.257076e+00 -7.973693e+00 [17,] -4.127539e+00 1.257076e+00 [18,] -3.274226e-01 -4.127539e+00 [19,] 9.980270e+00 -3.274226e-01 [20,] 4.980270e+00 9.980270e+00 [21,] 1.151873e+01 4.980270e+00 [22,] 2.110390e-01 1.151873e+01 [23,] 7.518731e+00 2.110390e-01 [24,] -5.838745e+00 7.518731e+00 [25,] -4.838745e+00 -5.838745e+00 [26,] -2.267316e+00 -4.838745e+00 [27,] 9.840992e-01 -2.267316e+00 [28,] 2.214868e+00 9.840992e-01 [29,] -2.169747e+00 2.214868e+00 [30,] 3.630370e+00 -2.169747e+00 [31,] 3.938062e+00 3.630370e+00 [32,] 3.938062e+00 3.938062e+00 [33,] 2.476523e+00 3.938062e+00 [34,] -3.831169e+00 2.476523e+00 [35,] 8.476523e+00 -3.831169e+00 [36,] 8.119048e+00 8.476523e+00 [37,] -7.880952e+00 8.119048e+00 [38,] 9.690476e+00 -7.880952e+00 [39,] 4.941891e+00 9.690476e+00 [40,] 9.172661e+00 4.941891e+00 [41,] 2.788045e+00 9.172661e+00 [42,] -2.411838e+00 2.788045e+00 [43,] -4.104146e+00 -2.411838e+00 [44,] -2.104146e+00 -4.104146e+00 [45,] -7.565684e+00 -2.104146e+00 [46,] -8.733766e-01 -7.565684e+00 [47,] 9.434316e+00 -8.733766e-01 [48,] 4.076840e+00 9.434316e+00 [49,] 2.076840e+00 4.076840e+00 [50,] 3.648268e+00 2.076840e+00 [51,] -2.100316e+00 3.648268e+00 [52,] 1.304529e-01 -2.100316e+00 [53,] -8.254163e+00 1.304529e-01 [54,] 7.545954e+00 -8.254163e+00 [55,] 4.853646e+00 7.545954e+00 [56,] -1.463536e-01 4.853646e+00 [57,] -5.607892e+00 -1.463536e-01 [58,] -8.915584e+00 -5.607892e+00 [59,] -9.607892e+00 -8.915584e+00 [60,] -7.965368e+00 -9.607892e+00 [61,] 3.463203e-02 -7.965368e+00 [62,] -3.393939e+00 3.463203e-02 [63,] -2.142524e+00 -3.393939e+00 [64,] -9.911755e+00 -2.142524e+00 [65,] 9.703630e+00 -9.911755e+00 [66,] 1.050375e+01 9.703630e+00 [67,] -2.188561e+00 1.050375e+01 [68,] -1.318856e+01 -2.188561e+00 [69,] -2.650100e+00 -1.318856e+01 [70,] 7.042208e+00 -2.650100e+00 [71,] -4.650100e+00 7.042208e+00 [72,] 4.992424e+00 -4.650100e+00 [73,] 7.992424e+00 4.992424e+00 [74,] 3.563853e+00 7.992424e+00 [75,] 2.815268e+00 3.563853e+00 [76,] -6.953963e+00 2.815268e+00 [77,] 1.661422e+00 -6.953963e+00 [78,] -1.538462e+00 1.661422e+00 [79,] 6.769231e+00 -1.538462e+00 [80,] 7.692308e-01 6.769231e+00 [81,] -4.692308e+00 7.692308e-01 [82,] -5.431175e-17 -4.692308e+00 [83,] -3.692308e+00 -5.431175e-17 [84,] -2.049784e+00 -3.692308e+00 [85,] -4.978355e-02 -2.049784e+00 [86,] -1.478355e+00 -4.978355e-02 [87,] -5.226940e+00 -1.478355e+00 [88,] 8.003830e+00 -5.226940e+00 [89,] -3.807859e-01 8.003830e+00 [90,] 5.419331e+00 -3.807859e-01 [91,] -1.127298e+01 5.419331e+00 [92,] -6.272977e+00 -1.127298e+01 [93,] -7.345155e-01 -6.272977e+00 [94,] -2.042208e+00 -7.345155e-01 [95,] 7.265485e+00 -2.042208e+00 [96,] 5.908009e+00 7.265485e+00 [97,] 7.908009e+00 5.908009e+00 [98,] -3.520563e+00 7.908009e+00 [99,] 1.730852e+00 -3.520563e+00 [100,] 2.961622e+00 1.730852e+00 [101,] -4.422994e+00 2.961622e+00 [102,] -6.228771e-01 -4.422994e+00 [103,] -3.315185e+00 -6.228771e-01 [104,] 6.848152e-01 -3.315185e+00 [105,] 2.223277e+00 6.848152e-01 [106,] -8.441558e-02 2.223277e+00 [107,] 2.232767e-01 -8.441558e-02 [108,] -1.341991e-01 2.232767e-01 [109,] -4.134199e+00 -1.341991e-01 [110,] -9.562771e+00 -4.134199e+00 [111,] 7.688645e+00 -9.562771e+00 [112,] 9.194139e-01 7.688645e+00 [113,] 5.534799e+00 9.194139e-01 [114,] -1.166508e+01 5.534799e+00 [115,] -5.357393e+00 -1.166508e+01 [116,] -3.357393e+00 -5.357393e+00 [117,] -5.818931e+00 -3.357393e+00 [118,] 3.873377e+00 -5.818931e+00 [119,] -3.818931e+00 3.873377e+00 [120,] 3.823593e+00 -3.818931e+00 [121,] -7.176407e+00 3.823593e+00 [122,] -6.049784e-01 -7.176407e+00 [123,] -5.353563e+00 -6.049784e-01 [124,] -1.122794e+00 -5.353563e+00 [125,] 4.925907e-01 -1.122794e+00 [126,] -5.707293e+00 4.925907e-01 [127,] -1.399600e+00 -5.707293e+00 [128,] -4.399600e+00 -1.399600e+00 [129,] 1.013886e+01 -4.399600e+00 [130,] 8.311688e-01 1.013886e+01 [131,] -7.861139e+00 8.311688e-01 [132,] -8.218615e+00 -7.861139e+00 [133,] -5.218615e+00 -8.218615e+00 [134,] -1.647186e+00 -5.218615e+00 [135,] 5.604229e+00 -1.647186e+00 [136,] -2.165002e+00 5.604229e+00 [137,] -1.549617e+00 -2.165002e+00 [138,] -3.749500e+00 -1.549617e+00 [139,] 5.581918e-01 -3.749500e+00 [140,] 7.558192e+00 5.581918e-01 [141,] 7.096653e+00 7.558192e+00 [142,] 2.788961e+00 7.096653e+00 [143,] -2.903347e+00 2.788961e+00 [144,] -4.260823e+00 -2.903347e+00 [145,] 7.739177e+00 -4.260823e+00 [146,] 8.310606e+00 7.739177e+00 [147,] -4.379787e-01 8.310606e+00 [148,] -4.207209e+00 -4.379787e-01 [149,] 2.408175e+00 -4.207209e+00 [150,] -7.917083e-01 2.408175e+00 [151,] 6.515984e+00 -7.917083e-01 [152,] 1.551598e+01 6.515984e+00 [153,] -9.455544e-01 1.551598e+01 [154,] -1.253247e+00 -9.455544e-01 [155,] -6.945554e+00 -1.253247e+00 [156,] 2.696970e+00 -6.945554e+00 [157,] 6.969697e-01 2.696970e+00 [158,] 8.268398e+00 6.969697e-01 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 5.647186e+00 6.471861e-01 2 -3.781385e+00 5.647186e+00 3 -5.299700e-01 -3.781385e+00 4 -2.992008e-01 -5.299700e-01 5 -1.683816e+00 -2.992008e-01 6 -2.852148e-01 -1.683816e+00 7 -4.977522e+00 -2.852148e-01 8 -3.977522e+00 -4.977522e+00 9 -5.439061e+00 -3.977522e+00 10 2.253247e+00 -5.439061e+00 11 6.560939e+00 2.253247e+00 12 -1.796537e+00 6.560939e+00 13 -2.796537e+00 -1.796537e+00 14 -7.225108e+00 -2.796537e+00 15 -7.973693e+00 -7.225108e+00 16 1.257076e+00 -7.973693e+00 17 -4.127539e+00 1.257076e+00 18 -3.274226e-01 -4.127539e+00 19 9.980270e+00 -3.274226e-01 20 4.980270e+00 9.980270e+00 21 1.151873e+01 4.980270e+00 22 2.110390e-01 1.151873e+01 23 7.518731e+00 2.110390e-01 24 -5.838745e+00 7.518731e+00 25 -4.838745e+00 -5.838745e+00 26 -2.267316e+00 -4.838745e+00 27 9.840992e-01 -2.267316e+00 28 2.214868e+00 9.840992e-01 29 -2.169747e+00 2.214868e+00 30 3.630370e+00 -2.169747e+00 31 3.938062e+00 3.630370e+00 32 3.938062e+00 3.938062e+00 33 2.476523e+00 3.938062e+00 34 -3.831169e+00 2.476523e+00 35 8.476523e+00 -3.831169e+00 36 8.119048e+00 8.476523e+00 37 -7.880952e+00 8.119048e+00 38 9.690476e+00 -7.880952e+00 39 4.941891e+00 9.690476e+00 40 9.172661e+00 4.941891e+00 41 2.788045e+00 9.172661e+00 42 -2.411838e+00 2.788045e+00 43 -4.104146e+00 -2.411838e+00 44 -2.104146e+00 -4.104146e+00 45 -7.565684e+00 -2.104146e+00 46 -8.733766e-01 -7.565684e+00 47 9.434316e+00 -8.733766e-01 48 4.076840e+00 9.434316e+00 49 2.076840e+00 4.076840e+00 50 3.648268e+00 2.076840e+00 51 -2.100316e+00 3.648268e+00 52 1.304529e-01 -2.100316e+00 53 -8.254163e+00 1.304529e-01 54 7.545954e+00 -8.254163e+00 55 4.853646e+00 7.545954e+00 56 -1.463536e-01 4.853646e+00 57 -5.607892e+00 -1.463536e-01 58 -8.915584e+00 -5.607892e+00 59 -9.607892e+00 -8.915584e+00 60 -7.965368e+00 -9.607892e+00 61 3.463203e-02 -7.965368e+00 62 -3.393939e+00 3.463203e-02 63 -2.142524e+00 -3.393939e+00 64 -9.911755e+00 -2.142524e+00 65 9.703630e+00 -9.911755e+00 66 1.050375e+01 9.703630e+00 67 -2.188561e+00 1.050375e+01 68 -1.318856e+01 -2.188561e+00 69 -2.650100e+00 -1.318856e+01 70 7.042208e+00 -2.650100e+00 71 -4.650100e+00 7.042208e+00 72 4.992424e+00 -4.650100e+00 73 7.992424e+00 4.992424e+00 74 3.563853e+00 7.992424e+00 75 2.815268e+00 3.563853e+00 76 -6.953963e+00 2.815268e+00 77 1.661422e+00 -6.953963e+00 78 -1.538462e+00 1.661422e+00 79 6.769231e+00 -1.538462e+00 80 7.692308e-01 6.769231e+00 81 -4.692308e+00 7.692308e-01 82 -5.431175e-17 -4.692308e+00 83 -3.692308e+00 -5.431175e-17 84 -2.049784e+00 -3.692308e+00 85 -4.978355e-02 -2.049784e+00 86 -1.478355e+00 -4.978355e-02 87 -5.226940e+00 -1.478355e+00 88 8.003830e+00 -5.226940e+00 89 -3.807859e-01 8.003830e+00 90 5.419331e+00 -3.807859e-01 91 -1.127298e+01 5.419331e+00 92 -6.272977e+00 -1.127298e+01 93 -7.345155e-01 -6.272977e+00 94 -2.042208e+00 -7.345155e-01 95 7.265485e+00 -2.042208e+00 96 5.908009e+00 7.265485e+00 97 7.908009e+00 5.908009e+00 98 -3.520563e+00 7.908009e+00 99 1.730852e+00 -3.520563e+00 100 2.961622e+00 1.730852e+00 101 -4.422994e+00 2.961622e+00 102 -6.228771e-01 -4.422994e+00 103 -3.315185e+00 -6.228771e-01 104 6.848152e-01 -3.315185e+00 105 2.223277e+00 6.848152e-01 106 -8.441558e-02 2.223277e+00 107 2.232767e-01 -8.441558e-02 108 -1.341991e-01 2.232767e-01 109 -4.134199e+00 -1.341991e-01 110 -9.562771e+00 -4.134199e+00 111 7.688645e+00 -9.562771e+00 112 9.194139e-01 7.688645e+00 113 5.534799e+00 9.194139e-01 114 -1.166508e+01 5.534799e+00 115 -5.357393e+00 -1.166508e+01 116 -3.357393e+00 -5.357393e+00 117 -5.818931e+00 -3.357393e+00 118 3.873377e+00 -5.818931e+00 119 -3.818931e+00 3.873377e+00 120 3.823593e+00 -3.818931e+00 121 -7.176407e+00 3.823593e+00 122 -6.049784e-01 -7.176407e+00 123 -5.353563e+00 -6.049784e-01 124 -1.122794e+00 -5.353563e+00 125 4.925907e-01 -1.122794e+00 126 -5.707293e+00 4.925907e-01 127 -1.399600e+00 -5.707293e+00 128 -4.399600e+00 -1.399600e+00 129 1.013886e+01 -4.399600e+00 130 8.311688e-01 1.013886e+01 131 -7.861139e+00 8.311688e-01 132 -8.218615e+00 -7.861139e+00 133 -5.218615e+00 -8.218615e+00 134 -1.647186e+00 -5.218615e+00 135 5.604229e+00 -1.647186e+00 136 -2.165002e+00 5.604229e+00 137 -1.549617e+00 -2.165002e+00 138 -3.749500e+00 -1.549617e+00 139 5.581918e-01 -3.749500e+00 140 7.558192e+00 5.581918e-01 141 7.096653e+00 7.558192e+00 142 2.788961e+00 7.096653e+00 143 -2.903347e+00 2.788961e+00 144 -4.260823e+00 -2.903347e+00 145 7.739177e+00 -4.260823e+00 146 8.310606e+00 7.739177e+00 147 -4.379787e-01 8.310606e+00 148 -4.207209e+00 -4.379787e-01 149 2.408175e+00 -4.207209e+00 150 -7.917083e-01 2.408175e+00 151 6.515984e+00 -7.917083e-01 152 1.551598e+01 6.515984e+00 153 -9.455544e-01 1.551598e+01 154 -1.253247e+00 -9.455544e-01 155 -6.945554e+00 -1.253247e+00 156 2.696970e+00 -6.945554e+00 157 6.969697e-01 2.696970e+00 158 8.268398e+00 6.969697e-01 > 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/rcomp/tmp/7wra11290853552.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/rcomp/tmp/8wra11290853552.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/rcomp/tmp/9wra11290853552.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/rcomp/tmp/1070rm1290853552.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11s1pa1290853552.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/rcomp/tmp/12w16g1290853552.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/rcomp/tmp/13stm71290853552.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/rcomp/tmp/14323s1290853552.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/rcomp/tmp/15631x1290853552.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/rcomp/tmp/162cz61290853552.tab") + } > > try(system("convert tmp/10hcs1290853552.ps tmp/10hcs1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/20hcs1290853552.ps tmp/20hcs1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/3tqbd1290853552.ps tmp/3tqbd1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/4tqbd1290853552.ps tmp/4tqbd1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/5tqbd1290853552.ps tmp/5tqbd1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/6miag1290853552.ps tmp/6miag1290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/7wra11290853552.ps tmp/7wra11290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/8wra11290853552.ps tmp/8wra11290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/9wra11290853552.ps tmp/9wra11290853552.png",intern=TRUE)) character(0) > try(system("convert tmp/1070rm1290853552.ps tmp/1070rm1290853552.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.580 1.100 6.666