R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(13 + ,13 + ,14 + ,13 + ,3 + ,12 + ,12 + ,8 + ,13 + ,5 + ,15 + ,10 + ,12 + ,16 + ,6 + ,12 + ,9 + ,7 + ,12 + ,6 + ,10 + ,10 + ,10 + ,11 + ,5 + ,12 + ,12 + ,7 + ,12 + ,3 + ,15 + ,13 + ,16 + ,18 + ,8 + ,9 + ,12 + ,11 + ,11 + ,4 + ,12 + ,12 + ,14 + ,14 + ,4 + ,11 + ,6 + ,6 + ,9 + ,4 + ,11 + ,5 + ,16 + ,14 + ,6 + ,11 + ,12 + ,11 + ,12 + ,6 + ,15 + ,11 + ,16 + ,11 + ,5 + ,7 + ,14 + ,12 + ,12 + ,4 + ,11 + ,14 + ,7 + ,13 + ,6 + ,11 + ,12 + ,13 + ,11 + ,4 + ,10 + ,12 + ,11 + ,12 + ,6 + ,14 + ,11 + ,15 + ,16 + ,6 + ,10 + ,11 + ,7 + ,9 + ,4 + ,6 + ,7 + ,9 + ,11 + ,4 + ,11 + ,9 + ,7 + ,13 + ,2 + ,15 + ,11 + ,14 + ,15 + ,7 + ,11 + ,11 + ,15 + ,10 + ,5 + ,12 + ,12 + ,7 + ,11 + ,4 + ,14 + ,12 + ,15 + ,13 + ,6 + ,15 + ,11 + ,17 + ,16 + ,6 + ,9 + ,11 + ,15 + ,15 + ,7 + ,13 + ,8 + ,14 + ,14 + ,5 + ,13 + ,9 + ,14 + ,14 + ,6 + ,16 + ,12 + ,8 + ,14 + ,4 + ,13 + ,10 + ,8 + ,8 + ,4 + ,12 + ,10 + ,14 + ,13 + ,7 + ,14 + ,12 + ,14 + ,15 + ,7 + ,11 + ,8 + ,8 + ,13 + ,4 + ,9 + ,12 + ,11 + ,11 + ,4 + ,16 + ,11 + ,16 + ,15 + ,6 + ,12 + ,12 + ,10 + ,15 + ,6 + ,10 + ,7 + ,8 + ,9 + ,5 + ,13 + ,11 + ,14 + ,13 + ,6 + ,16 + ,11 + ,16 + ,16 + ,7 + ,14 + ,12 + ,13 + ,13 + ,6 + ,15 + ,9 + ,5 + ,11 + ,3 + ,5 + ,15 + ,8 + ,12 + ,3 + ,8 + ,11 + ,10 + ,12 + ,4 + ,11 + ,11 + ,8 + ,12 + ,6 + ,16 + ,11 + ,13 + ,14 + ,7 + ,17 + ,11 + ,15 + ,14 + ,5 + ,9 + ,15 + ,6 + ,8 + ,4 + ,9 + ,11 + ,12 + ,13 + ,5 + ,13 + ,12 + ,16 + ,16 + ,6 + ,10 + ,12 + ,5 + ,13 + ,6 + ,6 + ,9 + ,15 + ,11 + ,6 + ,12 + ,12 + ,12 + ,14 + ,5 + ,8 + ,12 + ,8 + ,13 + ,4 + ,14 + ,13 + ,13 + ,13 + ,5 + ,12 + ,11 + ,14 + ,13 + ,5 + ,11 + ,9 + ,12 + ,12 + ,4 + ,16 + ,9 + ,16 + ,16 + ,6 + ,8 + ,11 + ,10 + ,15 + ,2 + ,15 + ,11 + ,15 + ,15 + ,8 + ,7 + ,12 + ,8 + ,12 + ,3 + ,16 + ,12 + ,16 + ,14 + ,6 + ,14 + ,9 + ,19 + ,12 + ,6 + ,16 + ,11 + ,14 + ,15 + ,6 + ,9 + ,9 + ,6 + ,12 + ,5 + ,14 + ,12 + ,13 + ,13 + ,5 + ,11 + ,12 + ,15 + ,12 + ,6 + ,13 + ,12 + ,7 + ,12 + ,5 + ,15 + ,12 + ,13 + ,13 + ,6 + ,5 + ,14 + ,4 + ,5 + ,2 + ,15 + ,11 + ,14 + ,13 + ,5 + ,13 + ,12 + ,13 + ,13 + ,5 + ,11 + ,11 + ,11 + ,14 + ,5 + ,11 + ,6 + ,14 + ,17 + ,6 + ,12 + ,10 + ,12 + ,13 + ,6 + ,12 + ,12 + ,15 + ,13 + ,6 + ,12 + ,13 + ,14 + ,12 + ,5 + ,12 + ,8 + ,13 + ,13 + ,5 + ,14 + ,12 + ,8 + ,14 + ,4 + ,6 + ,12 + ,6 + ,11 + ,2 + ,7 + ,12 + ,7 + ,12 + ,4 + ,14 + ,6 + ,13 + ,12 + ,6 + ,14 + ,11 + ,13 + ,16 + ,6 + ,10 + ,10 + ,11 + ,12 + ,5 + ,13 + ,12 + ,5 + ,12 + ,3 + ,12 + ,13 + ,12 + ,12 + ,6 + ,9 + ,11 + ,8 + ,10 + ,4 + ,12 + ,7 + ,11 + ,15 + ,5 + ,16 + ,11 + ,14 + ,15 + ,8 + ,10 + ,11 + ,9 + ,12 + ,4 + ,14 + ,11 + ,10 + ,16 + ,6 + ,10 + ,11 + ,13 + ,15 + ,6 + ,16 + ,12 + ,16 + ,16 + ,7 + ,15 + ,10 + ,16 + ,13 + ,6 + ,12 + ,11 + ,11 + ,12 + ,5 + ,10 + ,12 + ,8 + ,11 + ,4 + ,8 + ,7 + ,4 + ,13 + ,6 + ,8 + ,13 + ,7 + ,10 + ,3 + ,11 + ,8 + ,14 + ,15 + ,5 + ,13 + ,12 + ,11 + ,13 + ,6 + ,16 + ,11 + ,17 + ,16 + ,7 + ,16 + ,12 + ,15 + ,15 + ,7 + ,14 + ,14 + ,17 + ,18 + ,6 + ,11 + ,10 + ,5 + ,13 + ,3 + ,4 + ,10 + ,4 + ,10 + ,2 + ,14 + ,13 + ,10 + ,16 + ,8 + ,9 + ,10 + ,11 + ,13 + ,3 + ,14 + ,11 + ,15 + ,15 + ,8 + ,8 + ,10 + ,10 + ,14 + ,3 + ,8 + ,7 + ,9 + ,15 + ,4 + ,11 + ,10 + ,12 + ,14 + ,5 + ,12 + ,8 + ,15 + ,13 + ,7 + ,11 + ,12 + ,7 + ,13 + ,6 + ,14 + ,12 + ,13 + ,15 + ,6 + ,15 + ,12 + ,12 + ,16 + ,7 + ,16 + ,11 + ,14 + ,14 + ,6 + ,16 + ,12 + ,14 + ,14 + ,6 + ,11 + ,12 + ,8 + ,16 + ,6 + ,14 + ,12 + ,15 + ,14 + ,6 + ,14 + ,11 + ,12 + ,12 + ,4 + ,12 + ,12 + ,12 + ,13 + ,4 + ,14 + ,11 + ,16 + ,12 + ,5 + ,8 + ,11 + ,9 + ,12 + ,4 + ,13 + ,13 + ,15 + ,14 + ,6 + ,16 + ,12 + ,15 + ,14 + ,6 + ,12 + ,12 + ,6 + ,14 + ,5 + ,16 + ,12 + ,14 + ,16 + ,8 + ,12 + ,12 + ,15 + ,13 + ,6 + ,11 + ,8 + ,10 + ,14 + ,5 + ,4 + ,8 + ,6 + ,4 + ,4 + ,16 + ,12 + ,14 + ,16 + ,8 + ,15 + ,11 + ,12 + ,13 + ,6 + ,10 + ,12 + ,8 + ,16 + ,4 + ,13 + ,13 + ,11 + ,15 + ,6 + ,15 + ,12 + ,13 + ,14 + ,6 + ,12 + ,12 + ,9 + ,13 + ,4 + ,14 + ,11 + ,15 + ,14 + ,6 + ,7 + ,12 + ,13 + ,12 + ,3 + ,19 + ,12 + ,15 + ,15 + ,6 + ,12 + ,10 + ,14 + ,14 + ,5 + ,12 + ,11 + ,16 + ,13 + ,4 + ,13 + ,12 + ,14 + ,14 + ,6 + ,15 + ,12 + ,14 + ,16 + ,4 + ,8 + ,10 + ,10 + ,6 + ,4 + ,12 + ,12 + ,10 + ,13 + ,4 + ,10 + ,13 + ,4 + ,13 + ,6 + ,8 + ,12 + ,8 + ,14 + ,5 + ,10 + ,15 + ,15 + ,15 + ,6 + ,15 + ,11 + ,16 + ,14 + ,6 + ,16 + ,12 + ,12 + ,15 + ,8 + ,13 + ,11 + ,12 + ,13 + ,7 + ,16 + ,12 + ,15 + ,16 + ,7 + ,9 + ,11 + ,9 + ,12 + ,4 + ,14 + ,10 + ,12 + ,15 + ,6 + ,14 + ,11 + ,14 + ,12 + ,6 + ,12 + ,11 + ,11 + ,14 + ,2) + ,dim=c(5 + ,156) + ,dimnames=list(c('Popularity' + ,'FindingFriends' + ,'KnowingPeople' + ,'Liked' + ,'Celebrity') + ,1:156)) > y <- array(NA,dim=c(5,156),dimnames=list(c('Popularity','FindingFriends','KnowingPeople','Liked','Celebrity'),1:156)) > 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 = 'Do not include Seasonal Dummies' > par1 = '3' > #'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 KnowingPeople Popularity FindingFriends Liked Celebrity t 1 14 13 13 13 3 1 2 8 12 12 13 5 2 3 12 15 10 16 6 3 4 7 12 9 12 6 4 5 10 10 10 11 5 5 6 7 12 12 12 3 6 7 16 15 13 18 8 7 8 11 9 12 11 4 8 9 14 12 12 14 4 9 10 6 11 6 9 4 10 11 16 11 5 14 6 11 12 11 11 12 12 6 12 13 16 15 11 11 5 13 14 12 7 14 12 4 14 15 7 11 14 13 6 15 16 13 11 12 11 4 16 17 11 10 12 12 6 17 18 15 14 11 16 6 18 19 7 10 11 9 4 19 20 9 6 7 11 4 20 21 7 11 9 13 2 21 22 14 15 11 15 7 22 23 15 11 11 10 5 23 24 7 12 12 11 4 24 25 15 14 12 13 6 25 26 17 15 11 16 6 26 27 15 9 11 15 7 27 28 14 13 8 14 5 28 29 14 13 9 14 6 29 30 8 16 12 14 4 30 31 8 13 10 8 4 31 32 14 12 10 13 7 32 33 14 14 12 15 7 33 34 8 11 8 13 4 34 35 11 9 12 11 4 35 36 16 16 11 15 6 36 37 10 12 12 15 6 37 38 8 10 7 9 5 38 39 14 13 11 13 6 39 40 16 16 11 16 7 40 41 13 14 12 13 6 41 42 5 15 9 11 3 42 43 8 5 15 12 3 43 44 10 8 11 12 4 44 45 8 11 11 12 6 45 46 13 16 11 14 7 46 47 15 17 11 14 5 47 48 6 9 15 8 4 48 49 12 9 11 13 5 49 50 16 13 12 16 6 50 51 5 10 12 13 6 51 52 15 6 9 11 6 52 53 12 12 12 14 5 53 54 8 8 12 13 4 54 55 13 14 13 13 5 55 56 14 12 11 13 5 56 57 12 11 9 12 4 57 58 16 16 9 16 6 58 59 10 8 11 15 2 59 60 15 15 11 15 8 60 61 8 7 12 12 3 61 62 16 16 12 14 6 62 63 19 14 9 12 6 63 64 14 16 11 15 6 64 65 6 9 9 12 5 65 66 13 14 12 13 5 66 67 15 11 12 12 6 67 68 7 13 12 12 5 68 69 13 15 12 13 6 69 70 4 5 14 5 2 70 71 14 15 11 13 5 71 72 13 13 12 13 5 72 73 11 11 11 14 5 73 74 14 11 6 17 6 74 75 12 12 10 13 6 75 76 15 12 12 13 6 76 77 14 12 13 12 5 77 78 13 12 8 13 5 78 79 8 14 12 14 4 79 80 6 6 12 11 2 80 81 7 7 12 12 4 81 82 13 14 6 12 6 82 83 13 14 11 16 6 83 84 11 10 10 12 5 84 85 5 13 12 12 3 85 86 12 12 13 12 6 86 87 8 9 11 10 4 87 88 11 12 7 15 5 88 89 14 16 11 15 8 89 90 9 10 11 12 4 90 91 10 14 11 16 6 91 92 13 10 11 15 6 92 93 16 16 12 16 7 93 94 16 15 10 13 6 94 95 11 12 11 12 5 95 96 8 10 12 11 4 96 97 4 8 7 13 6 97 98 7 8 13 10 3 98 99 14 11 8 15 5 99 100 11 13 12 13 6 100 101 17 16 11 16 7 101 102 15 16 12 15 7 102 103 17 14 14 18 6 103 104 5 11 10 13 3 104 105 4 4 10 10 2 105 106 10 14 13 16 8 106 107 11 9 10 13 3 107 108 15 14 11 15 8 108 109 10 8 10 14 3 109 110 9 8 7 15 4 110 111 12 11 10 14 5 111 112 15 12 8 13 7 112 113 7 11 12 13 6 113 114 13 14 12 15 6 114 115 12 15 12 16 7 115 116 14 16 11 14 6 116 117 14 16 12 14 6 117 118 8 11 12 16 6 118 119 15 14 12 14 6 119 120 12 14 11 12 4 120 121 12 12 12 13 4 121 122 16 14 11 12 5 122 123 9 8 11 12 4 123 124 15 13 13 14 6 124 125 15 16 12 14 6 125 126 6 12 12 14 5 126 127 14 16 12 16 8 127 128 15 12 12 13 6 128 129 10 11 8 14 5 129 130 6 4 8 4 4 130 131 14 16 12 16 8 131 132 12 15 11 13 6 132 133 8 10 12 16 4 133 134 11 13 13 15 6 134 135 13 15 12 14 6 135 136 9 12 12 13 4 136 137 15 14 11 14 6 137 138 13 7 12 12 3 138 139 15 19 12 15 6 139 140 14 12 10 14 5 140 141 16 12 11 13 4 141 142 14 13 12 14 6 142 143 14 15 12 16 4 143 144 10 8 10 6 4 144 145 10 12 12 13 4 145 146 4 10 13 13 6 146 147 8 8 12 14 5 147 148 15 10 15 15 6 148 149 16 15 11 14 6 149 150 12 16 12 15 8 150 151 12 13 11 13 7 151 152 15 16 12 16 7 152 153 9 9 11 12 4 153 154 12 14 10 15 6 154 155 14 14 11 12 6 155 156 11 12 11 14 2 156 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Popularity FindingFriends Liked Celebrity 0.725681 0.387097 -0.067559 0.273999 0.670539 t -0.001877 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.0295 -1.4997 0.1820 1.7227 6.2700 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.725681 1.803242 0.402 0.68794 Popularity 0.387097 0.098004 3.950 0.00012 *** FindingFriends -0.067559 0.122209 -0.553 0.58121 Liked 0.273999 0.126403 2.168 0.03176 * Celebrity 0.670539 0.200407 3.346 0.00104 ** t -0.001877 0.004821 -0.389 0.69752 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.664 on 150 degrees of freedom Multiple R-squared: 0.4269, Adjusted R-squared: 0.4078 F-statistic: 22.35 on 5 and 150 DF, p-value: < 2.2e-16 > 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.6729937 0.6540125 0.32700625 [2,] 0.6424957 0.7150087 0.35750434 [3,] 0.5084961 0.9830078 0.49150392 [4,] 0.4289003 0.8578006 0.57109972 [5,] 0.7753983 0.4492034 0.22460168 [6,] 0.7115979 0.5768041 0.28840206 [7,] 0.9090632 0.1818735 0.09093676 [8,] 0.8738436 0.2523129 0.12615643 [9,] 0.8240577 0.3518847 0.17594234 [10,] 0.8105644 0.3788712 0.18943558 [11,] 0.8079250 0.3841500 0.19207500 [12,] 0.7727507 0.4544986 0.22724930 [13,] 0.8926920 0.2146161 0.10730803 [14,] 0.8560851 0.2878298 0.14391489 [15,] 0.9039594 0.1920812 0.09604058 [16,] 0.9275998 0.1448005 0.07240025 [17,] 0.9115490 0.1769020 0.08845099 [18,] 0.8945058 0.2109883 0.10549417 [19,] 0.8712487 0.2575025 0.12875127 [20,] 0.8372299 0.3255402 0.16277011 [21,] 0.7975038 0.4049924 0.20249619 [22,] 0.8863549 0.2272902 0.11364509 [23,] 0.8619782 0.2760436 0.13802178 [24,] 0.8279024 0.3441952 0.17209761 [25,] 0.7923349 0.4153302 0.20766510 [26,] 0.8037969 0.3924062 0.19620309 [27,] 0.7706032 0.4587935 0.22939675 [28,] 0.7416520 0.5166959 0.25834797 [29,] 0.7721714 0.4556572 0.22782860 [30,] 0.7448096 0.5103808 0.25519041 [31,] 0.7086820 0.5826361 0.29131804 [32,] 0.6619487 0.6761027 0.33805133 [33,] 0.6102281 0.7795437 0.38977186 [34,] 0.7338435 0.5323130 0.26615651 [35,] 0.6993090 0.6013820 0.30069099 [36,] 0.6547606 0.6904789 0.34523945 [37,] 0.6927269 0.6145462 0.30727311 [38,] 0.6567761 0.6864478 0.34322389 [39,] 0.6436088 0.7127825 0.35639124 [40,] 0.6136709 0.7726583 0.38632914 [41,] 0.5778939 0.8442122 0.42210612 [42,] 0.5673143 0.8653715 0.43268573 [43,] 0.7823615 0.4352770 0.21763848 [44,] 0.8807979 0.2384043 0.11920213 [45,] 0.8544386 0.2911228 0.14556138 [46,] 0.8347145 0.3305710 0.16528549 [47,] 0.8109904 0.3780192 0.18900962 [48,] 0.8084706 0.3830587 0.19152935 [49,] 0.7874851 0.4250298 0.21251489 [50,] 0.7569173 0.4861653 0.24308265 [51,] 0.7286526 0.5426948 0.27134739 [52,] 0.6887176 0.6225649 0.31128244 [53,] 0.6488966 0.7022069 0.35110344 [54,] 0.6356458 0.7287083 0.36435417 [55,] 0.8070194 0.3859612 0.19298059 [56,] 0.7742912 0.4514176 0.22570879 [57,] 0.8314284 0.3371433 0.16857165 [58,] 0.8026027 0.3947945 0.19739725 [59,] 0.8324677 0.3350646 0.16753228 [60,] 0.8814614 0.2370771 0.11853856 [61,] 0.8563279 0.2873443 0.14367213 [62,] 0.8297318 0.3405364 0.17026822 [63,] 0.8055186 0.3889628 0.19448139 [64,] 0.7783432 0.4433137 0.22165683 [65,] 0.7466575 0.5066850 0.25334250 [66,] 0.7268404 0.5463193 0.27315965 [67,] 0.6889991 0.6220018 0.31100090 [68,] 0.7080060 0.5839879 0.29199396 [69,] 0.7259681 0.5480638 0.27403191 [70,] 0.6996154 0.6007693 0.30038463 [71,] 0.7414911 0.5170179 0.25850893 [72,] 0.7038349 0.5923302 0.29616511 [73,] 0.6771063 0.6457874 0.32289371 [74,] 0.6334693 0.7330614 0.36653069 [75,] 0.5959250 0.8081499 0.40407497 [76,] 0.5581106 0.8837788 0.44188939 [77,] 0.7074072 0.5851856 0.29259278 [78,] 0.6685502 0.6628997 0.33144984 [79,] 0.6276094 0.7447811 0.37239056 [80,] 0.5897286 0.8205428 0.41027140 [81,] 0.5577971 0.8844057 0.44220287 [82,] 0.5129863 0.9740273 0.48701367 [83,] 0.5474242 0.9051515 0.45257577 [84,] 0.5390245 0.9219510 0.46097549 [85,] 0.5039530 0.9920940 0.49604699 [86,] 0.5070701 0.9858598 0.49292991 [87,] 0.4585867 0.9171735 0.54141326 [88,] 0.4237666 0.8475332 0.57623341 [89,] 0.6235438 0.7529123 0.37645615 [90,] 0.5809058 0.8381883 0.41909416 [91,] 0.5818868 0.8362265 0.41811323 [92,] 0.5439452 0.9121095 0.45605476 [93,] 0.5347129 0.9305742 0.46528710 [94,] 0.4880755 0.9761510 0.51192451 [95,] 0.5715826 0.8568348 0.42841741 [96,] 0.7178604 0.5642792 0.28213960 [97,] 0.7050686 0.5898628 0.29493141 [98,] 0.7481537 0.5036926 0.25184629 [99,] 0.7244147 0.5511707 0.27558534 [100,] 0.7038109 0.5923782 0.29618910 [101,] 0.6669826 0.6660348 0.33301742 [102,] 0.6186660 0.7626680 0.38133400 [103,] 0.5769971 0.8460059 0.42300293 [104,] 0.6337927 0.7324146 0.36620731 [105,] 0.6921355 0.6157291 0.30786454 [106,] 0.6430669 0.7138662 0.35693310 [107,] 0.6084060 0.7831879 0.39159396 [108,] 0.5555082 0.8889836 0.44449180 [109,] 0.5025633 0.9948734 0.49743670 [110,] 0.5222558 0.9554883 0.47774415 [111,] 0.4983849 0.9967697 0.50161513 [112,] 0.4610545 0.9221089 0.53894553 [113,] 0.4110360 0.8220720 0.58896401 [114,] 0.4388687 0.8777375 0.56113125 [115,] 0.3808389 0.7616779 0.61916105 [116,] 0.3842359 0.7684719 0.61576407 [117,] 0.3397133 0.6794266 0.66028669 [118,] 0.5349922 0.9300156 0.46500778 [119,] 0.4750546 0.9501092 0.52494539 [120,] 0.5166956 0.9666088 0.48330442 [121,] 0.4553801 0.9107601 0.54461994 [122,] 0.3996884 0.7993769 0.60031157 [123,] 0.3403609 0.6807218 0.65963910 [124,] 0.2953250 0.5906500 0.70467501 [125,] 0.3137728 0.6275457 0.68622715 [126,] 0.2782415 0.5564831 0.72175847 [127,] 0.2282790 0.4565579 0.77172105 [128,] 0.2987177 0.5974354 0.70128228 [129,] 0.2397091 0.4794181 0.76029093 [130,] 0.2570509 0.5141018 0.74294912 [131,] 0.2547863 0.5095727 0.74521367 [132,] 0.2112340 0.4224681 0.78876596 [133,] 0.2952770 0.5905540 0.70472298 [134,] 0.2642379 0.5284759 0.73576206 [135,] 0.2007502 0.4015004 0.79924980 [136,] 0.2167331 0.4334661 0.78326695 [137,] 0.1414985 0.2829971 0.85850145 [138,] 0.6600139 0.6799721 0.33998607 [139,] 0.5452941 0.9094117 0.45470586 > postscript(file="/var/www/html/rcomp/tmp/1bf5l1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2lo4o1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3lo4o1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4lo4o1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5wx3r1290541781.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 = 156 Frequency = 1 1 2 3 4 5 6 3.54860127 -3.47106145 -2.25813014 -5.06652439 -0.27835607 -2.84847571 7 8 9 10 11 12 0.06298067 1.92002987 2.93861859 -3.70776667 3.51547709 -0.46173166 13 14 15 16 17 18 3.86873695 3.56660630 -4.59498062 3.16085408 -0.06524865 1.22468456 19 20 21 22 23 24 -1.96597804 0.76605053 -2.23935896 -0.55144274 4.70989599 -3.21122488 25 26 27 28 29 30 2.12738254 2.85260560 2.78052447 1.64641314 1.04531098 -4.57034683 31 32 33 34 35 36 -1.89830174 1.10905946 -0.07613698 -2.62359170 1.97071522 1.75828045 37 38 39 40 41 42 -2.62389563 -1.87108665 1.47320134 0.82125132 0.15741831 -5.87086444 43 44 45 46 47 48 1.13333786 1.03314851 -3.46734224 -1.61948660 1.33637126 -1.98020471 49 50 51 52 53 54 1.71089978 2.73941226 -6.27542199 5.62016326 0.35067820 -1.15451914 55 56 57 58 59 60 0.92179767 2.56274991 1.76114338 1.39046162 1.58038649 -0.15064653 61 62 63 64 65 66 0.19025641 2.14864723 6.27003881 -0.18915697 -4.12018380 0.87488792 67 68 69 70 71 72 3.64151627 -4.46026144 -0.17711595 -0.29500205 1.42961792 1.27324817 73 74 75 76 77 78 -0.29223959 0.87930423 -0.13968069 2.99731521 3.01128985 1.40137107 79 80 81 82 83 84 -3.70416863 -0.44244122 -1.44273762 0.10302827 -0.65329516 0.59594617 85 86 87 88 89 90 -5.08727098 0.35764623 -0.72522855 -1.19541458 -1.48330355 -0.65469236 91 92 93 94 95 96 -3.63827728 1.18598665 0.98830412 2.73469626 -0.09003859 -1.30187027 97 98 99 100 101 102 -6.75267217 -0.51182472 2.27989118 -1.34472798 1.93576266 0.27919857 103 104 105 106 107 108 3.03892888 -4.68652784 -1.48243600 -4.81607754 2.09329754 0.32655759 109 110 111 112 113 114 1.21014951 -0.93518932 0.71153601 2.12411960 -4.54613025 -0.25354220 115 116 117 118 119 120 -2.58329987 0.18245859 0.25189516 -4.35874208 2.02984331 0.85323735 121 122 123 124 125 126 1.42286826 4.18645308 0.18145008 2.49388566 1.26691305 -5.51228363 127 128 129 130 131 132 -1.61840862 3.09493144 -1.38979243 0.73229476 -1.61089968 -1.12640947 133 134 135 136 137 138 -2.60240925 -1.76134132 -0.32721776 -1.54897322 1.99607421 5.33480351 139 140 141 142 143 144 -0.14209551 2.37887899 5.39285362 1.46011656 1.48087891 2.79730869 145 146 147 148 149 150 -0.53207810 -7.02952532 -1.92447434 3.56134915 2.63150419 -3.30123288 151 152 153 154 155 156 -0.98708706 0.09906099 -0.14932970 -1.31357147 1.57786311 1.48809028 > postscript(file="/var/www/html/rcomp/tmp/6wx3r1290541781.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 = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 3.54860127 NA 1 -3.47106145 3.54860127 2 -2.25813014 -3.47106145 3 -5.06652439 -2.25813014 4 -0.27835607 -5.06652439 5 -2.84847571 -0.27835607 6 0.06298067 -2.84847571 7 1.92002987 0.06298067 8 2.93861859 1.92002987 9 -3.70776667 2.93861859 10 3.51547709 -3.70776667 11 -0.46173166 3.51547709 12 3.86873695 -0.46173166 13 3.56660630 3.86873695 14 -4.59498062 3.56660630 15 3.16085408 -4.59498062 16 -0.06524865 3.16085408 17 1.22468456 -0.06524865 18 -1.96597804 1.22468456 19 0.76605053 -1.96597804 20 -2.23935896 0.76605053 21 -0.55144274 -2.23935896 22 4.70989599 -0.55144274 23 -3.21122488 4.70989599 24 2.12738254 -3.21122488 25 2.85260560 2.12738254 26 2.78052447 2.85260560 27 1.64641314 2.78052447 28 1.04531098 1.64641314 29 -4.57034683 1.04531098 30 -1.89830174 -4.57034683 31 1.10905946 -1.89830174 32 -0.07613698 1.10905946 33 -2.62359170 -0.07613698 34 1.97071522 -2.62359170 35 1.75828045 1.97071522 36 -2.62389563 1.75828045 37 -1.87108665 -2.62389563 38 1.47320134 -1.87108665 39 0.82125132 1.47320134 40 0.15741831 0.82125132 41 -5.87086444 0.15741831 42 1.13333786 -5.87086444 43 1.03314851 1.13333786 44 -3.46734224 1.03314851 45 -1.61948660 -3.46734224 46 1.33637126 -1.61948660 47 -1.98020471 1.33637126 48 1.71089978 -1.98020471 49 2.73941226 1.71089978 50 -6.27542199 2.73941226 51 5.62016326 -6.27542199 52 0.35067820 5.62016326 53 -1.15451914 0.35067820 54 0.92179767 -1.15451914 55 2.56274991 0.92179767 56 1.76114338 2.56274991 57 1.39046162 1.76114338 58 1.58038649 1.39046162 59 -0.15064653 1.58038649 60 0.19025641 -0.15064653 61 2.14864723 0.19025641 62 6.27003881 2.14864723 63 -0.18915697 6.27003881 64 -4.12018380 -0.18915697 65 0.87488792 -4.12018380 66 3.64151627 0.87488792 67 -4.46026144 3.64151627 68 -0.17711595 -4.46026144 69 -0.29500205 -0.17711595 70 1.42961792 -0.29500205 71 1.27324817 1.42961792 72 -0.29223959 1.27324817 73 0.87930423 -0.29223959 74 -0.13968069 0.87930423 75 2.99731521 -0.13968069 76 3.01128985 2.99731521 77 1.40137107 3.01128985 78 -3.70416863 1.40137107 79 -0.44244122 -3.70416863 80 -1.44273762 -0.44244122 81 0.10302827 -1.44273762 82 -0.65329516 0.10302827 83 0.59594617 -0.65329516 84 -5.08727098 0.59594617 85 0.35764623 -5.08727098 86 -0.72522855 0.35764623 87 -1.19541458 -0.72522855 88 -1.48330355 -1.19541458 89 -0.65469236 -1.48330355 90 -3.63827728 -0.65469236 91 1.18598665 -3.63827728 92 0.98830412 1.18598665 93 2.73469626 0.98830412 94 -0.09003859 2.73469626 95 -1.30187027 -0.09003859 96 -6.75267217 -1.30187027 97 -0.51182472 -6.75267217 98 2.27989118 -0.51182472 99 -1.34472798 2.27989118 100 1.93576266 -1.34472798 101 0.27919857 1.93576266 102 3.03892888 0.27919857 103 -4.68652784 3.03892888 104 -1.48243600 -4.68652784 105 -4.81607754 -1.48243600 106 2.09329754 -4.81607754 107 0.32655759 2.09329754 108 1.21014951 0.32655759 109 -0.93518932 1.21014951 110 0.71153601 -0.93518932 111 2.12411960 0.71153601 112 -4.54613025 2.12411960 113 -0.25354220 -4.54613025 114 -2.58329987 -0.25354220 115 0.18245859 -2.58329987 116 0.25189516 0.18245859 117 -4.35874208 0.25189516 118 2.02984331 -4.35874208 119 0.85323735 2.02984331 120 1.42286826 0.85323735 121 4.18645308 1.42286826 122 0.18145008 4.18645308 123 2.49388566 0.18145008 124 1.26691305 2.49388566 125 -5.51228363 1.26691305 126 -1.61840862 -5.51228363 127 3.09493144 -1.61840862 128 -1.38979243 3.09493144 129 0.73229476 -1.38979243 130 -1.61089968 0.73229476 131 -1.12640947 -1.61089968 132 -2.60240925 -1.12640947 133 -1.76134132 -2.60240925 134 -0.32721776 -1.76134132 135 -1.54897322 -0.32721776 136 1.99607421 -1.54897322 137 5.33480351 1.99607421 138 -0.14209551 5.33480351 139 2.37887899 -0.14209551 140 5.39285362 2.37887899 141 1.46011656 5.39285362 142 1.48087891 1.46011656 143 2.79730869 1.48087891 144 -0.53207810 2.79730869 145 -7.02952532 -0.53207810 146 -1.92447434 -7.02952532 147 3.56134915 -1.92447434 148 2.63150419 3.56134915 149 -3.30123288 2.63150419 150 -0.98708706 -3.30123288 151 0.09906099 -0.98708706 152 -0.14932970 0.09906099 153 -1.31357147 -0.14932970 154 1.57786311 -1.31357147 155 1.48809028 1.57786311 156 NA 1.48809028 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.47106145 3.54860127 [2,] -2.25813014 -3.47106145 [3,] -5.06652439 -2.25813014 [4,] -0.27835607 -5.06652439 [5,] -2.84847571 -0.27835607 [6,] 0.06298067 -2.84847571 [7,] 1.92002987 0.06298067 [8,] 2.93861859 1.92002987 [9,] -3.70776667 2.93861859 [10,] 3.51547709 -3.70776667 [11,] -0.46173166 3.51547709 [12,] 3.86873695 -0.46173166 [13,] 3.56660630 3.86873695 [14,] -4.59498062 3.56660630 [15,] 3.16085408 -4.59498062 [16,] -0.06524865 3.16085408 [17,] 1.22468456 -0.06524865 [18,] -1.96597804 1.22468456 [19,] 0.76605053 -1.96597804 [20,] -2.23935896 0.76605053 [21,] -0.55144274 -2.23935896 [22,] 4.70989599 -0.55144274 [23,] -3.21122488 4.70989599 [24,] 2.12738254 -3.21122488 [25,] 2.85260560 2.12738254 [26,] 2.78052447 2.85260560 [27,] 1.64641314 2.78052447 [28,] 1.04531098 1.64641314 [29,] -4.57034683 1.04531098 [30,] -1.89830174 -4.57034683 [31,] 1.10905946 -1.89830174 [32,] -0.07613698 1.10905946 [33,] -2.62359170 -0.07613698 [34,] 1.97071522 -2.62359170 [35,] 1.75828045 1.97071522 [36,] -2.62389563 1.75828045 [37,] -1.87108665 -2.62389563 [38,] 1.47320134 -1.87108665 [39,] 0.82125132 1.47320134 [40,] 0.15741831 0.82125132 [41,] -5.87086444 0.15741831 [42,] 1.13333786 -5.87086444 [43,] 1.03314851 1.13333786 [44,] -3.46734224 1.03314851 [45,] -1.61948660 -3.46734224 [46,] 1.33637126 -1.61948660 [47,] -1.98020471 1.33637126 [48,] 1.71089978 -1.98020471 [49,] 2.73941226 1.71089978 [50,] -6.27542199 2.73941226 [51,] 5.62016326 -6.27542199 [52,] 0.35067820 5.62016326 [53,] -1.15451914 0.35067820 [54,] 0.92179767 -1.15451914 [55,] 2.56274991 0.92179767 [56,] 1.76114338 2.56274991 [57,] 1.39046162 1.76114338 [58,] 1.58038649 1.39046162 [59,] -0.15064653 1.58038649 [60,] 0.19025641 -0.15064653 [61,] 2.14864723 0.19025641 [62,] 6.27003881 2.14864723 [63,] -0.18915697 6.27003881 [64,] -4.12018380 -0.18915697 [65,] 0.87488792 -4.12018380 [66,] 3.64151627 0.87488792 [67,] -4.46026144 3.64151627 [68,] -0.17711595 -4.46026144 [69,] -0.29500205 -0.17711595 [70,] 1.42961792 -0.29500205 [71,] 1.27324817 1.42961792 [72,] -0.29223959 1.27324817 [73,] 0.87930423 -0.29223959 [74,] -0.13968069 0.87930423 [75,] 2.99731521 -0.13968069 [76,] 3.01128985 2.99731521 [77,] 1.40137107 3.01128985 [78,] -3.70416863 1.40137107 [79,] -0.44244122 -3.70416863 [80,] -1.44273762 -0.44244122 [81,] 0.10302827 -1.44273762 [82,] -0.65329516 0.10302827 [83,] 0.59594617 -0.65329516 [84,] -5.08727098 0.59594617 [85,] 0.35764623 -5.08727098 [86,] -0.72522855 0.35764623 [87,] -1.19541458 -0.72522855 [88,] -1.48330355 -1.19541458 [89,] -0.65469236 -1.48330355 [90,] -3.63827728 -0.65469236 [91,] 1.18598665 -3.63827728 [92,] 0.98830412 1.18598665 [93,] 2.73469626 0.98830412 [94,] -0.09003859 2.73469626 [95,] -1.30187027 -0.09003859 [96,] -6.75267217 -1.30187027 [97,] -0.51182472 -6.75267217 [98,] 2.27989118 -0.51182472 [99,] -1.34472798 2.27989118 [100,] 1.93576266 -1.34472798 [101,] 0.27919857 1.93576266 [102,] 3.03892888 0.27919857 [103,] -4.68652784 3.03892888 [104,] -1.48243600 -4.68652784 [105,] -4.81607754 -1.48243600 [106,] 2.09329754 -4.81607754 [107,] 0.32655759 2.09329754 [108,] 1.21014951 0.32655759 [109,] -0.93518932 1.21014951 [110,] 0.71153601 -0.93518932 [111,] 2.12411960 0.71153601 [112,] -4.54613025 2.12411960 [113,] -0.25354220 -4.54613025 [114,] -2.58329987 -0.25354220 [115,] 0.18245859 -2.58329987 [116,] 0.25189516 0.18245859 [117,] -4.35874208 0.25189516 [118,] 2.02984331 -4.35874208 [119,] 0.85323735 2.02984331 [120,] 1.42286826 0.85323735 [121,] 4.18645308 1.42286826 [122,] 0.18145008 4.18645308 [123,] 2.49388566 0.18145008 [124,] 1.26691305 2.49388566 [125,] -5.51228363 1.26691305 [126,] -1.61840862 -5.51228363 [127,] 3.09493144 -1.61840862 [128,] -1.38979243 3.09493144 [129,] 0.73229476 -1.38979243 [130,] -1.61089968 0.73229476 [131,] -1.12640947 -1.61089968 [132,] -2.60240925 -1.12640947 [133,] -1.76134132 -2.60240925 [134,] -0.32721776 -1.76134132 [135,] -1.54897322 -0.32721776 [136,] 1.99607421 -1.54897322 [137,] 5.33480351 1.99607421 [138,] -0.14209551 5.33480351 [139,] 2.37887899 -0.14209551 [140,] 5.39285362 2.37887899 [141,] 1.46011656 5.39285362 [142,] 1.48087891 1.46011656 [143,] 2.79730869 1.48087891 [144,] -0.53207810 2.79730869 [145,] -7.02952532 -0.53207810 [146,] -1.92447434 -7.02952532 [147,] 3.56134915 -1.92447434 [148,] 2.63150419 3.56134915 [149,] -3.30123288 2.63150419 [150,] -0.98708706 -3.30123288 [151,] 0.09906099 -0.98708706 [152,] -0.14932970 0.09906099 [153,] -1.31357147 -0.14932970 [154,] 1.57786311 -1.31357147 [155,] 1.48809028 1.57786311 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.47106145 3.54860127 2 -2.25813014 -3.47106145 3 -5.06652439 -2.25813014 4 -0.27835607 -5.06652439 5 -2.84847571 -0.27835607 6 0.06298067 -2.84847571 7 1.92002987 0.06298067 8 2.93861859 1.92002987 9 -3.70776667 2.93861859 10 3.51547709 -3.70776667 11 -0.46173166 3.51547709 12 3.86873695 -0.46173166 13 3.56660630 3.86873695 14 -4.59498062 3.56660630 15 3.16085408 -4.59498062 16 -0.06524865 3.16085408 17 1.22468456 -0.06524865 18 -1.96597804 1.22468456 19 0.76605053 -1.96597804 20 -2.23935896 0.76605053 21 -0.55144274 -2.23935896 22 4.70989599 -0.55144274 23 -3.21122488 4.70989599 24 2.12738254 -3.21122488 25 2.85260560 2.12738254 26 2.78052447 2.85260560 27 1.64641314 2.78052447 28 1.04531098 1.64641314 29 -4.57034683 1.04531098 30 -1.89830174 -4.57034683 31 1.10905946 -1.89830174 32 -0.07613698 1.10905946 33 -2.62359170 -0.07613698 34 1.97071522 -2.62359170 35 1.75828045 1.97071522 36 -2.62389563 1.75828045 37 -1.87108665 -2.62389563 38 1.47320134 -1.87108665 39 0.82125132 1.47320134 40 0.15741831 0.82125132 41 -5.87086444 0.15741831 42 1.13333786 -5.87086444 43 1.03314851 1.13333786 44 -3.46734224 1.03314851 45 -1.61948660 -3.46734224 46 1.33637126 -1.61948660 47 -1.98020471 1.33637126 48 1.71089978 -1.98020471 49 2.73941226 1.71089978 50 -6.27542199 2.73941226 51 5.62016326 -6.27542199 52 0.35067820 5.62016326 53 -1.15451914 0.35067820 54 0.92179767 -1.15451914 55 2.56274991 0.92179767 56 1.76114338 2.56274991 57 1.39046162 1.76114338 58 1.58038649 1.39046162 59 -0.15064653 1.58038649 60 0.19025641 -0.15064653 61 2.14864723 0.19025641 62 6.27003881 2.14864723 63 -0.18915697 6.27003881 64 -4.12018380 -0.18915697 65 0.87488792 -4.12018380 66 3.64151627 0.87488792 67 -4.46026144 3.64151627 68 -0.17711595 -4.46026144 69 -0.29500205 -0.17711595 70 1.42961792 -0.29500205 71 1.27324817 1.42961792 72 -0.29223959 1.27324817 73 0.87930423 -0.29223959 74 -0.13968069 0.87930423 75 2.99731521 -0.13968069 76 3.01128985 2.99731521 77 1.40137107 3.01128985 78 -3.70416863 1.40137107 79 -0.44244122 -3.70416863 80 -1.44273762 -0.44244122 81 0.10302827 -1.44273762 82 -0.65329516 0.10302827 83 0.59594617 -0.65329516 84 -5.08727098 0.59594617 85 0.35764623 -5.08727098 86 -0.72522855 0.35764623 87 -1.19541458 -0.72522855 88 -1.48330355 -1.19541458 89 -0.65469236 -1.48330355 90 -3.63827728 -0.65469236 91 1.18598665 -3.63827728 92 0.98830412 1.18598665 93 2.73469626 0.98830412 94 -0.09003859 2.73469626 95 -1.30187027 -0.09003859 96 -6.75267217 -1.30187027 97 -0.51182472 -6.75267217 98 2.27989118 -0.51182472 99 -1.34472798 2.27989118 100 1.93576266 -1.34472798 101 0.27919857 1.93576266 102 3.03892888 0.27919857 103 -4.68652784 3.03892888 104 -1.48243600 -4.68652784 105 -4.81607754 -1.48243600 106 2.09329754 -4.81607754 107 0.32655759 2.09329754 108 1.21014951 0.32655759 109 -0.93518932 1.21014951 110 0.71153601 -0.93518932 111 2.12411960 0.71153601 112 -4.54613025 2.12411960 113 -0.25354220 -4.54613025 114 -2.58329987 -0.25354220 115 0.18245859 -2.58329987 116 0.25189516 0.18245859 117 -4.35874208 0.25189516 118 2.02984331 -4.35874208 119 0.85323735 2.02984331 120 1.42286826 0.85323735 121 4.18645308 1.42286826 122 0.18145008 4.18645308 123 2.49388566 0.18145008 124 1.26691305 2.49388566 125 -5.51228363 1.26691305 126 -1.61840862 -5.51228363 127 3.09493144 -1.61840862 128 -1.38979243 3.09493144 129 0.73229476 -1.38979243 130 -1.61089968 0.73229476 131 -1.12640947 -1.61089968 132 -2.60240925 -1.12640947 133 -1.76134132 -2.60240925 134 -0.32721776 -1.76134132 135 -1.54897322 -0.32721776 136 1.99607421 -1.54897322 137 5.33480351 1.99607421 138 -0.14209551 5.33480351 139 2.37887899 -0.14209551 140 5.39285362 2.37887899 141 1.46011656 5.39285362 142 1.48087891 1.46011656 143 2.79730869 1.48087891 144 -0.53207810 2.79730869 145 -7.02952532 -0.53207810 146 -1.92447434 -7.02952532 147 3.56134915 -1.92447434 148 2.63150419 3.56134915 149 -3.30123288 2.63150419 150 -0.98708706 -3.30123288 151 0.09906099 -0.98708706 152 -0.14932970 0.09906099 153 -1.31357147 -0.14932970 154 1.57786311 -1.31357147 155 1.48809028 1.57786311 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/77okc1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/87okc1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9zgjf1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10zgjf1290541781.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11lgil1290541781.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12ohy91290541781.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13diw31290541781.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14gicq1290541781.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15k1aw1290541781.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16n1r21290541781.tab") + } > > try(system("convert tmp/1bf5l1290541781.ps tmp/1bf5l1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/2lo4o1290541781.ps tmp/2lo4o1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/3lo4o1290541781.ps tmp/3lo4o1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/4lo4o1290541781.ps tmp/4lo4o1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/5wx3r1290541781.ps tmp/5wx3r1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/6wx3r1290541781.ps tmp/6wx3r1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/77okc1290541781.ps tmp/77okc1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/87okc1290541781.ps tmp/87okc1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/9zgjf1290541781.ps tmp/9zgjf1290541781.png",intern=TRUE)) character(0) > try(system("convert tmp/10zgjf1290541781.ps tmp/10zgjf1290541781.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.885 1.688 8.600