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(41 + ,12 + ,14 + ,12 + ,39 + ,11 + ,18 + ,11 + ,30 + ,15 + ,11 + ,14 + ,31 + ,6 + ,12 + ,12 + ,34 + ,13 + ,16 + ,21 + ,35 + ,10 + ,18 + ,12 + ,39 + ,12 + ,14 + ,22 + ,34 + ,14 + ,14 + ,11 + ,36 + ,12 + ,15 + ,10 + ,37 + ,6 + ,15 + ,13 + ,38 + ,10 + ,17 + ,10 + ,36 + ,12 + ,19 + ,8 + ,38 + ,12 + ,10 + ,15 + ,39 + ,11 + ,16 + ,14 + ,33 + ,15 + ,18 + ,10 + ,32 + ,12 + ,14 + ,14 + ,36 + ,10 + ,14 + ,14 + ,38 + ,12 + ,17 + ,11 + ,39 + ,11 + ,14 + ,10 + ,32 + ,12 + ,16 + ,13 + ,32 + ,11 + ,18 + ,7 + ,31 + ,12 + ,11 + ,14 + ,39 + ,13 + ,14 + ,12 + ,37 + ,11 + ,12 + ,14 + ,39 + ,9 + ,17 + ,11 + ,41 + ,13 + ,9 + ,9 + ,36 + ,10 + ,16 + ,11 + ,33 + ,14 + ,14 + ,15 + ,33 + ,12 + ,15 + ,14 + ,34 + ,10 + ,11 + ,13 + ,31 + ,12 + ,16 + ,9 + ,27 + ,8 + ,13 + ,15 + ,37 + ,10 + ,17 + ,10 + ,34 + ,12 + ,15 + ,11 + ,34 + ,12 + ,14 + ,13 + ,32 + ,7 + ,16 + ,8 + ,29 + ,6 + ,9 + ,20 + ,36 + ,12 + ,15 + ,12 + ,29 + ,10 + ,17 + ,10 + ,35 + ,10 + ,13 + ,10 + ,37 + ,10 + ,15 + ,9 + ,34 + ,12 + ,16 + ,14 + ,38 + ,15 + ,16 + ,8 + ,35 + ,10 + ,12 + ,14 + ,38 + ,10 + ,12 + ,11 + ,37 + ,12 + ,11 + ,13 + ,38 + ,13 + ,15 + ,9 + ,33 + ,11 + ,15 + ,11 + ,36 + ,11 + ,17 + ,15 + ,38 + ,12 + ,13 + ,11 + ,32 + ,14 + ,16 + ,10 + ,32 + ,10 + ,14 + ,14 + ,32 + ,12 + ,11 + ,18 + ,34 + ,13 + ,12 + ,14 + ,32 + ,5 + ,12 + ,11 + ,37 + ,6 + ,15 + ,12 + ,39 + ,12 + ,16 + ,13 + ,29 + ,12 + ,15 + ,9 + ,37 + ,11 + ,12 + ,10 + ,35 + ,10 + ,12 + ,15 + ,30 + ,7 + ,8 + ,20 + ,38 + ,12 + ,13 + ,12 + ,34 + ,14 + ,11 + ,12 + ,31 + ,11 + ,14 + ,14 + ,34 + ,12 + ,15 + ,13 + ,35 + ,13 + ,10 + ,11 + ,36 + ,14 + ,11 + ,17 + ,30 + ,11 + ,12 + ,12 + ,39 + ,12 + ,15 + ,13 + ,35 + ,12 + ,15 + ,14 + ,38 + ,8 + ,14 + ,13 + ,31 + ,11 + ,16 + ,15 + ,34 + ,14 + ,15 + ,13 + ,38 + ,14 + ,15 + ,10 + ,34 + ,12 + ,13 + ,11 + ,39 + ,9 + ,12 + ,19 + ,37 + ,13 + ,17 + ,13 + ,34 + ,11 + ,13 + ,17 + ,28 + ,12 + ,15 + ,13 + ,37 + ,12 + ,13 + ,9 + ,33 + ,12 + ,15 + ,11 + ,37 + ,12 + ,16 + ,10 + ,35 + ,12 + ,15 + ,9 + ,37 + ,12 + ,16 + ,12 + ,32 + ,11 + ,15 + ,12 + ,33 + ,10 + ,14 + ,13 + ,38 + ,9 + ,15 + ,13 + ,33 + ,12 + ,14 + ,12 + ,29 + ,12 + ,13 + ,15 + ,33 + ,12 + ,7 + ,22 + ,31 + ,9 + ,17 + ,13 + ,36 + ,15 + ,13 + ,15 + ,35 + ,12 + ,15 + ,13 + ,32 + ,12 + ,14 + ,15 + ,29 + ,12 + ,13 + ,10 + ,39 + ,10 + ,16 + ,11 + ,37 + ,13 + ,12 + ,16 + ,35 + ,9 + ,14 + ,11 + ,37 + ,12 + ,17 + ,11 + ,32 + ,10 + ,15 + ,10 + ,38 + ,14 + ,17 + ,10 + ,37 + ,11 + ,12 + ,16 + ,36 + ,15 + ,16 + ,12 + ,32 + ,11 + ,11 + ,11 + ,33 + ,11 + ,15 + ,16 + ,40 + ,12 + ,9 + ,19 + ,38 + ,12 + ,16 + ,11 + ,41 + ,12 + ,15 + ,16 + ,36 + ,11 + ,10 + ,15 + ,43 + ,7 + ,10 + ,24 + ,30 + ,12 + ,15 + ,14 + ,31 + ,14 + ,11 + ,15 + ,32 + ,11 + ,13 + ,11 + ,32 + ,11 + ,14 + ,15 + ,37 + ,10 + ,18 + ,12 + ,37 + ,13 + ,16 + ,10 + ,33 + ,13 + ,14 + ,14 + ,34 + ,8 + ,14 + ,13 + ,33 + ,11 + ,14 + ,9 + ,38 + ,12 + ,14 + ,15 + ,33 + ,11 + ,12 + ,15 + ,31 + ,13 + ,14 + ,14 + ,38 + ,12 + ,15 + ,11 + ,37 + ,14 + ,15 + ,8 + ,33 + ,13 + ,15 + ,11 + ,31 + ,15 + ,13 + ,11 + ,39 + ,10 + ,17 + ,8 + ,44 + ,11 + ,17 + ,10 + ,33 + ,9 + ,19 + ,11 + ,35 + ,11 + ,15 + ,13 + ,32 + ,10 + ,13 + ,11 + ,28 + ,11 + ,9 + ,20 + ,40 + ,8 + ,15 + ,10 + ,27 + ,11 + ,15 + ,15 + ,37 + ,12 + ,15 + ,12 + ,32 + ,12 + ,16 + ,14 + ,28 + ,9 + ,11 + ,23 + ,34 + ,11 + ,14 + ,14 + ,30 + ,10 + ,11 + ,16 + ,35 + ,8 + ,15 + ,11 + ,31 + ,9 + ,13 + ,12 + ,32 + ,8 + ,15 + ,10 + ,30 + ,9 + ,16 + ,14 + ,30 + ,15 + ,14 + ,12 + ,31 + ,11 + ,15 + ,12 + ,40 + ,8 + ,16 + ,11 + ,32 + ,13 + ,16 + ,12 + ,36 + ,12 + ,11 + ,13 + ,32 + ,12 + ,12 + ,11 + ,35 + ,9 + ,9 + ,19 + ,38 + ,7 + ,16 + ,12 + ,42 + ,13 + ,13 + ,17 + ,34 + ,9 + ,16 + ,9 + ,35 + ,6 + ,12 + ,12 + ,35 + ,8 + ,9 + ,19 + ,33 + ,8 + ,13 + ,18 + ,36 + ,15 + ,13 + ,15 + ,32 + ,6 + ,14 + ,14 + ,33 + ,9 + ,19 + ,11 + ,34 + ,11 + ,13 + ,9 + ,32 + ,8 + ,12 + ,18 + ,34 + ,8 + ,13 + ,16) + ,dim=c(4 + ,162) + ,dimnames=list(c('Connected' + ,'Software' + ,'Happiness' + ,'Depression') + ,1:162)) > y <- array(NA,dim=c(4,162),dimnames=list(c('Connected','Software','Happiness','Depression'),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 = '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 Connected Software Happiness Depression 1 41 12 14 12 2 39 11 18 11 3 30 15 11 14 4 31 6 12 12 5 34 13 16 21 6 35 10 18 12 7 39 12 14 22 8 34 14 14 11 9 36 12 15 10 10 37 6 15 13 11 38 10 17 10 12 36 12 19 8 13 38 12 10 15 14 39 11 16 14 15 33 15 18 10 16 32 12 14 14 17 36 10 14 14 18 38 12 17 11 19 39 11 14 10 20 32 12 16 13 21 32 11 18 7 22 31 12 11 14 23 39 13 14 12 24 37 11 12 14 25 39 9 17 11 26 41 13 9 9 27 36 10 16 11 28 33 14 14 15 29 33 12 15 14 30 34 10 11 13 31 31 12 16 9 32 27 8 13 15 33 37 10 17 10 34 34 12 15 11 35 34 12 14 13 36 32 7 16 8 37 29 6 9 20 38 36 12 15 12 39 29 10 17 10 40 35 10 13 10 41 37 10 15 9 42 34 12 16 14 43 38 15 16 8 44 35 10 12 14 45 38 10 12 11 46 37 12 11 13 47 38 13 15 9 48 33 11 15 11 49 36 11 17 15 50 38 12 13 11 51 32 14 16 10 52 32 10 14 14 53 32 12 11 18 54 34 13 12 14 55 32 5 12 11 56 37 6 15 12 57 39 12 16 13 58 29 12 15 9 59 37 11 12 10 60 35 10 12 15 61 30 7 8 20 62 38 12 13 12 63 34 14 11 12 64 31 11 14 14 65 34 12 15 13 66 35 13 10 11 67 36 14 11 17 68 30 11 12 12 69 39 12 15 13 70 35 12 15 14 71 38 8 14 13 72 31 11 16 15 73 34 14 15 13 74 38 14 15 10 75 34 12 13 11 76 39 9 12 19 77 37 13 17 13 78 34 11 13 17 79 28 12 15 13 80 37 12 13 9 81 33 12 15 11 82 37 12 16 10 83 35 12 15 9 84 37 12 16 12 85 32 11 15 12 86 33 10 14 13 87 38 9 15 13 88 33 12 14 12 89 29 12 13 15 90 33 12 7 22 91 31 9 17 13 92 36 15 13 15 93 35 12 15 13 94 32 12 14 15 95 29 12 13 10 96 39 10 16 11 97 37 13 12 16 98 35 9 14 11 99 37 12 17 11 100 32 10 15 10 101 38 14 17 10 102 37 11 12 16 103 36 15 16 12 104 32 11 11 11 105 33 11 15 16 106 40 12 9 19 107 38 12 16 11 108 41 12 15 16 109 36 11 10 15 110 43 7 10 24 111 30 12 15 14 112 31 14 11 15 113 32 11 13 11 114 32 11 14 15 115 37 10 18 12 116 37 13 16 10 117 33 13 14 14 118 34 8 14 13 119 33 11 14 9 120 38 12 14 15 121 33 11 12 15 122 31 13 14 14 123 38 12 15 11 124 37 14 15 8 125 33 13 15 11 126 31 15 13 11 127 39 10 17 8 128 44 11 17 10 129 33 9 19 11 130 35 11 15 13 131 32 10 13 11 132 28 11 9 20 133 40 8 15 10 134 27 11 15 15 135 37 12 15 12 136 32 12 16 14 137 28 9 11 23 138 34 11 14 14 139 30 10 11 16 140 35 8 15 11 141 31 9 13 12 142 32 8 15 10 143 30 9 16 14 144 30 15 14 12 145 31 11 15 12 146 40 8 16 11 147 32 13 16 12 148 36 12 11 13 149 32 12 12 11 150 35 9 9 19 151 38 7 16 12 152 42 13 13 17 153 34 9 16 9 154 35 6 12 12 155 35 8 9 19 156 33 8 13 18 157 36 15 13 15 158 32 6 14 14 159 33 9 19 11 160 34 11 13 9 161 32 8 12 18 162 34 8 13 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Software Happiness Depression 32.33199 0.07369 0.15841 -0.05781 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.65165 -2.54786 -0.06607 2.53125 9.95551 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 32.33199 3.21373 10.061 <2e-16 *** Software 0.07369 0.12493 0.590 0.556 Happiness 0.15841 0.13519 1.172 0.243 Depression -0.05781 0.10046 -0.575 0.566 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.364 on 158 degrees of freedom Multiple R-squared: 0.02509, Adjusted R-squared: 0.006576 F-statistic: 1.355 on 3 and 158 DF, p-value: 0.2586 > 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.92965908 0.14068185 0.070340925 [2,] 0.87065910 0.25868181 0.129340904 [3,] 0.78924780 0.42150440 0.210752199 [4,] 0.70925744 0.58148511 0.290742555 [5,] 0.61171628 0.77656745 0.388283725 [6,] 0.54641413 0.90717174 0.453585868 [7,] 0.61550242 0.76899516 0.384497582 [8,] 0.57228355 0.85543290 0.427716450 [9,] 0.56264312 0.87471376 0.437356880 [10,] 0.56367515 0.87264970 0.436324849 [11,] 0.48045303 0.96090606 0.519546972 [12,] 0.42704442 0.85408884 0.572955582 [13,] 0.44554170 0.89108340 0.554458301 [14,] 0.47777609 0.95555219 0.522223907 [15,] 0.50318223 0.99363554 0.496817770 [16,] 0.50402607 0.99194786 0.495973928 [17,] 0.54238850 0.91522299 0.457611497 [18,] 0.49833186 0.99666372 0.501668140 [19,] 0.47411112 0.94822225 0.525888877 [20,] 0.63711736 0.72576528 0.362882639 [21,] 0.57650189 0.84699623 0.423498114 [22,] 0.54167557 0.91664886 0.458324431 [23,] 0.51334779 0.97330442 0.486652210 [24,] 0.46956396 0.93912792 0.530436039 [25,] 0.52157943 0.95684114 0.478420568 [26,] 0.77557833 0.44884334 0.224421671 [27,] 0.73809667 0.52380666 0.261903328 [28,] 0.69692863 0.60614275 0.303071374 [29,] 0.65061558 0.69876884 0.349384422 [30,] 0.64541360 0.70917280 0.354586401 [31,] 0.66413922 0.67172156 0.335860780 [32,] 0.61542631 0.76914738 0.384573691 [33,] 0.72509472 0.54981057 0.274905283 [34,] 0.67892283 0.64215434 0.321077171 [35,] 0.64644229 0.70711542 0.353557708 [36,] 0.60073036 0.79853929 0.399269644 [37,] 0.56490673 0.87018653 0.435093267 [38,] 0.51548157 0.96903686 0.484518429 [39,] 0.51522376 0.96955247 0.484776235 [40,] 0.48706717 0.97413435 0.512932827 [41,] 0.46021890 0.92043780 0.539781098 [42,] 0.43010249 0.86020498 0.569897508 [43,] 0.38711741 0.77423483 0.612882587 [44,] 0.37449959 0.74899919 0.625500407 [45,] 0.39116689 0.78233379 0.608833107 [46,] 0.37018286 0.74036572 0.629817140 [47,] 0.34296153 0.68592306 0.657038471 [48,] 0.30197694 0.60395388 0.698023060 [49,] 0.27107799 0.54215599 0.728922006 [50,] 0.26181980 0.52363959 0.738180203 [51,] 0.27604962 0.55209925 0.723950376 [52,] 0.38877068 0.77754137 0.611229317 [53,] 0.36472047 0.72944094 0.635279532 [54,] 0.32321722 0.64643444 0.676782781 [55,] 0.31040808 0.62081617 0.689591915 [56,] 0.30685008 0.61370017 0.693149917 [57,] 0.27128550 0.54257100 0.728714500 [58,] 0.27647224 0.55294448 0.723527759 [59,] 0.24122640 0.48245281 0.758773597 [60,] 0.20902790 0.41805580 0.790972099 [61,] 0.18570925 0.37141850 0.814290751 [62,] 0.21001288 0.42002577 0.789987117 [63,] 0.22674341 0.45348683 0.773256586 [64,] 0.19337658 0.38675316 0.806623420 [65,] 0.20063740 0.40127480 0.799362601 [66,] 0.20986935 0.41973871 0.790130646 [67,] 0.18183350 0.36366700 0.818166501 [68,] 0.17222638 0.34445275 0.827773624 [69,] 0.14637130 0.29274261 0.853628696 [70,] 0.18849778 0.37699556 0.811502218 [71,] 0.16630932 0.33261864 0.833690680 [72,] 0.13938949 0.27877899 0.860610506 [73,] 0.23487826 0.46975653 0.765121736 [74,] 0.21762896 0.43525793 0.782371037 [75,] 0.19603474 0.39206949 0.803965257 [76,] 0.17484221 0.34968442 0.825157788 [77,] 0.14764573 0.29529147 0.852354266 [78,] 0.13078010 0.26156020 0.869219901 [79,] 0.12317556 0.24635111 0.876824443 [80,] 0.10532630 0.21065260 0.894673701 [81,] 0.10560908 0.21121816 0.894390921 [82,] 0.09089040 0.18178080 0.909109600 [83,] 0.12230715 0.24461429 0.877692854 [84,] 0.10055413 0.20110825 0.899445873 [85,] 0.10833350 0.21666700 0.891666500 [86,] 0.09199909 0.18399819 0.908000907 [87,] 0.07446526 0.14893053 0.925534737 [88,] 0.06755507 0.13511013 0.932444934 [89,] 0.09589483 0.19178967 0.904105166 [90,] 0.10386974 0.20773949 0.896130257 [91,] 0.09726994 0.19453988 0.902730061 [92,] 0.07912689 0.15825377 0.920873114 [93,] 0.06725960 0.13451921 0.932740397 [94,] 0.06211529 0.12423058 0.937884709 [95,] 0.05687968 0.11375937 0.943120316 [96,] 0.05350741 0.10701481 0.946492594 [97,] 0.04319802 0.08639605 0.956801975 [98,] 0.03681199 0.07362397 0.963188013 [99,] 0.02973715 0.05947429 0.970262853 [100,] 0.06000665 0.12001330 0.939993352 [101,] 0.05731937 0.11463874 0.942680629 [102,] 0.10645547 0.21291094 0.893544532 [103,] 0.09691343 0.19382686 0.903086571 [104,] 0.40948838 0.81897676 0.590511618 [105,] 0.43818037 0.87636074 0.561819631 [106,] 0.41686454 0.83372909 0.583135456 [107,] 0.39448038 0.78896077 0.605519615 [108,] 0.36333251 0.72666503 0.636667485 [109,] 0.33155195 0.66310390 0.668448051 [110,] 0.30111959 0.60223918 0.698880409 [111,] 0.26327629 0.52655258 0.736723708 [112,] 0.22344773 0.44689546 0.776552271 [113,] 0.20057705 0.40115410 0.799422951 [114,] 0.22601161 0.45202322 0.773988391 [115,] 0.19073330 0.38146660 0.809266700 [116,] 0.18040091 0.36080181 0.819599095 [117,] 0.17759401 0.35518803 0.822405987 [118,] 0.15341865 0.30683731 0.846581347 [119,] 0.12892876 0.25785751 0.871071243 [120,] 0.12723403 0.25446807 0.872765966 [121,] 0.12452806 0.24905612 0.875471938 [122,] 0.39051647 0.78103293 0.609483533 [123,] 0.34624517 0.69249033 0.653754833 [124,] 0.30236038 0.60472077 0.697639617 [125,] 0.27800572 0.55601143 0.721994284 [126,] 0.31802922 0.63605844 0.681970781 [127,] 0.40619892 0.81239783 0.593801084 [128,] 0.56936147 0.86127707 0.430638534 [129,] 0.56005390 0.87989219 0.439946096 [130,] 0.51095473 0.97809054 0.489045270 [131,] 0.62826718 0.74346564 0.371732822 [132,] 0.56186395 0.87627209 0.438136045 [133,] 0.60002797 0.79994406 0.399972031 [134,] 0.54064922 0.91870157 0.459350785 [135,] 0.52255680 0.95488640 0.477443199 [136,] 0.47077706 0.94155411 0.529222944 [137,] 0.52077045 0.95845911 0.479229555 [138,] 0.58945842 0.82108317 0.410541584 [139,] 0.62103274 0.75793452 0.378967261 [140,] 0.79303722 0.41392556 0.206962781 [141,] 0.81835607 0.36328786 0.181643931 [142,] 0.75278378 0.49443244 0.247216221 [143,] 0.76599194 0.46801612 0.234008059 [144,] 0.67605694 0.64788613 0.323943063 [145,] 0.81185227 0.37629546 0.188147730 [146,] 0.99596561 0.00806877 0.004034385 [147,] 0.98707857 0.02584286 0.012921431 [148,] 0.98591172 0.02817655 0.014088277 [149,] 0.98014788 0.03970424 0.019852119 > postscript(file="/var/www/html/freestat/rcomp/tmp/1jcg91290549709.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/freestat/rcomp/tmp/2c3fu1290549709.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/freestat/rcomp/tmp/3c3fu1290549709.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/freestat/rcomp/tmp/4c3fu1290549709.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/freestat/rcomp/tmp/5c3fu1290549709.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 = 162 Frequency = 1 1 2 3 4 5 6 6.25963825 3.64185977 -4.37057169 -2.98137391 -0.61057226 -0.22663473 7 8 9 10 11 12 4.83776278 -0.94556031 0.98559857 2.60119424 2.81615514 0.23631459 13 14 15 16 17 18 4.06673469 4.13212667 -2.71072489 -2.62473684 1.52264926 2.72658149 19 20 21 22 23 24 4.21770639 -2.99937884 -3.58939004 -3.14949254 4.18594520 2.76578575 25 26 27 28 29 30 3.94766064 6.80458169 1.03238236 -1.71431049 -1.78315161 -0.05991889 31 32 33 34 35 36 -4.23062865 -7.11373742 1.81615514 -0.95658897 -0.68254930 -2.91997585 37 38 39 40 41 42 -4.04362997 1.10122348 -6.18384486 0.44981421 2.07517222 -0.94156638 43 44 45 46 47 48 2.49047974 0.83947880 3.66604144 2.79269501 2.85409307 -1.88289592 49 50 51 52 53 54 1.03152435 3.36024057 -3.32020230 -2.47735074 -1.91824272 -0.38160036 55 56 57 58 59 60 -1.96549331 2.54338178 4.00062116 -6.07221388 2.53453593 0.89729125 61 62 63 64 65 66 -2.95890825 3.41805302 -0.41250354 -3.55104379 -0.84096407 0.76179182 67 68 69 70 71 72 1.87655872 -4.34983916 4.15903593 0.21684839 3.61222291 -3.81006088 73 74 75 76 77 78 -0.98835017 2.83821247 -0.63975943 5.20223411 1.76851334 -0.21919167 79 80 81 82 83 84 -6.84096407 2.24461566 -1.95658897 1.82718380 -0.07221388 1.94280871 85 86 87 88 89 90 -2.82508347 -1.53516320 3.38011508 -1.74036175 -5.40850962 -0.05333383 91 92 93 94 95 96 -3.93671446 1.37041123 0.15903593 -2.56692439 -5.69757189 4.03238236 97 98 99 100 101 102 2.73402455 0.42290495 1.72658149 -2.86701533 2.52138293 2.88141065 103 104 105 106 107 108 0.72172956 -2.24923684 -1.59383366 6.45639927 2.88499626 6.33247329 109 110 111 112 113 114 2.14042774 9.95551202 -4.78315161 -3.23906618 -2.56606638 -2.49323134 115 116 117 118 119 120 1.77336527 1.75349075 -1.69842990 -0.38777709 -1.84010606 3.43307561 121 122 123 124 125 126 -1.17640180 -3.69842990 3.04341103 1.72258757 -2.03028202 -3.86083859 127 128 129 130 131 132 3.70053023 8.74246208 -2.36916890 0.23272898 -2.49237333 -5.41209523 133 134 135 136 137 138 5.28037078 -7.65164611 2.10122348 -2.94156638 -5.40810131 -0.55104379 139 140 141 142 143 144 -3.88648153 0.33818323 -3.36086783 -2.71962922 -4.72048723 -4.96144090 145 146 147 148 149 150 -3.82508347 5.17976846 -3.13088434 1.79269501 -2.48134466 1.67747842 151 152 153 154 155 156 3.31127396 7.63342223 -1.00954950 1.01862609 1.75117147 -0.94030006 157 158 159 160 161 162 1.37041123 -2.18257854 -2.36916890 -0.68169129 -1.78188529 -0.05592497 > postscript(file="/var/www/html/freestat/rcomp/tmp/6muex1290549709.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 6.25963825 NA 1 3.64185977 6.25963825 2 -4.37057169 3.64185977 3 -2.98137391 -4.37057169 4 -0.61057226 -2.98137391 5 -0.22663473 -0.61057226 6 4.83776278 -0.22663473 7 -0.94556031 4.83776278 8 0.98559857 -0.94556031 9 2.60119424 0.98559857 10 2.81615514 2.60119424 11 0.23631459 2.81615514 12 4.06673469 0.23631459 13 4.13212667 4.06673469 14 -2.71072489 4.13212667 15 -2.62473684 -2.71072489 16 1.52264926 -2.62473684 17 2.72658149 1.52264926 18 4.21770639 2.72658149 19 -2.99937884 4.21770639 20 -3.58939004 -2.99937884 21 -3.14949254 -3.58939004 22 4.18594520 -3.14949254 23 2.76578575 4.18594520 24 3.94766064 2.76578575 25 6.80458169 3.94766064 26 1.03238236 6.80458169 27 -1.71431049 1.03238236 28 -1.78315161 -1.71431049 29 -0.05991889 -1.78315161 30 -4.23062865 -0.05991889 31 -7.11373742 -4.23062865 32 1.81615514 -7.11373742 33 -0.95658897 1.81615514 34 -0.68254930 -0.95658897 35 -2.91997585 -0.68254930 36 -4.04362997 -2.91997585 37 1.10122348 -4.04362997 38 -6.18384486 1.10122348 39 0.44981421 -6.18384486 40 2.07517222 0.44981421 41 -0.94156638 2.07517222 42 2.49047974 -0.94156638 43 0.83947880 2.49047974 44 3.66604144 0.83947880 45 2.79269501 3.66604144 46 2.85409307 2.79269501 47 -1.88289592 2.85409307 48 1.03152435 -1.88289592 49 3.36024057 1.03152435 50 -3.32020230 3.36024057 51 -2.47735074 -3.32020230 52 -1.91824272 -2.47735074 53 -0.38160036 -1.91824272 54 -1.96549331 -0.38160036 55 2.54338178 -1.96549331 56 4.00062116 2.54338178 57 -6.07221388 4.00062116 58 2.53453593 -6.07221388 59 0.89729125 2.53453593 60 -2.95890825 0.89729125 61 3.41805302 -2.95890825 62 -0.41250354 3.41805302 63 -3.55104379 -0.41250354 64 -0.84096407 -3.55104379 65 0.76179182 -0.84096407 66 1.87655872 0.76179182 67 -4.34983916 1.87655872 68 4.15903593 -4.34983916 69 0.21684839 4.15903593 70 3.61222291 0.21684839 71 -3.81006088 3.61222291 72 -0.98835017 -3.81006088 73 2.83821247 -0.98835017 74 -0.63975943 2.83821247 75 5.20223411 -0.63975943 76 1.76851334 5.20223411 77 -0.21919167 1.76851334 78 -6.84096407 -0.21919167 79 2.24461566 -6.84096407 80 -1.95658897 2.24461566 81 1.82718380 -1.95658897 82 -0.07221388 1.82718380 83 1.94280871 -0.07221388 84 -2.82508347 1.94280871 85 -1.53516320 -2.82508347 86 3.38011508 -1.53516320 87 -1.74036175 3.38011508 88 -5.40850962 -1.74036175 89 -0.05333383 -5.40850962 90 -3.93671446 -0.05333383 91 1.37041123 -3.93671446 92 0.15903593 1.37041123 93 -2.56692439 0.15903593 94 -5.69757189 -2.56692439 95 4.03238236 -5.69757189 96 2.73402455 4.03238236 97 0.42290495 2.73402455 98 1.72658149 0.42290495 99 -2.86701533 1.72658149 100 2.52138293 -2.86701533 101 2.88141065 2.52138293 102 0.72172956 2.88141065 103 -2.24923684 0.72172956 104 -1.59383366 -2.24923684 105 6.45639927 -1.59383366 106 2.88499626 6.45639927 107 6.33247329 2.88499626 108 2.14042774 6.33247329 109 9.95551202 2.14042774 110 -4.78315161 9.95551202 111 -3.23906618 -4.78315161 112 -2.56606638 -3.23906618 113 -2.49323134 -2.56606638 114 1.77336527 -2.49323134 115 1.75349075 1.77336527 116 -1.69842990 1.75349075 117 -0.38777709 -1.69842990 118 -1.84010606 -0.38777709 119 3.43307561 -1.84010606 120 -1.17640180 3.43307561 121 -3.69842990 -1.17640180 122 3.04341103 -3.69842990 123 1.72258757 3.04341103 124 -2.03028202 1.72258757 125 -3.86083859 -2.03028202 126 3.70053023 -3.86083859 127 8.74246208 3.70053023 128 -2.36916890 8.74246208 129 0.23272898 -2.36916890 130 -2.49237333 0.23272898 131 -5.41209523 -2.49237333 132 5.28037078 -5.41209523 133 -7.65164611 5.28037078 134 2.10122348 -7.65164611 135 -2.94156638 2.10122348 136 -5.40810131 -2.94156638 137 -0.55104379 -5.40810131 138 -3.88648153 -0.55104379 139 0.33818323 -3.88648153 140 -3.36086783 0.33818323 141 -2.71962922 -3.36086783 142 -4.72048723 -2.71962922 143 -4.96144090 -4.72048723 144 -3.82508347 -4.96144090 145 5.17976846 -3.82508347 146 -3.13088434 5.17976846 147 1.79269501 -3.13088434 148 -2.48134466 1.79269501 149 1.67747842 -2.48134466 150 3.31127396 1.67747842 151 7.63342223 3.31127396 152 -1.00954950 7.63342223 153 1.01862609 -1.00954950 154 1.75117147 1.01862609 155 -0.94030006 1.75117147 156 1.37041123 -0.94030006 157 -2.18257854 1.37041123 158 -2.36916890 -2.18257854 159 -0.68169129 -2.36916890 160 -1.78188529 -0.68169129 161 -0.05592497 -1.78188529 162 NA -0.05592497 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 3.64185977 6.25963825 [2,] -4.37057169 3.64185977 [3,] -2.98137391 -4.37057169 [4,] -0.61057226 -2.98137391 [5,] -0.22663473 -0.61057226 [6,] 4.83776278 -0.22663473 [7,] -0.94556031 4.83776278 [8,] 0.98559857 -0.94556031 [9,] 2.60119424 0.98559857 [10,] 2.81615514 2.60119424 [11,] 0.23631459 2.81615514 [12,] 4.06673469 0.23631459 [13,] 4.13212667 4.06673469 [14,] -2.71072489 4.13212667 [15,] -2.62473684 -2.71072489 [16,] 1.52264926 -2.62473684 [17,] 2.72658149 1.52264926 [18,] 4.21770639 2.72658149 [19,] -2.99937884 4.21770639 [20,] -3.58939004 -2.99937884 [21,] -3.14949254 -3.58939004 [22,] 4.18594520 -3.14949254 [23,] 2.76578575 4.18594520 [24,] 3.94766064 2.76578575 [25,] 6.80458169 3.94766064 [26,] 1.03238236 6.80458169 [27,] -1.71431049 1.03238236 [28,] -1.78315161 -1.71431049 [29,] -0.05991889 -1.78315161 [30,] -4.23062865 -0.05991889 [31,] -7.11373742 -4.23062865 [32,] 1.81615514 -7.11373742 [33,] -0.95658897 1.81615514 [34,] -0.68254930 -0.95658897 [35,] -2.91997585 -0.68254930 [36,] -4.04362997 -2.91997585 [37,] 1.10122348 -4.04362997 [38,] -6.18384486 1.10122348 [39,] 0.44981421 -6.18384486 [40,] 2.07517222 0.44981421 [41,] -0.94156638 2.07517222 [42,] 2.49047974 -0.94156638 [43,] 0.83947880 2.49047974 [44,] 3.66604144 0.83947880 [45,] 2.79269501 3.66604144 [46,] 2.85409307 2.79269501 [47,] -1.88289592 2.85409307 [48,] 1.03152435 -1.88289592 [49,] 3.36024057 1.03152435 [50,] -3.32020230 3.36024057 [51,] -2.47735074 -3.32020230 [52,] -1.91824272 -2.47735074 [53,] -0.38160036 -1.91824272 [54,] -1.96549331 -0.38160036 [55,] 2.54338178 -1.96549331 [56,] 4.00062116 2.54338178 [57,] -6.07221388 4.00062116 [58,] 2.53453593 -6.07221388 [59,] 0.89729125 2.53453593 [60,] -2.95890825 0.89729125 [61,] 3.41805302 -2.95890825 [62,] -0.41250354 3.41805302 [63,] -3.55104379 -0.41250354 [64,] -0.84096407 -3.55104379 [65,] 0.76179182 -0.84096407 [66,] 1.87655872 0.76179182 [67,] -4.34983916 1.87655872 [68,] 4.15903593 -4.34983916 [69,] 0.21684839 4.15903593 [70,] 3.61222291 0.21684839 [71,] -3.81006088 3.61222291 [72,] -0.98835017 -3.81006088 [73,] 2.83821247 -0.98835017 [74,] -0.63975943 2.83821247 [75,] 5.20223411 -0.63975943 [76,] 1.76851334 5.20223411 [77,] -0.21919167 1.76851334 [78,] -6.84096407 -0.21919167 [79,] 2.24461566 -6.84096407 [80,] -1.95658897 2.24461566 [81,] 1.82718380 -1.95658897 [82,] -0.07221388 1.82718380 [83,] 1.94280871 -0.07221388 [84,] -2.82508347 1.94280871 [85,] -1.53516320 -2.82508347 [86,] 3.38011508 -1.53516320 [87,] -1.74036175 3.38011508 [88,] -5.40850962 -1.74036175 [89,] -0.05333383 -5.40850962 [90,] -3.93671446 -0.05333383 [91,] 1.37041123 -3.93671446 [92,] 0.15903593 1.37041123 [93,] -2.56692439 0.15903593 [94,] -5.69757189 -2.56692439 [95,] 4.03238236 -5.69757189 [96,] 2.73402455 4.03238236 [97,] 0.42290495 2.73402455 [98,] 1.72658149 0.42290495 [99,] -2.86701533 1.72658149 [100,] 2.52138293 -2.86701533 [101,] 2.88141065 2.52138293 [102,] 0.72172956 2.88141065 [103,] -2.24923684 0.72172956 [104,] -1.59383366 -2.24923684 [105,] 6.45639927 -1.59383366 [106,] 2.88499626 6.45639927 [107,] 6.33247329 2.88499626 [108,] 2.14042774 6.33247329 [109,] 9.95551202 2.14042774 [110,] -4.78315161 9.95551202 [111,] -3.23906618 -4.78315161 [112,] -2.56606638 -3.23906618 [113,] -2.49323134 -2.56606638 [114,] 1.77336527 -2.49323134 [115,] 1.75349075 1.77336527 [116,] -1.69842990 1.75349075 [117,] -0.38777709 -1.69842990 [118,] -1.84010606 -0.38777709 [119,] 3.43307561 -1.84010606 [120,] -1.17640180 3.43307561 [121,] -3.69842990 -1.17640180 [122,] 3.04341103 -3.69842990 [123,] 1.72258757 3.04341103 [124,] -2.03028202 1.72258757 [125,] -3.86083859 -2.03028202 [126,] 3.70053023 -3.86083859 [127,] 8.74246208 3.70053023 [128,] -2.36916890 8.74246208 [129,] 0.23272898 -2.36916890 [130,] -2.49237333 0.23272898 [131,] -5.41209523 -2.49237333 [132,] 5.28037078 -5.41209523 [133,] -7.65164611 5.28037078 [134,] 2.10122348 -7.65164611 [135,] -2.94156638 2.10122348 [136,] -5.40810131 -2.94156638 [137,] -0.55104379 -5.40810131 [138,] -3.88648153 -0.55104379 [139,] 0.33818323 -3.88648153 [140,] -3.36086783 0.33818323 [141,] -2.71962922 -3.36086783 [142,] -4.72048723 -2.71962922 [143,] -4.96144090 -4.72048723 [144,] -3.82508347 -4.96144090 [145,] 5.17976846 -3.82508347 [146,] -3.13088434 5.17976846 [147,] 1.79269501 -3.13088434 [148,] -2.48134466 1.79269501 [149,] 1.67747842 -2.48134466 [150,] 3.31127396 1.67747842 [151,] 7.63342223 3.31127396 [152,] -1.00954950 7.63342223 [153,] 1.01862609 -1.00954950 [154,] 1.75117147 1.01862609 [155,] -0.94030006 1.75117147 [156,] 1.37041123 -0.94030006 [157,] -2.18257854 1.37041123 [158,] -2.36916890 -2.18257854 [159,] -0.68169129 -2.36916890 [160,] -1.78188529 -0.68169129 [161,] -0.05592497 -1.78188529 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 3.64185977 6.25963825 2 -4.37057169 3.64185977 3 -2.98137391 -4.37057169 4 -0.61057226 -2.98137391 5 -0.22663473 -0.61057226 6 4.83776278 -0.22663473 7 -0.94556031 4.83776278 8 0.98559857 -0.94556031 9 2.60119424 0.98559857 10 2.81615514 2.60119424 11 0.23631459 2.81615514 12 4.06673469 0.23631459 13 4.13212667 4.06673469 14 -2.71072489 4.13212667 15 -2.62473684 -2.71072489 16 1.52264926 -2.62473684 17 2.72658149 1.52264926 18 4.21770639 2.72658149 19 -2.99937884 4.21770639 20 -3.58939004 -2.99937884 21 -3.14949254 -3.58939004 22 4.18594520 -3.14949254 23 2.76578575 4.18594520 24 3.94766064 2.76578575 25 6.80458169 3.94766064 26 1.03238236 6.80458169 27 -1.71431049 1.03238236 28 -1.78315161 -1.71431049 29 -0.05991889 -1.78315161 30 -4.23062865 -0.05991889 31 -7.11373742 -4.23062865 32 1.81615514 -7.11373742 33 -0.95658897 1.81615514 34 -0.68254930 -0.95658897 35 -2.91997585 -0.68254930 36 -4.04362997 -2.91997585 37 1.10122348 -4.04362997 38 -6.18384486 1.10122348 39 0.44981421 -6.18384486 40 2.07517222 0.44981421 41 -0.94156638 2.07517222 42 2.49047974 -0.94156638 43 0.83947880 2.49047974 44 3.66604144 0.83947880 45 2.79269501 3.66604144 46 2.85409307 2.79269501 47 -1.88289592 2.85409307 48 1.03152435 -1.88289592 49 3.36024057 1.03152435 50 -3.32020230 3.36024057 51 -2.47735074 -3.32020230 52 -1.91824272 -2.47735074 53 -0.38160036 -1.91824272 54 -1.96549331 -0.38160036 55 2.54338178 -1.96549331 56 4.00062116 2.54338178 57 -6.07221388 4.00062116 58 2.53453593 -6.07221388 59 0.89729125 2.53453593 60 -2.95890825 0.89729125 61 3.41805302 -2.95890825 62 -0.41250354 3.41805302 63 -3.55104379 -0.41250354 64 -0.84096407 -3.55104379 65 0.76179182 -0.84096407 66 1.87655872 0.76179182 67 -4.34983916 1.87655872 68 4.15903593 -4.34983916 69 0.21684839 4.15903593 70 3.61222291 0.21684839 71 -3.81006088 3.61222291 72 -0.98835017 -3.81006088 73 2.83821247 -0.98835017 74 -0.63975943 2.83821247 75 5.20223411 -0.63975943 76 1.76851334 5.20223411 77 -0.21919167 1.76851334 78 -6.84096407 -0.21919167 79 2.24461566 -6.84096407 80 -1.95658897 2.24461566 81 1.82718380 -1.95658897 82 -0.07221388 1.82718380 83 1.94280871 -0.07221388 84 -2.82508347 1.94280871 85 -1.53516320 -2.82508347 86 3.38011508 -1.53516320 87 -1.74036175 3.38011508 88 -5.40850962 -1.74036175 89 -0.05333383 -5.40850962 90 -3.93671446 -0.05333383 91 1.37041123 -3.93671446 92 0.15903593 1.37041123 93 -2.56692439 0.15903593 94 -5.69757189 -2.56692439 95 4.03238236 -5.69757189 96 2.73402455 4.03238236 97 0.42290495 2.73402455 98 1.72658149 0.42290495 99 -2.86701533 1.72658149 100 2.52138293 -2.86701533 101 2.88141065 2.52138293 102 0.72172956 2.88141065 103 -2.24923684 0.72172956 104 -1.59383366 -2.24923684 105 6.45639927 -1.59383366 106 2.88499626 6.45639927 107 6.33247329 2.88499626 108 2.14042774 6.33247329 109 9.95551202 2.14042774 110 -4.78315161 9.95551202 111 -3.23906618 -4.78315161 112 -2.56606638 -3.23906618 113 -2.49323134 -2.56606638 114 1.77336527 -2.49323134 115 1.75349075 1.77336527 116 -1.69842990 1.75349075 117 -0.38777709 -1.69842990 118 -1.84010606 -0.38777709 119 3.43307561 -1.84010606 120 -1.17640180 3.43307561 121 -3.69842990 -1.17640180 122 3.04341103 -3.69842990 123 1.72258757 3.04341103 124 -2.03028202 1.72258757 125 -3.86083859 -2.03028202 126 3.70053023 -3.86083859 127 8.74246208 3.70053023 128 -2.36916890 8.74246208 129 0.23272898 -2.36916890 130 -2.49237333 0.23272898 131 -5.41209523 -2.49237333 132 5.28037078 -5.41209523 133 -7.65164611 5.28037078 134 2.10122348 -7.65164611 135 -2.94156638 2.10122348 136 -5.40810131 -2.94156638 137 -0.55104379 -5.40810131 138 -3.88648153 -0.55104379 139 0.33818323 -3.88648153 140 -3.36086783 0.33818323 141 -2.71962922 -3.36086783 142 -4.72048723 -2.71962922 143 -4.96144090 -4.72048723 144 -3.82508347 -4.96144090 145 5.17976846 -3.82508347 146 -3.13088434 5.17976846 147 1.79269501 -3.13088434 148 -2.48134466 1.79269501 149 1.67747842 -2.48134466 150 3.31127396 1.67747842 151 7.63342223 3.31127396 152 -1.00954950 7.63342223 153 1.01862609 -1.00954950 154 1.75117147 1.01862609 155 -0.94030006 1.75117147 156 1.37041123 -0.94030006 157 -2.18257854 1.37041123 158 -2.36916890 -2.18257854 159 -0.68169129 -2.36916890 160 -1.78188529 -0.68169129 161 -0.05592497 -1.78188529 > 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/7fmdi1290549709.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/freestat/rcomp/tmp/8fmdi1290549709.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/freestat/rcomp/tmp/9fmdi1290549709.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/freestat/rcomp/tmp/10qvck1290549709.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/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/11tet91290549709.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/12ew9e1290549709.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/133xpq1290549709.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/14wo6t1290549709.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/150pnz1290549709.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/16dzkq1290549709.tab") + } > > try(system("convert tmp/1jcg91290549709.ps tmp/1jcg91290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/2c3fu1290549709.ps tmp/2c3fu1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/3c3fu1290549709.ps tmp/3c3fu1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/4c3fu1290549709.ps tmp/4c3fu1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/5c3fu1290549709.ps tmp/5c3fu1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/6muex1290549709.ps tmp/6muex1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/7fmdi1290549709.ps tmp/7fmdi1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/8fmdi1290549709.ps tmp/8fmdi1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/9fmdi1290549709.ps tmp/9fmdi1290549709.png",intern=TRUE)) character(0) > try(system("convert tmp/10qvck1290549709.ps tmp/10qvck1290549709.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.688 2.780 6.213