R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(41 + ,12 + ,12 + ,13 + ,39 + ,11 + ,11 + ,16 + ,30 + ,15 + ,14 + ,19 + ,31 + ,6 + ,12 + ,15 + ,34 + ,13 + ,21 + ,14 + ,35 + ,10 + ,12 + ,13 + ,39 + ,12 + ,22 + ,19 + ,34 + ,14 + ,11 + ,15 + ,36 + ,12 + ,10 + ,14 + ,37 + ,6 + ,13 + ,15 + ,38 + ,10 + ,10 + ,16 + ,36 + ,12 + ,8 + ,16 + ,38 + ,12 + ,15 + ,16 + ,39 + ,11 + ,14 + ,16 + ,33 + ,15 + ,10 + ,17 + ,32 + ,12 + ,14 + ,15 + ,36 + ,10 + ,14 + ,15 + ,38 + ,12 + ,11 + ,20 + ,39 + ,11 + ,10 + ,18 + ,32 + ,12 + ,13 + ,16 + ,32 + ,11 + ,7 + ,16 + ,31 + ,12 + ,14 + ,16 + ,39 + ,13 + ,12 + ,19 + ,37 + ,11 + ,14 + ,16 + ,39 + ,9 + ,11 + ,17 + ,41 + ,13 + ,9 + ,17 + ,36 + ,10 + ,11 + ,16 + ,33 + ,14 + ,15 + ,15 + ,33 + ,12 + ,14 + ,16 + ,34 + ,10 + ,13 + ,14 + ,31 + ,12 + ,9 + ,15 + ,27 + ,8 + ,15 + ,12 + ,37 + ,10 + ,10 + ,14 + ,34 + ,12 + ,11 + ,16 + ,34 + ,12 + ,13 + ,14 + ,32 + ,7 + ,8 + ,7 + ,29 + ,6 + ,20 + ,10 + ,36 + ,12 + ,12 + ,14 + ,29 + ,10 + ,10 + ,16 + ,35 + ,10 + ,10 + ,16 + ,37 + ,10 + ,9 + ,16 + ,34 + ,12 + ,14 + ,14 + ,38 + ,15 + ,8 + ,20 + ,35 + ,10 + ,14 + ,14 + ,38 + ,10 + ,11 + ,14 + ,37 + ,12 + ,13 + ,11 + ,38 + ,13 + ,9 + ,14 + ,33 + ,11 + ,11 + ,15 + ,36 + ,11 + ,15 + ,16 + ,38 + ,12 + ,11 + ,14 + ,32 + ,14 + ,10 + ,16 + ,32 + ,10 + ,14 + ,14 + ,32 + ,12 + ,18 + ,12 + ,34 + ,13 + ,14 + ,16 + ,32 + ,5 + ,11 + ,9 + ,37 + ,6 + ,12 + ,14 + ,39 + ,12 + ,13 + ,16 + ,29 + ,12 + ,9 + ,16 + ,37 + ,11 + ,10 + ,15 + ,35 + ,10 + ,15 + ,16 + ,30 + ,7 + ,20 + ,12 + ,38 + ,12 + ,12 + ,16 + ,34 + ,14 + ,12 + ,16 + ,31 + ,11 + ,14 + ,14 + ,34 + ,12 + ,13 + ,16 + ,35 + ,13 + ,11 + ,17 + ,36 + ,14 + ,17 + ,18 + ,30 + ,11 + ,12 + ,18 + ,39 + ,12 + ,13 + ,12 + ,35 + ,12 + ,14 + ,16 + ,38 + ,8 + ,13 + ,10 + ,31 + ,11 + ,15 + ,14 + ,34 + ,14 + ,13 + ,18 + ,38 + ,14 + ,10 + ,18 + ,34 + ,12 + ,11 + ,16 + ,39 + ,9 + ,19 + ,17 + ,37 + ,13 + ,13 + ,16 + ,34 + ,11 + ,17 + ,16 + ,28 + ,12 + ,13 + ,13 + ,37 + ,12 + ,9 + ,16 + ,33 + ,12 + ,11 + ,16 + ,37 + ,12 + ,10 + ,20 + ,35 + ,12 + ,9 + ,16 + ,37 + ,12 + ,12 + ,15 + ,32 + ,11 + ,12 + ,15 + ,33 + ,10 + ,13 + ,16 + ,38 + ,9 + ,13 + ,14 + ,33 + ,12 + ,12 + ,16 + ,29 + ,12 + ,15 + ,16 + ,33 + ,12 + ,22 + ,15 + ,31 + ,9 + ,13 + ,12 + ,36 + ,15 + ,15 + ,17 + ,35 + ,12 + ,13 + ,16 + ,32 + ,12 + ,15 + ,15 + ,29 + ,12 + ,10 + ,13 + ,39 + ,10 + ,11 + ,16 + ,37 + ,13 + ,16 + ,16 + ,35 + ,9 + ,11 + ,16 + ,37 + ,12 + ,11 + ,16 + ,32 + ,10 + ,10 + ,14 + ,38 + ,14 + ,10 + ,16 + ,37 + ,11 + ,16 + ,16 + ,36 + ,15 + ,12 + ,20 + ,32 + ,11 + ,11 + ,15 + ,33 + ,11 + ,16 + ,16 + ,40 + ,12 + ,19 + ,13 + ,38 + ,12 + ,11 + ,17 + ,41 + ,12 + ,16 + ,16 + ,36 + ,11 + ,15 + ,16 + ,43 + ,7 + ,24 + ,12 + ,30 + ,12 + ,14 + ,16 + ,31 + ,14 + ,15 + ,16 + ,32 + ,11 + ,11 + ,17 + ,32 + ,11 + ,15 + ,13 + ,37 + ,10 + ,12 + ,12 + ,37 + ,13 + ,10 + ,18 + ,33 + ,13 + ,14 + ,14 + ,34 + ,8 + ,13 + ,14 + ,33 + ,11 + ,9 + ,13 + ,38 + ,12 + ,15 + ,16 + ,33 + ,11 + ,15 + ,13 + ,31 + ,13 + ,14 + ,16 + ,38 + ,12 + ,11 + ,13 + ,37 + ,14 + ,8 + ,16 + ,33 + ,13 + ,11 + ,15 + ,31 + ,15 + ,11 + ,16 + ,39 + ,10 + ,8 + ,15 + ,44 + ,11 + ,10 + ,17 + ,33 + ,9 + ,11 + ,15 + ,35 + ,11 + ,13 + ,12 + ,32 + ,10 + ,11 + ,16 + ,28 + ,11 + ,20 + ,10 + ,40 + ,8 + ,10 + ,16 + ,27 + ,11 + ,15 + ,12 + ,37 + ,12 + ,12 + ,14 + ,32 + ,12 + ,14 + ,15 + ,28 + ,9 + ,23 + ,13 + ,34 + ,11 + ,14 + ,15 + ,30 + ,10 + ,16 + ,11 + ,35 + ,8 + ,11 + ,12 + ,31 + ,9 + ,12 + ,8 + ,32 + ,8 + ,10 + ,16 + ,30 + ,9 + ,14 + ,15 + ,30 + ,15 + ,12 + ,17 + ,31 + ,11 + ,12 + ,16 + ,40 + ,8 + ,11 + ,10 + ,32 + ,13 + ,12 + ,18 + ,36 + ,12 + ,13 + ,13 + ,32 + ,12 + ,11 + ,16 + ,35 + ,9 + ,19 + ,13 + ,38 + ,7 + ,12 + ,10 + ,42 + ,13 + ,17 + ,15 + ,34 + ,9 + ,9 + ,16 + ,35 + ,6 + ,12 + ,16 + ,35 + ,8 + ,19 + ,14 + ,33 + ,8 + ,18 + ,10 + ,36 + ,15 + ,15 + ,17 + ,32 + ,6 + ,14 + ,13 + ,33 + ,9 + ,11 + ,15 + ,34 + ,11 + ,9 + ,16 + ,32 + ,8 + ,18 + ,12 + ,34 + ,8 + ,16 + ,13) + ,dim=c(4 + ,162) + ,dimnames=list(c('Connected' + ,'Software' + ,'Depression' + ,'Learning') + ,1:162)) > y <- array(NA,dim=c(4,162),dimnames=list(c('Connected','Software','Depression','Learning'),1:162)) > 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 = '4' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '4' > #'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, 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 Learning Connected Software Depression 1 13 41 12 12 2 16 39 11 11 3 19 30 15 14 4 15 31 6 12 5 14 34 13 21 6 13 35 10 12 7 19 39 12 22 8 15 34 14 11 9 14 36 12 10 10 15 37 6 13 11 16 38 10 10 12 16 36 12 8 13 16 38 12 15 14 16 39 11 14 15 17 33 15 10 16 15 32 12 14 17 15 36 10 14 18 20 38 12 11 19 18 39 11 10 20 16 32 12 13 21 16 32 11 7 22 16 31 12 14 23 19 39 13 12 24 16 37 11 14 25 17 39 9 11 26 17 41 13 9 27 16 36 10 11 28 15 33 14 15 29 16 33 12 14 30 14 34 10 13 31 15 31 12 9 32 12 27 8 15 33 14 37 10 10 34 16 34 12 11 35 14 34 12 13 36 7 32 7 8 37 10 29 6 20 38 14 36 12 12 39 16 29 10 10 40 16 35 10 10 41 16 37 10 9 42 14 34 12 14 43 20 38 15 8 44 14 35 10 14 45 14 38 10 11 46 11 37 12 13 47 14 38 13 9 48 15 33 11 11 49 16 36 11 15 50 14 38 12 11 51 16 32 14 10 52 14 32 10 14 53 12 32 12 18 54 16 34 13 14 55 9 32 5 11 56 14 37 6 12 57 16 39 12 13 58 16 29 12 9 59 15 37 11 10 60 16 35 10 15 61 12 30 7 20 62 16 38 12 12 63 16 34 14 12 64 14 31 11 14 65 16 34 12 13 66 17 35 13 11 67 18 36 14 17 68 18 30 11 12 69 12 39 12 13 70 16 35 12 14 71 10 38 8 13 72 14 31 11 15 73 18 34 14 13 74 18 38 14 10 75 16 34 12 11 76 17 39 9 19 77 16 37 13 13 78 16 34 11 17 79 13 28 12 13 80 16 37 12 9 81 16 33 12 11 82 20 37 12 10 83 16 35 12 9 84 15 37 12 12 85 15 32 11 12 86 16 33 10 13 87 14 38 9 13 88 16 33 12 12 89 16 29 12 15 90 15 33 12 22 91 12 31 9 13 92 17 36 15 15 93 16 35 12 13 94 15 32 12 15 95 13 29 12 10 96 16 39 10 11 97 16 37 13 16 98 16 35 9 11 99 16 37 12 11 100 14 32 10 10 101 16 38 14 10 102 16 37 11 16 103 20 36 15 12 104 15 32 11 11 105 16 33 11 16 106 13 40 12 19 107 17 38 12 11 108 16 41 12 16 109 16 36 11 15 110 12 43 7 24 111 16 30 12 14 112 16 31 14 15 113 17 32 11 11 114 13 32 11 15 115 12 37 10 12 116 18 37 13 10 117 14 33 13 14 118 14 34 8 13 119 13 33 11 9 120 16 38 12 15 121 13 33 11 15 122 16 31 13 14 123 13 38 12 11 124 16 37 14 8 125 15 33 13 11 126 16 31 15 11 127 15 39 10 8 128 17 44 11 10 129 15 33 9 11 130 12 35 11 13 131 16 32 10 11 132 10 28 11 20 133 16 40 8 10 134 12 27 11 15 135 14 37 12 12 136 15 32 12 14 137 13 28 9 23 138 15 34 11 14 139 11 30 10 16 140 12 35 8 11 141 8 31 9 12 142 16 32 8 10 143 15 30 9 14 144 17 30 15 12 145 16 31 11 12 146 10 40 8 11 147 18 32 13 12 148 13 36 12 13 149 16 32 12 11 150 13 35 9 19 151 10 38 7 12 152 15 42 13 17 153 16 34 9 9 154 16 35 6 12 155 14 35 8 19 156 10 33 8 18 157 17 36 15 15 158 13 32 6 14 159 15 33 9 11 160 16 34 11 9 161 12 32 8 18 162 13 34 8 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Software Depression 6.4564 0.1099 0.5436 -0.1021 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.9603 -1.0917 0.1221 1.1408 3.9826 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.45638 1.84538 3.499 0.000608 *** Connected 0.10987 0.04324 2.541 0.012017 * Software 0.54360 0.06827 7.963 3.1e-13 *** Depression -0.10214 0.04643 -2.200 0.029258 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.836 on 158 degrees of freedom Multiple R-squared: 0.35, Adjusted R-squared: 0.3376 F-statistic: 28.36 on 3 and 158 DF, p-value: 1.003e-14 > 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.96806075 0.06387850 0.03193925 [2,] 0.93935055 0.12129889 0.06064945 [3,] 0.89788737 0.20422526 0.10211263 [4,] 0.85558607 0.28882786 0.14441393 [5,] 0.83443459 0.33113081 0.16556541 [6,] 0.78978668 0.42042664 0.21021332 [7,] 0.71439409 0.57121182 0.28560591 [8,] 0.63941321 0.72117359 0.36058679 [9,] 0.57129804 0.85740391 0.42870196 [10,] 0.51149516 0.97700968 0.48850484 [11,] 0.42970753 0.85941506 0.57029247 [12,] 0.77035162 0.45929675 0.22964838 [13,] 0.79327547 0.41344906 0.20672453 [14,] 0.73772754 0.52454493 0.26227246 [15,] 0.67993202 0.64013596 0.32006798 [16,] 0.61618002 0.76763996 0.38381998 [17,] 0.66083159 0.67833683 0.33916841 [18,] 0.59908135 0.80183729 0.40091865 [19,] 0.58325876 0.83348248 0.41674124 [20,] 0.51754763 0.96490475 0.48245237 [21,] 0.45960291 0.91920582 0.54039709 [22,] 0.43388646 0.86777293 0.56611354 [23,] 0.37475075 0.74950149 0.62524925 [24,] 0.35036177 0.70072354 0.64963823 [25,] 0.30029424 0.60058849 0.69970576 [26,] 0.28717007 0.57434015 0.71282993 [27,] 0.27750305 0.55500611 0.72249695 [28,] 0.23073875 0.46147749 0.76926125 [29,] 0.22748054 0.45496108 0.77251946 [30,] 0.76300340 0.47399320 0.23699660 [31,] 0.75024942 0.49950117 0.24975058 [32,] 0.75242261 0.49515478 0.24757739 [33,] 0.77815156 0.44369689 0.22184844 [34,] 0.75435515 0.49128970 0.24564485 [35,] 0.71948613 0.56102773 0.28051387 [36,] 0.70395319 0.59209361 0.29604681 [37,] 0.70940700 0.58118600 0.29059300 [38,] 0.66930642 0.66138716 0.33069358 [39,] 0.64450382 0.71099236 0.35549618 [40,] 0.87079458 0.25841085 0.12920542 [41,] 0.89875300 0.20249401 0.10124700 [42,] 0.87495863 0.25008274 0.12504137 [43,] 0.85474014 0.29051972 0.14525986 [44,] 0.86112574 0.27774851 0.13887426 [45,] 0.83367227 0.33265546 0.16632773 [46,] 0.80135668 0.39728665 0.19864332 [47,] 0.83879798 0.32240404 0.16120202 [48,] 0.80774125 0.38451750 0.19225875 [49,] 0.83396292 0.33207416 0.16603708 [50,] 0.81818607 0.36362787 0.18181393 [51,] 0.78555327 0.42889346 0.21444673 [52,] 0.76252927 0.47494146 0.23747073 [53,] 0.72695295 0.54609410 0.27304705 [54,] 0.71985276 0.56029447 0.28014724 [55,] 0.68059871 0.63880259 0.31940129 [56,] 0.63757715 0.72484570 0.36242285 [57,] 0.59626739 0.80746522 0.40373261 [58,] 0.55213006 0.89573989 0.44786994 [59,] 0.51058933 0.97882134 0.48941067 [60,] 0.47245685 0.94491370 0.52754315 [61,] 0.46038605 0.92077211 0.53961395 [62,] 0.58443409 0.83113183 0.41556591 [63,] 0.73725091 0.52549819 0.26274909 [64,] 0.70197883 0.59604234 0.29802117 [65,] 0.80651340 0.38697320 0.19348660 [66,] 0.77484870 0.45030259 0.22515130 [67,] 0.76274313 0.47451374 0.23725687 [68,] 0.73275683 0.53448634 0.26724317 [69,] 0.69562438 0.60875125 0.30437562 [70,] 0.77205548 0.45588905 0.22794452 [71,] 0.73721300 0.52557400 0.26278700 [72,] 0.72618908 0.54762185 0.27381092 [73,] 0.72159354 0.55681292 0.27840646 [74,] 0.68220327 0.63559345 0.31779673 [75,] 0.64390021 0.71219959 0.35609979 [76,] 0.78647443 0.42705114 0.21352557 [77,] 0.75182264 0.49635471 0.24817736 [78,] 0.72168163 0.55663674 0.27831837 [79,] 0.68282537 0.63434925 0.31717463 [80,] 0.68112026 0.63775948 0.31887974 [81,] 0.64000756 0.71998489 0.35999244 [82,] 0.60171061 0.79657878 0.39828939 [83,] 0.58232161 0.83535678 0.41767839 [84,] 0.55218257 0.89563486 0.44781743 [85,] 0.53433381 0.93133239 0.46566619 [86,] 0.49246778 0.98493556 0.50753222 [87,] 0.45165811 0.90331621 0.54834189 [88,] 0.40770549 0.81541098 0.59229451 [89,] 0.42350897 0.84701794 0.57649103 [90,] 0.39100993 0.78201986 0.60899007 [91,] 0.35226130 0.70452260 0.64773870 [92,] 0.35498752 0.70997504 0.64501248 [93,] 0.31317598 0.62635195 0.68682402 [94,] 0.27520903 0.55041807 0.72479097 [95,] 0.25009130 0.50018260 0.74990870 [96,] 0.23420199 0.46840399 0.76579801 [97,] 0.29511858 0.59023715 0.70488142 [98,] 0.25582839 0.51165679 0.74417161 [99,] 0.25414587 0.50829174 0.74585413 [100,] 0.26940165 0.53880330 0.73059835 [101,] 0.24772557 0.49545114 0.75227443 [102,] 0.22226135 0.44452271 0.77773865 [103,] 0.21142133 0.42284266 0.78857867 [104,] 0.19491935 0.38983871 0.80508065 [105,] 0.17783710 0.35567419 0.82216290 [106,] 0.15202814 0.30405628 0.84797186 [107,] 0.16349800 0.32699599 0.83650200 [108,] 0.14601554 0.29203107 0.85398446 [109,] 0.16937429 0.33874859 0.83062571 [110,] 0.16919703 0.33839407 0.83080297 [111,] 0.15392025 0.30784050 0.84607975 [112,] 0.13042201 0.26084402 0.86957799 [113,] 0.14038978 0.28077956 0.85961022 [114,] 0.12692451 0.25384902 0.87307549 [115,] 0.11145907 0.22291813 0.88854093 [116,] 0.09397463 0.18794926 0.90602537 [117,] 0.11453940 0.22907881 0.88546060 [118,] 0.09784253 0.19568506 0.90215747 [119,] 0.08068755 0.16137509 0.91931245 [120,] 0.06485128 0.12970256 0.93514872 [121,] 0.05016419 0.10032839 0.94983581 [122,] 0.04336896 0.08673793 0.95663104 [123,] 0.03451197 0.06902395 0.96548803 [124,] 0.04480159 0.08960318 0.95519841 [125,] 0.03961221 0.07922443 0.96038779 [126,] 0.06352431 0.12704863 0.93647569 [127,] 0.07324481 0.14648961 0.92675519 [128,] 0.09224807 0.18449614 0.90775193 [129,] 0.07761687 0.15523374 0.92238313 [130,] 0.05766606 0.11533212 0.94233394 [131,] 0.04328691 0.08657382 0.95671309 [132,] 0.03124589 0.06249178 0.96875411 [133,] 0.04888739 0.09777478 0.95111261 [134,] 0.04040613 0.08081227 0.95959387 [135,] 0.55815269 0.88369462 0.44184731 [136,] 0.54210745 0.91578509 0.45789255 [137,] 0.47449976 0.94899953 0.52550024 [138,] 0.44176847 0.88353694 0.55823153 [139,] 0.36889378 0.73778756 0.63110622 [140,] 0.47565829 0.95131658 0.52434171 [141,] 0.44732349 0.89464697 0.55267651 [142,] 0.51481935 0.97036129 0.48518065 [143,] 0.42595360 0.85190720 0.57404640 [144,] 0.33394547 0.66789094 0.66605453 [145,] 0.80409638 0.39180723 0.19590362 [146,] 0.92196438 0.15607123 0.07803562 [147,] 0.85766364 0.28467271 0.14233636 [148,] 0.76022965 0.47954070 0.23977035 [149,] 0.71935044 0.56129913 0.28064956 > postscript(file="/var/wessaorg/rcomp/tmp/1knfb1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2rj5r1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/37d371351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/44mq81351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52oyv1351952601.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 = 162 Frequency = 1 1 2 3 4 5 6 -3.25855064 0.40264788 2.52350117 3.10174373 -1.11379631 -1.51213285 7 8 9 10 11 12 3.98259408 -1.67880055 -1.91348226 2.54466498 0.95397653 -0.11776325 13 14 15 16 17 18 0.37748048 0.70906937 -0.21467044 -0.06544077 0.58227827 3.96891849 19 20 21 22 23 24 2.30050739 0.83241874 0.76317503 1.04442911 2.41758984 0.92880913 25 26 27 28 29 30 2.48984642 -0.10857140 1.27585678 -1.16036869 0.82468936 -0.30012248 31 32 33 34 35 36 -0.46627337 -0.23955381 -0.93615359 0.40839799 -1.38732101 -5.96028740 37 38 39 40 41 42 -0.86139254 -1.70920126 1.94280541 1.28358616 0.96170591 -1.28518052 43 44 45 46 47 48 2.03169919 -0.30785185 -0.94388297 -4.71693064 -2.77896177 0.06186714 49 50 51 52 53 54 1.14081950 -2.03108151 -0.56120129 0.02175777 -2.65687878 0.17122021 55 56 57 58 59 60 -2.56666737 1.44252448 0.06332961 0.75346638 -0.47975286 1.79428864 61 62 63 64 65 66 0.48513831 0.07105899 -0.57666005 -0.41197162 0.61267899 0.75492885 67 68 69 70 71 72 1.71430268 3.49361726 -3.93667039 0.60494961 -3.65240344 -0.30983112 73 74 75 76 77 78 1.52548045 0.77957945 0.40839799 3.30697040 -0.26052991 1.56484024 79 80 81 82 83 84 -1.72810176 -0.12549263 0.51826787 3.97664787 0.09424712 -0.81907114 85 86 87 88 89 90 0.27387751 1.80974740 -0.19600271 0.62040836 1.36630936 0.64181333 91 92 93 94 95 96 -1.42691358 -0.03357758 0.50280911 0.03669973 -2.14439313 0.94624715 97 98 99 100 101 102 0.04589158 1.92932593 0.07878837 -0.38680421 -1.22042055 1.13309012 103 104 105 106 107 108 2.66000093 0.17173701 1.57256962 -2.43369729 0.96891849 0.15001135 109 110 111 112 113 114 1.14081950 -0.53460808 1.15429898 0.05937107 2.17173701 -1.41970100 115 116 117 118 119 120 -2.73187260 1.43304860 -1.71890991 0.78707606 -2.14241386 0.37748048 121 122 123 124 125 126 -1.52957088 0.50082984 -3.03108151 -1.31483166 -1.02533140 -0.89279019 127 128 129 130 131 132 -0.36017434 0.75115801 1.14906568 -2.95359162 1.71533628 -3.46951901 133 134 135 136 137 138 1.82143532 -1.87035162 -1.81907114 -0.06544077 0.92410101 0.25841875 139 140 141 142 143 144 -2.55422148 -1.52707480 -5.52905408 2.70039433 1.78509679 0.31922018 145 146 147 148 149 150 1.38374739 -4.07642418 2.18667897 -2.60706077 0.62813774 -0.25355010 151 152 153 154 155 156 -3.21094466 -1.40131730 1.83491481 3.66226423 1.29004917 -2.59235158 157 158 159 160 161 162 -0.03357758 1.19615485 1.14906568 0.74771627 -0.48248170 0.09349755 > postscript(file="/var/wessaorg/rcomp/tmp/6vnsw1351952601.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.25855064 NA 1 0.40264788 -3.25855064 2 2.52350117 0.40264788 3 3.10174373 2.52350117 4 -1.11379631 3.10174373 5 -1.51213285 -1.11379631 6 3.98259408 -1.51213285 7 -1.67880055 3.98259408 8 -1.91348226 -1.67880055 9 2.54466498 -1.91348226 10 0.95397653 2.54466498 11 -0.11776325 0.95397653 12 0.37748048 -0.11776325 13 0.70906937 0.37748048 14 -0.21467044 0.70906937 15 -0.06544077 -0.21467044 16 0.58227827 -0.06544077 17 3.96891849 0.58227827 18 2.30050739 3.96891849 19 0.83241874 2.30050739 20 0.76317503 0.83241874 21 1.04442911 0.76317503 22 2.41758984 1.04442911 23 0.92880913 2.41758984 24 2.48984642 0.92880913 25 -0.10857140 2.48984642 26 1.27585678 -0.10857140 27 -1.16036869 1.27585678 28 0.82468936 -1.16036869 29 -0.30012248 0.82468936 30 -0.46627337 -0.30012248 31 -0.23955381 -0.46627337 32 -0.93615359 -0.23955381 33 0.40839799 -0.93615359 34 -1.38732101 0.40839799 35 -5.96028740 -1.38732101 36 -0.86139254 -5.96028740 37 -1.70920126 -0.86139254 38 1.94280541 -1.70920126 39 1.28358616 1.94280541 40 0.96170591 1.28358616 41 -1.28518052 0.96170591 42 2.03169919 -1.28518052 43 -0.30785185 2.03169919 44 -0.94388297 -0.30785185 45 -4.71693064 -0.94388297 46 -2.77896177 -4.71693064 47 0.06186714 -2.77896177 48 1.14081950 0.06186714 49 -2.03108151 1.14081950 50 -0.56120129 -2.03108151 51 0.02175777 -0.56120129 52 -2.65687878 0.02175777 53 0.17122021 -2.65687878 54 -2.56666737 0.17122021 55 1.44252448 -2.56666737 56 0.06332961 1.44252448 57 0.75346638 0.06332961 58 -0.47975286 0.75346638 59 1.79428864 -0.47975286 60 0.48513831 1.79428864 61 0.07105899 0.48513831 62 -0.57666005 0.07105899 63 -0.41197162 -0.57666005 64 0.61267899 -0.41197162 65 0.75492885 0.61267899 66 1.71430268 0.75492885 67 3.49361726 1.71430268 68 -3.93667039 3.49361726 69 0.60494961 -3.93667039 70 -3.65240344 0.60494961 71 -0.30983112 -3.65240344 72 1.52548045 -0.30983112 73 0.77957945 1.52548045 74 0.40839799 0.77957945 75 3.30697040 0.40839799 76 -0.26052991 3.30697040 77 1.56484024 -0.26052991 78 -1.72810176 1.56484024 79 -0.12549263 -1.72810176 80 0.51826787 -0.12549263 81 3.97664787 0.51826787 82 0.09424712 3.97664787 83 -0.81907114 0.09424712 84 0.27387751 -0.81907114 85 1.80974740 0.27387751 86 -0.19600271 1.80974740 87 0.62040836 -0.19600271 88 1.36630936 0.62040836 89 0.64181333 1.36630936 90 -1.42691358 0.64181333 91 -0.03357758 -1.42691358 92 0.50280911 -0.03357758 93 0.03669973 0.50280911 94 -2.14439313 0.03669973 95 0.94624715 -2.14439313 96 0.04589158 0.94624715 97 1.92932593 0.04589158 98 0.07878837 1.92932593 99 -0.38680421 0.07878837 100 -1.22042055 -0.38680421 101 1.13309012 -1.22042055 102 2.66000093 1.13309012 103 0.17173701 2.66000093 104 1.57256962 0.17173701 105 -2.43369729 1.57256962 106 0.96891849 -2.43369729 107 0.15001135 0.96891849 108 1.14081950 0.15001135 109 -0.53460808 1.14081950 110 1.15429898 -0.53460808 111 0.05937107 1.15429898 112 2.17173701 0.05937107 113 -1.41970100 2.17173701 114 -2.73187260 -1.41970100 115 1.43304860 -2.73187260 116 -1.71890991 1.43304860 117 0.78707606 -1.71890991 118 -2.14241386 0.78707606 119 0.37748048 -2.14241386 120 -1.52957088 0.37748048 121 0.50082984 -1.52957088 122 -3.03108151 0.50082984 123 -1.31483166 -3.03108151 124 -1.02533140 -1.31483166 125 -0.89279019 -1.02533140 126 -0.36017434 -0.89279019 127 0.75115801 -0.36017434 128 1.14906568 0.75115801 129 -2.95359162 1.14906568 130 1.71533628 -2.95359162 131 -3.46951901 1.71533628 132 1.82143532 -3.46951901 133 -1.87035162 1.82143532 134 -1.81907114 -1.87035162 135 -0.06544077 -1.81907114 136 0.92410101 -0.06544077 137 0.25841875 0.92410101 138 -2.55422148 0.25841875 139 -1.52707480 -2.55422148 140 -5.52905408 -1.52707480 141 2.70039433 -5.52905408 142 1.78509679 2.70039433 143 0.31922018 1.78509679 144 1.38374739 0.31922018 145 -4.07642418 1.38374739 146 2.18667897 -4.07642418 147 -2.60706077 2.18667897 148 0.62813774 -2.60706077 149 -0.25355010 0.62813774 150 -3.21094466 -0.25355010 151 -1.40131730 -3.21094466 152 1.83491481 -1.40131730 153 3.66226423 1.83491481 154 1.29004917 3.66226423 155 -2.59235158 1.29004917 156 -0.03357758 -2.59235158 157 1.19615485 -0.03357758 158 1.14906568 1.19615485 159 0.74771627 1.14906568 160 -0.48248170 0.74771627 161 0.09349755 -0.48248170 162 NA 0.09349755 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.40264788 -3.25855064 [2,] 2.52350117 0.40264788 [3,] 3.10174373 2.52350117 [4,] -1.11379631 3.10174373 [5,] -1.51213285 -1.11379631 [6,] 3.98259408 -1.51213285 [7,] -1.67880055 3.98259408 [8,] -1.91348226 -1.67880055 [9,] 2.54466498 -1.91348226 [10,] 0.95397653 2.54466498 [11,] -0.11776325 0.95397653 [12,] 0.37748048 -0.11776325 [13,] 0.70906937 0.37748048 [14,] -0.21467044 0.70906937 [15,] -0.06544077 -0.21467044 [16,] 0.58227827 -0.06544077 [17,] 3.96891849 0.58227827 [18,] 2.30050739 3.96891849 [19,] 0.83241874 2.30050739 [20,] 0.76317503 0.83241874 [21,] 1.04442911 0.76317503 [22,] 2.41758984 1.04442911 [23,] 0.92880913 2.41758984 [24,] 2.48984642 0.92880913 [25,] -0.10857140 2.48984642 [26,] 1.27585678 -0.10857140 [27,] -1.16036869 1.27585678 [28,] 0.82468936 -1.16036869 [29,] -0.30012248 0.82468936 [30,] -0.46627337 -0.30012248 [31,] -0.23955381 -0.46627337 [32,] -0.93615359 -0.23955381 [33,] 0.40839799 -0.93615359 [34,] -1.38732101 0.40839799 [35,] -5.96028740 -1.38732101 [36,] -0.86139254 -5.96028740 [37,] -1.70920126 -0.86139254 [38,] 1.94280541 -1.70920126 [39,] 1.28358616 1.94280541 [40,] 0.96170591 1.28358616 [41,] -1.28518052 0.96170591 [42,] 2.03169919 -1.28518052 [43,] -0.30785185 2.03169919 [44,] -0.94388297 -0.30785185 [45,] -4.71693064 -0.94388297 [46,] -2.77896177 -4.71693064 [47,] 0.06186714 -2.77896177 [48,] 1.14081950 0.06186714 [49,] -2.03108151 1.14081950 [50,] -0.56120129 -2.03108151 [51,] 0.02175777 -0.56120129 [52,] -2.65687878 0.02175777 [53,] 0.17122021 -2.65687878 [54,] -2.56666737 0.17122021 [55,] 1.44252448 -2.56666737 [56,] 0.06332961 1.44252448 [57,] 0.75346638 0.06332961 [58,] -0.47975286 0.75346638 [59,] 1.79428864 -0.47975286 [60,] 0.48513831 1.79428864 [61,] 0.07105899 0.48513831 [62,] -0.57666005 0.07105899 [63,] -0.41197162 -0.57666005 [64,] 0.61267899 -0.41197162 [65,] 0.75492885 0.61267899 [66,] 1.71430268 0.75492885 [67,] 3.49361726 1.71430268 [68,] -3.93667039 3.49361726 [69,] 0.60494961 -3.93667039 [70,] -3.65240344 0.60494961 [71,] -0.30983112 -3.65240344 [72,] 1.52548045 -0.30983112 [73,] 0.77957945 1.52548045 [74,] 0.40839799 0.77957945 [75,] 3.30697040 0.40839799 [76,] -0.26052991 3.30697040 [77,] 1.56484024 -0.26052991 [78,] -1.72810176 1.56484024 [79,] -0.12549263 -1.72810176 [80,] 0.51826787 -0.12549263 [81,] 3.97664787 0.51826787 [82,] 0.09424712 3.97664787 [83,] -0.81907114 0.09424712 [84,] 0.27387751 -0.81907114 [85,] 1.80974740 0.27387751 [86,] -0.19600271 1.80974740 [87,] 0.62040836 -0.19600271 [88,] 1.36630936 0.62040836 [89,] 0.64181333 1.36630936 [90,] -1.42691358 0.64181333 [91,] -0.03357758 -1.42691358 [92,] 0.50280911 -0.03357758 [93,] 0.03669973 0.50280911 [94,] -2.14439313 0.03669973 [95,] 0.94624715 -2.14439313 [96,] 0.04589158 0.94624715 [97,] 1.92932593 0.04589158 [98,] 0.07878837 1.92932593 [99,] -0.38680421 0.07878837 [100,] -1.22042055 -0.38680421 [101,] 1.13309012 -1.22042055 [102,] 2.66000093 1.13309012 [103,] 0.17173701 2.66000093 [104,] 1.57256962 0.17173701 [105,] -2.43369729 1.57256962 [106,] 0.96891849 -2.43369729 [107,] 0.15001135 0.96891849 [108,] 1.14081950 0.15001135 [109,] -0.53460808 1.14081950 [110,] 1.15429898 -0.53460808 [111,] 0.05937107 1.15429898 [112,] 2.17173701 0.05937107 [113,] -1.41970100 2.17173701 [114,] -2.73187260 -1.41970100 [115,] 1.43304860 -2.73187260 [116,] -1.71890991 1.43304860 [117,] 0.78707606 -1.71890991 [118,] -2.14241386 0.78707606 [119,] 0.37748048 -2.14241386 [120,] -1.52957088 0.37748048 [121,] 0.50082984 -1.52957088 [122,] -3.03108151 0.50082984 [123,] -1.31483166 -3.03108151 [124,] -1.02533140 -1.31483166 [125,] -0.89279019 -1.02533140 [126,] -0.36017434 -0.89279019 [127,] 0.75115801 -0.36017434 [128,] 1.14906568 0.75115801 [129,] -2.95359162 1.14906568 [130,] 1.71533628 -2.95359162 [131,] -3.46951901 1.71533628 [132,] 1.82143532 -3.46951901 [133,] -1.87035162 1.82143532 [134,] -1.81907114 -1.87035162 [135,] -0.06544077 -1.81907114 [136,] 0.92410101 -0.06544077 [137,] 0.25841875 0.92410101 [138,] -2.55422148 0.25841875 [139,] -1.52707480 -2.55422148 [140,] -5.52905408 -1.52707480 [141,] 2.70039433 -5.52905408 [142,] 1.78509679 2.70039433 [143,] 0.31922018 1.78509679 [144,] 1.38374739 0.31922018 [145,] -4.07642418 1.38374739 [146,] 2.18667897 -4.07642418 [147,] -2.60706077 2.18667897 [148,] 0.62813774 -2.60706077 [149,] -0.25355010 0.62813774 [150,] -3.21094466 -0.25355010 [151,] -1.40131730 -3.21094466 [152,] 1.83491481 -1.40131730 [153,] 3.66226423 1.83491481 [154,] 1.29004917 3.66226423 [155,] -2.59235158 1.29004917 [156,] -0.03357758 -2.59235158 [157,] 1.19615485 -0.03357758 [158,] 1.14906568 1.19615485 [159,] 0.74771627 1.14906568 [160,] -0.48248170 0.74771627 [161,] 0.09349755 -0.48248170 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.40264788 -3.25855064 2 2.52350117 0.40264788 3 3.10174373 2.52350117 4 -1.11379631 3.10174373 5 -1.51213285 -1.11379631 6 3.98259408 -1.51213285 7 -1.67880055 3.98259408 8 -1.91348226 -1.67880055 9 2.54466498 -1.91348226 10 0.95397653 2.54466498 11 -0.11776325 0.95397653 12 0.37748048 -0.11776325 13 0.70906937 0.37748048 14 -0.21467044 0.70906937 15 -0.06544077 -0.21467044 16 0.58227827 -0.06544077 17 3.96891849 0.58227827 18 2.30050739 3.96891849 19 0.83241874 2.30050739 20 0.76317503 0.83241874 21 1.04442911 0.76317503 22 2.41758984 1.04442911 23 0.92880913 2.41758984 24 2.48984642 0.92880913 25 -0.10857140 2.48984642 26 1.27585678 -0.10857140 27 -1.16036869 1.27585678 28 0.82468936 -1.16036869 29 -0.30012248 0.82468936 30 -0.46627337 -0.30012248 31 -0.23955381 -0.46627337 32 -0.93615359 -0.23955381 33 0.40839799 -0.93615359 34 -1.38732101 0.40839799 35 -5.96028740 -1.38732101 36 -0.86139254 -5.96028740 37 -1.70920126 -0.86139254 38 1.94280541 -1.70920126 39 1.28358616 1.94280541 40 0.96170591 1.28358616 41 -1.28518052 0.96170591 42 2.03169919 -1.28518052 43 -0.30785185 2.03169919 44 -0.94388297 -0.30785185 45 -4.71693064 -0.94388297 46 -2.77896177 -4.71693064 47 0.06186714 -2.77896177 48 1.14081950 0.06186714 49 -2.03108151 1.14081950 50 -0.56120129 -2.03108151 51 0.02175777 -0.56120129 52 -2.65687878 0.02175777 53 0.17122021 -2.65687878 54 -2.56666737 0.17122021 55 1.44252448 -2.56666737 56 0.06332961 1.44252448 57 0.75346638 0.06332961 58 -0.47975286 0.75346638 59 1.79428864 -0.47975286 60 0.48513831 1.79428864 61 0.07105899 0.48513831 62 -0.57666005 0.07105899 63 -0.41197162 -0.57666005 64 0.61267899 -0.41197162 65 0.75492885 0.61267899 66 1.71430268 0.75492885 67 3.49361726 1.71430268 68 -3.93667039 3.49361726 69 0.60494961 -3.93667039 70 -3.65240344 0.60494961 71 -0.30983112 -3.65240344 72 1.52548045 -0.30983112 73 0.77957945 1.52548045 74 0.40839799 0.77957945 75 3.30697040 0.40839799 76 -0.26052991 3.30697040 77 1.56484024 -0.26052991 78 -1.72810176 1.56484024 79 -0.12549263 -1.72810176 80 0.51826787 -0.12549263 81 3.97664787 0.51826787 82 0.09424712 3.97664787 83 -0.81907114 0.09424712 84 0.27387751 -0.81907114 85 1.80974740 0.27387751 86 -0.19600271 1.80974740 87 0.62040836 -0.19600271 88 1.36630936 0.62040836 89 0.64181333 1.36630936 90 -1.42691358 0.64181333 91 -0.03357758 -1.42691358 92 0.50280911 -0.03357758 93 0.03669973 0.50280911 94 -2.14439313 0.03669973 95 0.94624715 -2.14439313 96 0.04589158 0.94624715 97 1.92932593 0.04589158 98 0.07878837 1.92932593 99 -0.38680421 0.07878837 100 -1.22042055 -0.38680421 101 1.13309012 -1.22042055 102 2.66000093 1.13309012 103 0.17173701 2.66000093 104 1.57256962 0.17173701 105 -2.43369729 1.57256962 106 0.96891849 -2.43369729 107 0.15001135 0.96891849 108 1.14081950 0.15001135 109 -0.53460808 1.14081950 110 1.15429898 -0.53460808 111 0.05937107 1.15429898 112 2.17173701 0.05937107 113 -1.41970100 2.17173701 114 -2.73187260 -1.41970100 115 1.43304860 -2.73187260 116 -1.71890991 1.43304860 117 0.78707606 -1.71890991 118 -2.14241386 0.78707606 119 0.37748048 -2.14241386 120 -1.52957088 0.37748048 121 0.50082984 -1.52957088 122 -3.03108151 0.50082984 123 -1.31483166 -3.03108151 124 -1.02533140 -1.31483166 125 -0.89279019 -1.02533140 126 -0.36017434 -0.89279019 127 0.75115801 -0.36017434 128 1.14906568 0.75115801 129 -2.95359162 1.14906568 130 1.71533628 -2.95359162 131 -3.46951901 1.71533628 132 1.82143532 -3.46951901 133 -1.87035162 1.82143532 134 -1.81907114 -1.87035162 135 -0.06544077 -1.81907114 136 0.92410101 -0.06544077 137 0.25841875 0.92410101 138 -2.55422148 0.25841875 139 -1.52707480 -2.55422148 140 -5.52905408 -1.52707480 141 2.70039433 -5.52905408 142 1.78509679 2.70039433 143 0.31922018 1.78509679 144 1.38374739 0.31922018 145 -4.07642418 1.38374739 146 2.18667897 -4.07642418 147 -2.60706077 2.18667897 148 0.62813774 -2.60706077 149 -0.25355010 0.62813774 150 -3.21094466 -0.25355010 151 -1.40131730 -3.21094466 152 1.83491481 -1.40131730 153 3.66226423 1.83491481 154 1.29004917 3.66226423 155 -2.59235158 1.29004917 156 -0.03357758 -2.59235158 157 1.19615485 -0.03357758 158 1.14906568 1.19615485 159 0.74771627 1.14906568 160 -0.48248170 0.74771627 161 0.09349755 -0.48248170 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7k5xy1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8pp2q1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9zchb1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10b7je1351952601.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11ou981351952601.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12n6ch1351952601.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13pb821351952601.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14942i1351952601.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/151qvh1351952601.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16199a1351952601.tab") + } > > try(system("convert tmp/1knfb1351952601.ps tmp/1knfb1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/2rj5r1351952601.ps tmp/2rj5r1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/37d371351952601.ps tmp/37d371351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/44mq81351952601.ps tmp/44mq81351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/52oyv1351952601.ps tmp/52oyv1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/6vnsw1351952601.ps tmp/6vnsw1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/7k5xy1351952601.ps tmp/7k5xy1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/8pp2q1351952601.ps tmp/8pp2q1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/9zchb1351952601.ps tmp/9zchb1351952601.png",intern=TRUE)) character(0) > try(system("convert tmp/10b7je1351952601.ps tmp/10b7je1351952601.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.653 1.151 8.844