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(2 + ,2 + ,4 + ,2 + ,2 + ,2 + ,4 + ,1 + ,4 + ,2 + ,5 + ,4 + ,2 + ,2 + ,2 + ,2 + ,3 + ,2 + ,2 + ,2 + ,4 + ,1 + ,4 + ,2 + ,3 + ,1 + ,4 + ,2 + ,3 + ,3 + ,4 + ,2 + ,3 + ,2 + ,4 + ,1 + ,2 + ,1 + ,2 + ,4 + ,4 + ,4 + ,3 + ,2 + ,4 + ,2 + ,4 + ,3 + ,3 + ,3 + ,3 + ,2 + ,3 + ,2 + ,4 + ,2 + ,4 + ,1 + ,4 + ,1 + ,4 + ,1 + ,4 + ,3 + ,3 + ,2 + ,4 + ,1 + ,3 + ,2 + ,2 + ,2 + ,3 + ,2 + ,4 + ,4 + ,4 + ,2 + ,4 + ,4 + ,2 + ,1 + ,4 + ,3 + ,5 + ,2 + ,3 + ,2 + ,4 + ,4 + ,2 + ,3 + ,2 + ,2 + ,4 + ,2 + ,3 + ,2 + ,2 + ,2 + ,4 + ,2 + ,3 + ,3 + ,4 + ,2 + ,4 + ,3 + ,3 + ,2 + ,3 + ,2 + ,4 + ,3 + ,4 + ,4 + ,4 + ,2 + ,4 + ,2 + ,1 + ,1 + ,4 + ,2 + ,4 + ,4 + ,4 + ,3 + ,5 + ,1 + ,4 + ,5 + ,2 + ,2 + ,4 + ,2 + ,4 + ,2 + ,4 + ,3 + ,3 + ,2 + ,5 + ,1 + ,2 + ,2 + ,4 + ,2 + ,4 + ,2 + ,2 + ,2 + ,5 + ,2 + ,4 + ,4 + ,4 + ,2 + ,4 + ,2 + ,4 + ,2 + ,5 + ,4 + ,4 + ,2 + ,4 + ,3 + ,3 + ,2 + ,2 + ,2 + ,4 + ,2 + ,4 + ,4 + ,2 + ,2 + ,4 + ,2 + ,2 + ,1 + ,4 + ,2 + ,4 + ,2 + ,2 + ,2 + ,2 + ,1 + ,5 + ,2 + ,4 + ,2 + ,4 + ,2 + ,4 + ,1 + ,4 + ,3 + ,1 + ,1 + ,4 + ,1 + ,4 + ,2 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,1 + ,1 + ,3 + ,1 + ,4 + ,5 + ,5 + ,5 + ,3 + ,2 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,4 + ,1 + ,4 + ,2 + ,3 + ,1 + ,4 + ,1 + ,2 + ,2 + ,2 + ,2 + ,2 + ,2 + ,4 + ,2 + ,3 + ,1 + ,4 + ,2 + ,2 + ,1 + ,4 + ,4 + ,1 + ,2 + ,4 + ,2 + ,3 + ,1 + ,3 + ,1 + ,2 + ,1 + ,4 + ,2 + ,3 + ,2 + ,2 + ,2 + ,3 + ,1 + ,4 + ,2 + ,3 + ,1 + ,4 + ,1 + ,2 + ,2 + ,4 + ,2 + ,3 + ,1 + ,4 + ,2 + ,2 + ,1 + ,4 + ,2 + ,4 + ,3 + ,4 + ,3 + ,4 + ,3 + ,3 + ,3 + ,4 + ,2 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,3 + ,1 + ,4 + ,3 + ,4 + ,3 + ,4 + ,2 + ,3 + ,2 + ,4 + ,2 + ,4 + ,2 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,3 + ,2 + ,2 + ,2 + ,3 + ,1 + ,3 + ,1 + ,4 + ,4 + ,5 + ,3 + ,2 + ,1 + ,3 + ,2 + ,4 + ,1 + ,3 + ,4 + ,2 + ,1 + ,4 + ,2 + ,2 + ,1 + ,4 + ,1 + ,4 + ,4 + ,4 + ,4 + ,3 + ,2 + ,4 + ,3 + ,4 + ,2 + ,4 + ,2 + ,2 + ,1 + ,3 + ,3 + ,2 + ,1 + ,4 + ,2 + ,3 + ,1 + ,4 + ,3 + ,3 + ,3 + ,4 + ,2 + ,5 + ,4 + ,5 + ,5 + ,2 + ,4 + ,4 + ,3 + ,3 + ,3 + ,4 + ,4 + ,4 + ,2 + ,2 + ,2 + ,3 + ,2 + ,3 + ,2 + ,4 + ,3 + ,3 + ,2 + ,3 + ,1 + ,3 + ,3 + ,3 + ,3 + ,4 + ,4 + ,2 + ,2 + ,4 + ,3 + ,3 + ,2 + ,2 + ,2 + ,2 + ,2 + ,3 + ,2 + ,3 + ,2 + ,3 + ,3 + ,2 + ,4 + ,4 + ,2 + ,4 + ,3 + ,4 + ,2 + ,2 + ,1 + ,2 + ,2 + ,4 + ,1 + ,3 + ,2 + ,4 + ,2 + ,4 + ,3 + ,1 + ,1 + ,4 + ,2 + ,5 + ,3 + ,5 + ,4 + ,2 + ,2 + ,3 + ,1 + ,3 + ,2 + ,3 + ,2 + ,4 + ,2 + ,4 + ,4 + ,1 + ,1 + ,3 + ,2 + ,5 + ,3 + ,3 + ,2 + ,3 + ,1 + ,2 + ,1 + ,3 + ,1 + ,4 + ,1 + ,3 + ,2 + ,3 + ,3 + ,3 + ,3 + ,4 + ,3 + ,2 + ,2 + ,5 + ,1 + ,2 + ,1 + ,4 + ,1 + ,4 + ,2 + ,3 + ,3 + ,4 + ,1 + ,3 + ,1 + ,3 + ,2 + ,3 + ,2 + ,3 + ,1 + ,3 + ,3 + ,3 + ,2 + ,4 + ,2 + ,4 + ,3 + ,4 + ,2 + ,3 + ,2 + ,3 + ,2 + ,4 + ,1 + ,2 + ,2 + ,4 + ,1 + ,3 + ,2 + ,2 + ,2 + ,2 + ,2 + ,4 + ,2 + ,4 + ,4 + ,2 + ,1 + ,4 + ,2 + ,4 + ,2 + ,4 + ,2 + ,3 + ,3 + ,4 + ,3 + ,3 + ,4 + ,4 + ,2 + ,2 + ,2 + ,4 + ,2 + ,2 + ,4 + ,5 + ,4 + ,5 + ,5 + ,3 + ,4 + ,2 + ,1 + ,4 + ,1 + ,4 + ,3 + ,4 + ,3 + ,3 + ,2 + ,4 + ,2 + ,3 + ,2 + ,5 + ,4 + ,3 + ,2 + ,3 + ,2 + ,3 + ,1 + ,2 + ,1 + ,4 + ,4 + ,4 + ,2 + ,4 + ,2 + ,3 + ,2 + ,4 + ,2 + ,4 + ,3 + ,4 + ,3 + ,5 + ,5 + ,4 + ,1 + ,3 + ,2 + ,5 + ,4 + ,3 + ,4 + ,3 + ,2 + ,3 + ,2 + ,3 + ,2 + ,5 + ,2 + ,4 + ,4 + ,4 + ,3 + ,4 + ,4 + ,2 + ,4) + ,dim=c(4 + ,159) + ,dimnames=list(c('Q1' + ,'Q2' + ,'Q3' + ,'Q4') + ,1:159)) > y <- array(NA,dim=c(4,159),dimnames=list(c('Q1','Q2','Q3','Q4'),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 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.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 Q1 Q2 Q3 Q4 1 2 2 4 2 2 2 2 4 1 3 4 2 5 4 4 2 2 2 2 5 3 2 2 2 6 4 1 4 2 7 3 1 4 2 8 3 3 4 2 9 3 2 4 1 10 2 1 2 4 11 4 4 3 2 12 4 2 4 3 13 3 3 3 2 14 3 2 4 2 15 4 1 4 1 16 4 1 4 3 17 3 2 4 1 18 3 2 2 2 19 3 2 4 4 20 4 2 4 4 21 2 1 4 3 22 5 2 3 2 23 4 4 2 3 24 2 2 4 2 25 3 2 2 2 26 4 2 3 3 27 4 2 4 3 28 3 2 3 2 29 4 3 4 4 30 4 2 4 2 31 1 1 4 2 32 4 4 4 3 33 5 1 4 5 34 2 2 4 2 35 4 2 4 3 36 3 2 5 1 37 2 2 4 2 38 4 2 2 2 39 5 2 4 4 40 4 2 4 2 41 4 2 5 4 42 4 2 4 3 43 3 2 2 2 44 4 2 4 4 45 2 2 4 2 46 2 1 4 2 47 4 2 2 2 48 2 1 5 2 49 4 2 4 2 50 4 1 4 3 51 1 1 4 1 52 4 2 4 2 53 2 2 4 2 54 1 1 3 1 55 4 5 5 5 56 3 2 4 2 57 2 2 4 2 58 4 1 4 2 59 3 1 4 1 60 2 2 2 2 61 2 2 4 2 62 3 1 4 2 63 2 1 4 4 64 1 2 4 2 65 3 1 3 1 66 2 1 4 2 67 3 2 2 2 68 3 1 4 2 69 3 1 4 1 70 2 2 4 2 71 3 1 4 2 72 2 1 4 2 73 4 3 4 3 74 4 3 3 3 75 4 2 4 2 76 2 2 4 2 77 3 1 4 3 78 4 3 4 2 79 3 2 4 2 80 4 2 4 2 81 2 2 4 2 82 3 2 2 2 83 3 1 3 1 84 4 4 5 3 85 2 1 3 2 86 4 1 3 4 87 2 1 4 2 88 2 1 4 1 89 4 4 4 4 90 3 2 4 3 91 4 2 4 2 92 2 1 3 3 93 2 1 4 2 94 3 1 4 3 95 3 3 4 2 96 5 4 5 5 97 2 4 4 3 98 3 3 4 4 99 4 2 2 2 100 3 2 3 2 101 4 3 3 2 102 3 1 3 3 103 3 3 4 4 104 2 2 4 3 105 3 2 2 2 106 2 2 3 2 107 3 2 3 3 108 2 4 4 2 109 4 3 4 2 110 2 1 2 2 111 4 1 3 2 112 4 2 4 3 113 1 1 4 2 114 5 3 5 4 115 2 2 3 1 116 3 2 3 2 117 4 2 4 4 118 1 1 3 2 119 5 3 3 2 120 3 1 2 1 121 3 1 4 1 122 3 2 3 3 123 3 3 4 3 124 2 2 5 1 125 2 1 4 1 126 4 2 3 3 127 4 1 3 1 128 3 2 3 2 129 3 1 3 3 130 3 2 4 2 131 4 3 4 2 132 3 2 3 2 133 4 1 2 2 134 4 1 3 2 135 2 2 2 2 136 4 2 4 4 137 2 1 4 2 138 4 2 4 2 139 3 3 4 3 140 3 4 4 2 141 2 2 4 2 142 2 4 5 4 143 5 5 3 4 144 2 1 4 1 145 4 3 4 3 146 3 2 4 2 147 3 2 5 4 148 3 2 3 2 149 3 1 2 1 150 4 4 4 2 151 4 2 3 2 152 4 2 4 3 153 4 3 5 5 154 4 1 3 2 155 5 4 3 4 156 3 2 3 2 157 3 2 5 2 158 4 4 4 3 159 4 4 2 4 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Q2 Q3 Q4 2.2390 0.2438 -0.1224 0.3476 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.99233 -0.68821 -0.03581 0.65940 1.94557 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.23897 0.33598 6.664 4.40e-10 *** Q2 0.24379 0.07946 3.068 0.00254 ** Q3 -0.12244 0.08637 -1.418 0.15830 Q4 0.34760 0.07971 4.361 2.35e-05 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.8561 on 155 degrees of freedom Multiple R-squared: 0.2298, Adjusted R-squared: 0.2149 F-statistic: 15.41 on 3 and 155 DF, p-value: 7.984e-09 > 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.3747783 0.74955658 0.62522171 [2,] 0.4450239 0.89004774 0.55497613 [3,] 0.3826979 0.76539576 0.61730212 [4,] 0.4582372 0.91647450 0.54176275 [5,] 0.5293852 0.94122950 0.47061475 [6,] 0.4850342 0.97006831 0.51496585 [7,] 0.3825233 0.76504655 0.61747672 [8,] 0.2916757 0.58335135 0.70832433 [9,] 0.4173730 0.83474600 0.58262700 [10,] 0.3976490 0.79529807 0.60235096 [11,] 0.3192656 0.63853120 0.68073440 [12,] 0.2734157 0.54683139 0.72658430 [13,] 0.2369131 0.47382614 0.76308693 [14,] 0.1988802 0.39776041 0.80111980 [15,] 0.2794191 0.55883813 0.72058094 [16,] 0.6187714 0.76245728 0.38122864 [17,] 0.5824054 0.83518928 0.41759464 [18,] 0.6424898 0.71502040 0.35751020 [19,] 0.5801437 0.83971265 0.41985633 [20,] 0.5650864 0.86982721 0.43491360 [21,] 0.5333695 0.93326093 0.46663046 [22,] 0.4696970 0.93939409 0.53030296 [23,] 0.4083309 0.81666185 0.59166907 [24,] 0.4026976 0.80539527 0.59730236 [25,] 0.6300596 0.73988070 0.36994035 [26,] 0.5744861 0.85102790 0.42551395 [27,] 0.6462971 0.70740585 0.35370292 [28,] 0.6778923 0.64421534 0.32210767 [29,] 0.6484893 0.70302142 0.35151071 [30,] 0.6022700 0.79545992 0.39772996 [31,] 0.6305550 0.73888995 0.36944498 [32,] 0.6487312 0.70253762 0.35126881 [33,] 0.6948748 0.61025045 0.30512523 [34,] 0.7015795 0.59684093 0.29842046 [35,] 0.6617898 0.67642040 0.33821020 [36,] 0.6341963 0.73160741 0.36580370 [37,] 0.5848763 0.83024731 0.41512365 [38,] 0.5386197 0.92276053 0.46138027 [39,] 0.5683068 0.86338638 0.43169319 [40,] 0.5574854 0.88502922 0.44251461 [41,] 0.5658625 0.86827492 0.43413746 [42,] 0.5489434 0.90211318 0.45105659 [43,] 0.5639134 0.87217320 0.43608660 [44,] 0.5694688 0.86106244 0.43053122 [45,] 0.6335321 0.73293575 0.36646788 [46,] 0.6490468 0.70190631 0.35095316 [47,] 0.6656992 0.66860166 0.33430083 [48,] 0.7225322 0.55493559 0.27746779 [49,] 0.7478351 0.50432973 0.25216486 [50,] 0.7078626 0.58427484 0.29213742 [51,] 0.7167869 0.56642616 0.28321308 [52,] 0.7659550 0.46809004 0.23404502 [53,] 0.7505534 0.49889317 0.24944658 [54,] 0.7786330 0.44273400 0.22136700 [55,] 0.7862730 0.42745396 0.21372698 [56,] 0.7555743 0.48885147 0.24442573 [57,] 0.8140215 0.37195701 0.18597851 [58,] 0.9128312 0.17433756 0.08716878 [59,] 0.9020822 0.19583563 0.09791781 [60,] 0.8936619 0.21267625 0.10633813 [61,] 0.8723115 0.25537709 0.12768854 [62,] 0.8504500 0.29909994 0.14954997 [63,] 0.8397202 0.32055959 0.16027979 [64,] 0.8439415 0.31211696 0.15605848 [65,] 0.8192964 0.36140711 0.18070355 [66,] 0.8065161 0.38696787 0.19348393 [67,] 0.7830025 0.43399508 0.21699754 [68,] 0.7530311 0.49393786 0.24696893 [69,] 0.7721584 0.45568326 0.22784163 [70,] 0.7774638 0.44507243 0.22253622 [71,] 0.7420836 0.51583287 0.25791643 [72,] 0.7365939 0.52681213 0.26340607 [73,] 0.6979242 0.60415156 0.30207578 [74,] 0.7204548 0.55909036 0.27954518 [75,] 0.7259083 0.54818349 0.27409175 [76,] 0.6894231 0.62115381 0.31057690 [77,] 0.6659680 0.66806391 0.33403195 [78,] 0.6320162 0.73596770 0.36798385 [79,] 0.6248451 0.75030987 0.37515494 [80,] 0.5969606 0.80607888 0.40303944 [81,] 0.5768469 0.84630619 0.42315310 [82,] 0.5367113 0.92657735 0.46328868 [83,] 0.4931999 0.98639977 0.50680011 [84,] 0.4513617 0.90272342 0.54863829 [85,] 0.4783152 0.95663041 0.52168480 [86,] 0.5131741 0.97365177 0.48682588 [87,] 0.4933091 0.98661818 0.50669091 [88,] 0.4465349 0.89306988 0.55346506 [89,] 0.4026337 0.80526741 0.59736629 [90,] 0.3957380 0.79147607 0.60426196 [91,] 0.5439809 0.91203817 0.45601909 [92,] 0.5404712 0.91905762 0.45952881 [93,] 0.5311529 0.93769426 0.46884713 [94,] 0.4840742 0.96814843 0.51592578 [95,] 0.4642736 0.92854724 0.53572638 [96,] 0.4183853 0.83677068 0.58161466 [97,] 0.4159001 0.83180017 0.58409991 [98,] 0.4711933 0.94238658 0.52880671 [99,] 0.4285022 0.85700437 0.57149782 [100,] 0.4594193 0.91883866 0.54058067 [101,] 0.4262213 0.85244268 0.57377866 [102,] 0.5165473 0.96690533 0.48345266 [103,] 0.5069591 0.98608171 0.49304085 [104,] 0.5430074 0.91398525 0.45699262 [105,] 0.5742691 0.85146185 0.42573093 [106,] 0.5595755 0.88084898 0.44042449 [107,] 0.7026879 0.59462421 0.29731210 [108,] 0.7743129 0.45137421 0.22568710 [109,] 0.7841295 0.43174093 0.21587047 [110,] 0.7476282 0.50474353 0.25237177 [111,] 0.7198443 0.56031135 0.28015568 [112,] 0.8979609 0.20407819 0.10203909 [113,] 0.9482965 0.10340702 0.05170351 [114,] 0.9346760 0.13064800 0.06532400 [115,] 0.9235306 0.15293874 0.07646937 [116,] 0.9142200 0.17155997 0.08577999 [117,] 0.8986708 0.20265837 0.10132918 [118,] 0.8764688 0.24706244 0.12353122 [119,] 0.8590957 0.28180856 0.14090428 [120,] 0.8327575 0.33448494 0.16724247 [121,] 0.8757792 0.24844152 0.12422076 [122,] 0.8456269 0.30874617 0.15437308 [123,] 0.8168305 0.36633906 0.18316953 [124,] 0.7713211 0.45735781 0.22867891 [125,] 0.7753158 0.44936845 0.22468423 [126,] 0.7300550 0.53989008 0.26994504 [127,] 0.7050021 0.58999575 0.29499788 [128,] 0.7248966 0.55020684 0.27510342 [129,] 0.8691068 0.26178648 0.13089324 [130,] 0.8369142 0.32617160 0.16308580 [131,] 0.8368995 0.32620107 0.16310054 [132,] 0.8671816 0.26563672 0.13281836 [133,] 0.8371701 0.32565976 0.16282988 [134,] 0.7931317 0.41373664 0.20686832 [135,] 0.8310122 0.33797551 0.16898776 [136,] 0.9860358 0.02792838 0.01396419 [137,] 0.9757714 0.04845720 0.02422860 [138,] 0.9788930 0.04221395 0.02110698 [139,] 0.9640633 0.07187346 0.03593673 [140,] 0.9431597 0.11368069 0.05684035 [141,] 0.9414618 0.11707639 0.05853820 [142,] 0.9279425 0.14411502 0.07205751 [143,] 0.8929448 0.21411041 0.10705521 [144,] 0.8285398 0.34292042 0.17146021 [145,] 0.7424714 0.51505714 0.25752857 [146,] 0.6050762 0.78984752 0.39492376 > postscript(file="/var/www/html/freestat/rcomp/tmp/1ya1w1291225568.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/www/html/freestat/rcomp/tmp/2ya1w1291225568.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/www/html/freestat/rcomp/tmp/391ii1291225568.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/www/html/freestat/rcomp/tmp/491ii1291225568.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/www/html/freestat/rcomp/tmp/591ii1291225568.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 -0.93199385 -0.58439043 0.49523826 -1.17687179 -0.17687179 1.31179161 7 8 9 10 11 12 0.31179161 -0.17577932 0.41560957 -1.62829318 0.45799626 0.72040272 13 14 15 16 17 18 -0.29821828 0.06800615 1.65939503 0.96418818 0.41560957 -0.17687179 19 20 21 22 23 24 -0.62720071 0.37279929 -1.03581182 1.94556718 -0.01204614 -0.93199385 25 26 27 28 29 30 -0.17687179 0.59796375 0.72040272 -0.05443282 0.12901383 1.06800615 31 32 33 34 35 36 -1.68820839 0.23283180 1.26898133 -0.93199385 0.72040272 0.53804854 37 38 39 40 41 42 -0.93199385 0.82312821 1.37279929 1.06800615 0.49523826 0.72040272 43 44 45 46 47 48 -0.17687179 0.37279929 -0.93199385 -0.68820839 0.82312821 -0.56576943 49 50 51 52 53 54 1.06800615 0.96418818 -1.34060497 1.06800615 -0.93199385 -1.46304393 55 56 57 58 59 60 -0.58372155 0.06800615 -0.93199385 1.31179161 0.65939503 -1.17687179 61 62 63 64 65 66 -0.93199385 0.31179161 -1.38341525 -1.93199385 0.53695607 -0.68820839 67 68 69 70 71 72 -0.17687179 0.31179161 0.65939503 -0.93199385 0.31179161 -0.68820839 73 74 75 76 77 78 0.47661726 0.35417829 1.06800615 -0.93199385 -0.03581182 0.82422068 79 80 81 82 83 84 0.06800615 1.06800615 -0.93199385 -0.17687179 0.53695607 0.35527076 85 86 87 88 89 90 -0.81064736 0.49414579 -0.68820839 -0.34060497 -0.11477163 -0.27959728 91 92 93 94 95 96 1.06800615 -1.15825079 -0.68820839 -0.03581182 -0.17577932 0.66006391 97 98 99 100 101 102 -1.76716820 -0.87098617 0.82312821 -0.05443282 0.70178172 -0.15825079 103 104 105 106 107 108 -0.87098617 -1.27959728 -0.17687179 -1.05443282 -0.40203625 -1.41956478 109 110 111 112 113 114 0.82422068 -0.93308633 1.18935264 0.72040272 -1.68820839 1.25145280 115 116 117 118 119 120 -0.70682939 -0.05443282 0.37279929 -1.81064736 1.70178172 0.41451710 121 122 123 124 125 126 0.65939503 -0.40203625 -0.52338274 -0.46195146 -0.34060497 0.59796375 127 128 129 130 131 132 1.53695607 -0.05443282 -0.15825079 0.06800615 0.82422068 -0.05443282 133 134 135 136 137 138 1.06691367 1.18935264 -1.17687179 0.37279929 -0.68820839 1.06800615 139 140 141 142 143 144 -0.52338274 -0.41956478 -0.93199385 -1.99233266 0.51900394 -0.34060497 145 146 147 148 149 150 0.47661726 0.06800615 -0.50476174 -0.05443282 0.41451710 0.58043522 151 152 153 154 155 156 0.94556718 0.72040272 -0.09615063 1.18935264 0.76278940 -0.05443282 157 158 159 0.19044511 0.23283180 -0.35964956 > postscript(file="/var/www/html/freestat/rcomp/tmp/6ks031291225568.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 -0.93199385 NA 1 -0.58439043 -0.93199385 2 0.49523826 -0.58439043 3 -1.17687179 0.49523826 4 -0.17687179 -1.17687179 5 1.31179161 -0.17687179 6 0.31179161 1.31179161 7 -0.17577932 0.31179161 8 0.41560957 -0.17577932 9 -1.62829318 0.41560957 10 0.45799626 -1.62829318 11 0.72040272 0.45799626 12 -0.29821828 0.72040272 13 0.06800615 -0.29821828 14 1.65939503 0.06800615 15 0.96418818 1.65939503 16 0.41560957 0.96418818 17 -0.17687179 0.41560957 18 -0.62720071 -0.17687179 19 0.37279929 -0.62720071 20 -1.03581182 0.37279929 21 1.94556718 -1.03581182 22 -0.01204614 1.94556718 23 -0.93199385 -0.01204614 24 -0.17687179 -0.93199385 25 0.59796375 -0.17687179 26 0.72040272 0.59796375 27 -0.05443282 0.72040272 28 0.12901383 -0.05443282 29 1.06800615 0.12901383 30 -1.68820839 1.06800615 31 0.23283180 -1.68820839 32 1.26898133 0.23283180 33 -0.93199385 1.26898133 34 0.72040272 -0.93199385 35 0.53804854 0.72040272 36 -0.93199385 0.53804854 37 0.82312821 -0.93199385 38 1.37279929 0.82312821 39 1.06800615 1.37279929 40 0.49523826 1.06800615 41 0.72040272 0.49523826 42 -0.17687179 0.72040272 43 0.37279929 -0.17687179 44 -0.93199385 0.37279929 45 -0.68820839 -0.93199385 46 0.82312821 -0.68820839 47 -0.56576943 0.82312821 48 1.06800615 -0.56576943 49 0.96418818 1.06800615 50 -1.34060497 0.96418818 51 1.06800615 -1.34060497 52 -0.93199385 1.06800615 53 -1.46304393 -0.93199385 54 -0.58372155 -1.46304393 55 0.06800615 -0.58372155 56 -0.93199385 0.06800615 57 1.31179161 -0.93199385 58 0.65939503 1.31179161 59 -1.17687179 0.65939503 60 -0.93199385 -1.17687179 61 0.31179161 -0.93199385 62 -1.38341525 0.31179161 63 -1.93199385 -1.38341525 64 0.53695607 -1.93199385 65 -0.68820839 0.53695607 66 -0.17687179 -0.68820839 67 0.31179161 -0.17687179 68 0.65939503 0.31179161 69 -0.93199385 0.65939503 70 0.31179161 -0.93199385 71 -0.68820839 0.31179161 72 0.47661726 -0.68820839 73 0.35417829 0.47661726 74 1.06800615 0.35417829 75 -0.93199385 1.06800615 76 -0.03581182 -0.93199385 77 0.82422068 -0.03581182 78 0.06800615 0.82422068 79 1.06800615 0.06800615 80 -0.93199385 1.06800615 81 -0.17687179 -0.93199385 82 0.53695607 -0.17687179 83 0.35527076 0.53695607 84 -0.81064736 0.35527076 85 0.49414579 -0.81064736 86 -0.68820839 0.49414579 87 -0.34060497 -0.68820839 88 -0.11477163 -0.34060497 89 -0.27959728 -0.11477163 90 1.06800615 -0.27959728 91 -1.15825079 1.06800615 92 -0.68820839 -1.15825079 93 -0.03581182 -0.68820839 94 -0.17577932 -0.03581182 95 0.66006391 -0.17577932 96 -1.76716820 0.66006391 97 -0.87098617 -1.76716820 98 0.82312821 -0.87098617 99 -0.05443282 0.82312821 100 0.70178172 -0.05443282 101 -0.15825079 0.70178172 102 -0.87098617 -0.15825079 103 -1.27959728 -0.87098617 104 -0.17687179 -1.27959728 105 -1.05443282 -0.17687179 106 -0.40203625 -1.05443282 107 -1.41956478 -0.40203625 108 0.82422068 -1.41956478 109 -0.93308633 0.82422068 110 1.18935264 -0.93308633 111 0.72040272 1.18935264 112 -1.68820839 0.72040272 113 1.25145280 -1.68820839 114 -0.70682939 1.25145280 115 -0.05443282 -0.70682939 116 0.37279929 -0.05443282 117 -1.81064736 0.37279929 118 1.70178172 -1.81064736 119 0.41451710 1.70178172 120 0.65939503 0.41451710 121 -0.40203625 0.65939503 122 -0.52338274 -0.40203625 123 -0.46195146 -0.52338274 124 -0.34060497 -0.46195146 125 0.59796375 -0.34060497 126 1.53695607 0.59796375 127 -0.05443282 1.53695607 128 -0.15825079 -0.05443282 129 0.06800615 -0.15825079 130 0.82422068 0.06800615 131 -0.05443282 0.82422068 132 1.06691367 -0.05443282 133 1.18935264 1.06691367 134 -1.17687179 1.18935264 135 0.37279929 -1.17687179 136 -0.68820839 0.37279929 137 1.06800615 -0.68820839 138 -0.52338274 1.06800615 139 -0.41956478 -0.52338274 140 -0.93199385 -0.41956478 141 -1.99233266 -0.93199385 142 0.51900394 -1.99233266 143 -0.34060497 0.51900394 144 0.47661726 -0.34060497 145 0.06800615 0.47661726 146 -0.50476174 0.06800615 147 -0.05443282 -0.50476174 148 0.41451710 -0.05443282 149 0.58043522 0.41451710 150 0.94556718 0.58043522 151 0.72040272 0.94556718 152 -0.09615063 0.72040272 153 1.18935264 -0.09615063 154 0.76278940 1.18935264 155 -0.05443282 0.76278940 156 0.19044511 -0.05443282 157 0.23283180 0.19044511 158 -0.35964956 0.23283180 159 NA -0.35964956 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.58439043 -0.93199385 [2,] 0.49523826 -0.58439043 [3,] -1.17687179 0.49523826 [4,] -0.17687179 -1.17687179 [5,] 1.31179161 -0.17687179 [6,] 0.31179161 1.31179161 [7,] -0.17577932 0.31179161 [8,] 0.41560957 -0.17577932 [9,] -1.62829318 0.41560957 [10,] 0.45799626 -1.62829318 [11,] 0.72040272 0.45799626 [12,] -0.29821828 0.72040272 [13,] 0.06800615 -0.29821828 [14,] 1.65939503 0.06800615 [15,] 0.96418818 1.65939503 [16,] 0.41560957 0.96418818 [17,] -0.17687179 0.41560957 [18,] -0.62720071 -0.17687179 [19,] 0.37279929 -0.62720071 [20,] -1.03581182 0.37279929 [21,] 1.94556718 -1.03581182 [22,] -0.01204614 1.94556718 [23,] -0.93199385 -0.01204614 [24,] -0.17687179 -0.93199385 [25,] 0.59796375 -0.17687179 [26,] 0.72040272 0.59796375 [27,] -0.05443282 0.72040272 [28,] 0.12901383 -0.05443282 [29,] 1.06800615 0.12901383 [30,] -1.68820839 1.06800615 [31,] 0.23283180 -1.68820839 [32,] 1.26898133 0.23283180 [33,] -0.93199385 1.26898133 [34,] 0.72040272 -0.93199385 [35,] 0.53804854 0.72040272 [36,] -0.93199385 0.53804854 [37,] 0.82312821 -0.93199385 [38,] 1.37279929 0.82312821 [39,] 1.06800615 1.37279929 [40,] 0.49523826 1.06800615 [41,] 0.72040272 0.49523826 [42,] -0.17687179 0.72040272 [43,] 0.37279929 -0.17687179 [44,] -0.93199385 0.37279929 [45,] -0.68820839 -0.93199385 [46,] 0.82312821 -0.68820839 [47,] -0.56576943 0.82312821 [48,] 1.06800615 -0.56576943 [49,] 0.96418818 1.06800615 [50,] -1.34060497 0.96418818 [51,] 1.06800615 -1.34060497 [52,] -0.93199385 1.06800615 [53,] -1.46304393 -0.93199385 [54,] -0.58372155 -1.46304393 [55,] 0.06800615 -0.58372155 [56,] -0.93199385 0.06800615 [57,] 1.31179161 -0.93199385 [58,] 0.65939503 1.31179161 [59,] -1.17687179 0.65939503 [60,] -0.93199385 -1.17687179 [61,] 0.31179161 -0.93199385 [62,] -1.38341525 0.31179161 [63,] -1.93199385 -1.38341525 [64,] 0.53695607 -1.93199385 [65,] -0.68820839 0.53695607 [66,] -0.17687179 -0.68820839 [67,] 0.31179161 -0.17687179 [68,] 0.65939503 0.31179161 [69,] -0.93199385 0.65939503 [70,] 0.31179161 -0.93199385 [71,] -0.68820839 0.31179161 [72,] 0.47661726 -0.68820839 [73,] 0.35417829 0.47661726 [74,] 1.06800615 0.35417829 [75,] -0.93199385 1.06800615 [76,] -0.03581182 -0.93199385 [77,] 0.82422068 -0.03581182 [78,] 0.06800615 0.82422068 [79,] 1.06800615 0.06800615 [80,] -0.93199385 1.06800615 [81,] -0.17687179 -0.93199385 [82,] 0.53695607 -0.17687179 [83,] 0.35527076 0.53695607 [84,] -0.81064736 0.35527076 [85,] 0.49414579 -0.81064736 [86,] -0.68820839 0.49414579 [87,] -0.34060497 -0.68820839 [88,] -0.11477163 -0.34060497 [89,] -0.27959728 -0.11477163 [90,] 1.06800615 -0.27959728 [91,] -1.15825079 1.06800615 [92,] -0.68820839 -1.15825079 [93,] -0.03581182 -0.68820839 [94,] -0.17577932 -0.03581182 [95,] 0.66006391 -0.17577932 [96,] -1.76716820 0.66006391 [97,] -0.87098617 -1.76716820 [98,] 0.82312821 -0.87098617 [99,] -0.05443282 0.82312821 [100,] 0.70178172 -0.05443282 [101,] -0.15825079 0.70178172 [102,] -0.87098617 -0.15825079 [103,] -1.27959728 -0.87098617 [104,] -0.17687179 -1.27959728 [105,] -1.05443282 -0.17687179 [106,] -0.40203625 -1.05443282 [107,] -1.41956478 -0.40203625 [108,] 0.82422068 -1.41956478 [109,] -0.93308633 0.82422068 [110,] 1.18935264 -0.93308633 [111,] 0.72040272 1.18935264 [112,] -1.68820839 0.72040272 [113,] 1.25145280 -1.68820839 [114,] -0.70682939 1.25145280 [115,] -0.05443282 -0.70682939 [116,] 0.37279929 -0.05443282 [117,] -1.81064736 0.37279929 [118,] 1.70178172 -1.81064736 [119,] 0.41451710 1.70178172 [120,] 0.65939503 0.41451710 [121,] -0.40203625 0.65939503 [122,] -0.52338274 -0.40203625 [123,] -0.46195146 -0.52338274 [124,] -0.34060497 -0.46195146 [125,] 0.59796375 -0.34060497 [126,] 1.53695607 0.59796375 [127,] -0.05443282 1.53695607 [128,] -0.15825079 -0.05443282 [129,] 0.06800615 -0.15825079 [130,] 0.82422068 0.06800615 [131,] -0.05443282 0.82422068 [132,] 1.06691367 -0.05443282 [133,] 1.18935264 1.06691367 [134,] -1.17687179 1.18935264 [135,] 0.37279929 -1.17687179 [136,] -0.68820839 0.37279929 [137,] 1.06800615 -0.68820839 [138,] -0.52338274 1.06800615 [139,] -0.41956478 -0.52338274 [140,] -0.93199385 -0.41956478 [141,] -1.99233266 -0.93199385 [142,] 0.51900394 -1.99233266 [143,] -0.34060497 0.51900394 [144,] 0.47661726 -0.34060497 [145,] 0.06800615 0.47661726 [146,] -0.50476174 0.06800615 [147,] -0.05443282 -0.50476174 [148,] 0.41451710 -0.05443282 [149,] 0.58043522 0.41451710 [150,] 0.94556718 0.58043522 [151,] 0.72040272 0.94556718 [152,] -0.09615063 0.72040272 [153,] 1.18935264 -0.09615063 [154,] 0.76278940 1.18935264 [155,] -0.05443282 0.76278940 [156,] 0.19044511 -0.05443282 [157,] 0.23283180 0.19044511 [158,] -0.35964956 0.23283180 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.58439043 -0.93199385 2 0.49523826 -0.58439043 3 -1.17687179 0.49523826 4 -0.17687179 -1.17687179 5 1.31179161 -0.17687179 6 0.31179161 1.31179161 7 -0.17577932 0.31179161 8 0.41560957 -0.17577932 9 -1.62829318 0.41560957 10 0.45799626 -1.62829318 11 0.72040272 0.45799626 12 -0.29821828 0.72040272 13 0.06800615 -0.29821828 14 1.65939503 0.06800615 15 0.96418818 1.65939503 16 0.41560957 0.96418818 17 -0.17687179 0.41560957 18 -0.62720071 -0.17687179 19 0.37279929 -0.62720071 20 -1.03581182 0.37279929 21 1.94556718 -1.03581182 22 -0.01204614 1.94556718 23 -0.93199385 -0.01204614 24 -0.17687179 -0.93199385 25 0.59796375 -0.17687179 26 0.72040272 0.59796375 27 -0.05443282 0.72040272 28 0.12901383 -0.05443282 29 1.06800615 0.12901383 30 -1.68820839 1.06800615 31 0.23283180 -1.68820839 32 1.26898133 0.23283180 33 -0.93199385 1.26898133 34 0.72040272 -0.93199385 35 0.53804854 0.72040272 36 -0.93199385 0.53804854 37 0.82312821 -0.93199385 38 1.37279929 0.82312821 39 1.06800615 1.37279929 40 0.49523826 1.06800615 41 0.72040272 0.49523826 42 -0.17687179 0.72040272 43 0.37279929 -0.17687179 44 -0.93199385 0.37279929 45 -0.68820839 -0.93199385 46 0.82312821 -0.68820839 47 -0.56576943 0.82312821 48 1.06800615 -0.56576943 49 0.96418818 1.06800615 50 -1.34060497 0.96418818 51 1.06800615 -1.34060497 52 -0.93199385 1.06800615 53 -1.46304393 -0.93199385 54 -0.58372155 -1.46304393 55 0.06800615 -0.58372155 56 -0.93199385 0.06800615 57 1.31179161 -0.93199385 58 0.65939503 1.31179161 59 -1.17687179 0.65939503 60 -0.93199385 -1.17687179 61 0.31179161 -0.93199385 62 -1.38341525 0.31179161 63 -1.93199385 -1.38341525 64 0.53695607 -1.93199385 65 -0.68820839 0.53695607 66 -0.17687179 -0.68820839 67 0.31179161 -0.17687179 68 0.65939503 0.31179161 69 -0.93199385 0.65939503 70 0.31179161 -0.93199385 71 -0.68820839 0.31179161 72 0.47661726 -0.68820839 73 0.35417829 0.47661726 74 1.06800615 0.35417829 75 -0.93199385 1.06800615 76 -0.03581182 -0.93199385 77 0.82422068 -0.03581182 78 0.06800615 0.82422068 79 1.06800615 0.06800615 80 -0.93199385 1.06800615 81 -0.17687179 -0.93199385 82 0.53695607 -0.17687179 83 0.35527076 0.53695607 84 -0.81064736 0.35527076 85 0.49414579 -0.81064736 86 -0.68820839 0.49414579 87 -0.34060497 -0.68820839 88 -0.11477163 -0.34060497 89 -0.27959728 -0.11477163 90 1.06800615 -0.27959728 91 -1.15825079 1.06800615 92 -0.68820839 -1.15825079 93 -0.03581182 -0.68820839 94 -0.17577932 -0.03581182 95 0.66006391 -0.17577932 96 -1.76716820 0.66006391 97 -0.87098617 -1.76716820 98 0.82312821 -0.87098617 99 -0.05443282 0.82312821 100 0.70178172 -0.05443282 101 -0.15825079 0.70178172 102 -0.87098617 -0.15825079 103 -1.27959728 -0.87098617 104 -0.17687179 -1.27959728 105 -1.05443282 -0.17687179 106 -0.40203625 -1.05443282 107 -1.41956478 -0.40203625 108 0.82422068 -1.41956478 109 -0.93308633 0.82422068 110 1.18935264 -0.93308633 111 0.72040272 1.18935264 112 -1.68820839 0.72040272 113 1.25145280 -1.68820839 114 -0.70682939 1.25145280 115 -0.05443282 -0.70682939 116 0.37279929 -0.05443282 117 -1.81064736 0.37279929 118 1.70178172 -1.81064736 119 0.41451710 1.70178172 120 0.65939503 0.41451710 121 -0.40203625 0.65939503 122 -0.52338274 -0.40203625 123 -0.46195146 -0.52338274 124 -0.34060497 -0.46195146 125 0.59796375 -0.34060497 126 1.53695607 0.59796375 127 -0.05443282 1.53695607 128 -0.15825079 -0.05443282 129 0.06800615 -0.15825079 130 0.82422068 0.06800615 131 -0.05443282 0.82422068 132 1.06691367 -0.05443282 133 1.18935264 1.06691367 134 -1.17687179 1.18935264 135 0.37279929 -1.17687179 136 -0.68820839 0.37279929 137 1.06800615 -0.68820839 138 -0.52338274 1.06800615 139 -0.41956478 -0.52338274 140 -0.93199385 -0.41956478 141 -1.99233266 -0.93199385 142 0.51900394 -1.99233266 143 -0.34060497 0.51900394 144 0.47661726 -0.34060497 145 0.06800615 0.47661726 146 -0.50476174 0.06800615 147 -0.05443282 -0.50476174 148 0.41451710 -0.05443282 149 0.58043522 0.41451710 150 0.94556718 0.58043522 151 0.72040272 0.94556718 152 -0.09615063 0.72040272 153 1.18935264 -0.09615063 154 0.76278940 1.18935264 155 -0.05443282 0.76278940 156 0.19044511 -0.05443282 157 0.23283180 0.19044511 158 -0.35964956 0.23283180 > 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/7d1z51291225568.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/www/html/freestat/rcomp/tmp/8d1z51291225568.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/www/html/freestat/rcomp/tmp/9d1z51291225568.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/www/html/freestat/rcomp/tmp/105ty81291225568.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/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/11rtfw1291225568.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/12cuvk1291225568.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/1384bb1291225568.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/14um9z1291225568.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/15xn841291225568.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/16in6a1291225568.tab") + } > > try(system("convert tmp/1ya1w1291225568.ps tmp/1ya1w1291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/2ya1w1291225568.ps tmp/2ya1w1291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/391ii1291225568.ps tmp/391ii1291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/491ii1291225568.ps tmp/491ii1291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/591ii1291225568.ps tmp/591ii1291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/6ks031291225568.ps tmp/6ks031291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/7d1z51291225568.ps tmp/7d1z51291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/8d1z51291225568.ps tmp/8d1z51291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/9d1z51291225568.ps tmp/9d1z51291225568.png",intern=TRUE)) character(0) > try(system("convert tmp/105ty81291225568.ps tmp/105ty81291225568.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.439 2.645 5.859