R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(1 + ,41 + ,38 + ,14 + ,12 + ,1 + ,39 + ,32 + ,18 + ,11 + ,1 + ,30 + ,35 + ,11 + ,14 + ,1 + ,31 + ,33 + ,12 + ,12 + ,1 + ,34 + ,37 + ,16 + ,21 + ,1 + ,35 + ,29 + ,18 + ,12 + ,1 + ,39 + ,31 + ,14 + ,22 + ,1 + ,34 + ,36 + ,14 + ,11 + ,1 + ,36 + ,35 + ,15 + ,10 + ,1 + ,37 + ,38 + ,15 + ,13 + ,1 + ,38 + ,31 + ,17 + ,10 + ,1 + ,36 + ,34 + ,19 + ,8 + ,1 + ,38 + ,35 + ,10 + ,15 + ,1 + ,39 + ,38 + ,16 + ,14 + ,1 + ,33 + ,37 + ,18 + ,10 + ,1 + ,32 + ,33 + ,14 + ,14 + ,1 + ,36 + ,32 + ,14 + ,14 + ,1 + ,38 + ,38 + ,17 + ,11 + ,1 + ,39 + ,38 + ,14 + ,10 + ,1 + ,32 + ,32 + ,16 + ,13 + ,1 + ,32 + ,33 + ,18 + ,7 + ,1 + ,31 + ,31 + ,11 + ,14 + ,1 + ,39 + ,38 + ,14 + ,12 + ,1 + ,37 + ,39 + ,12 + ,14 + ,1 + ,39 + ,32 + ,17 + ,11 + ,1 + ,41 + ,32 + ,9 + ,9 + ,1 + ,36 + ,35 + ,16 + ,11 + ,1 + ,33 + ,37 + ,14 + ,15 + ,1 + ,33 + ,33 + ,15 + ,14 + ,1 + ,34 + ,33 + ,11 + ,13 + ,1 + ,31 + ,28 + ,16 + ,9 + ,1 + ,27 + ,32 + ,13 + ,15 + ,1 + ,37 + ,31 + ,17 + ,10 + ,1 + ,34 + ,37 + ,15 + ,11 + ,1 + ,34 + ,30 + ,14 + ,13 + ,1 + ,32 + ,33 + ,16 + ,8 + ,1 + ,29 + ,31 + ,9 + ,20 + ,1 + ,36 + ,33 + ,15 + ,12 + ,1 + ,29 + ,31 + ,17 + ,10 + ,1 + ,35 + ,33 + ,13 + ,10 + ,1 + ,37 + ,32 + ,15 + ,9 + ,1 + ,34 + ,33 + ,16 + ,14 + ,1 + ,38 + ,32 + ,16 + ,8 + ,1 + ,35 + ,33 + ,12 + ,14 + ,1 + ,38 + ,28 + ,12 + ,11 + ,1 + ,37 + ,35 + ,11 + ,13 + ,1 + ,38 + ,39 + ,15 + ,9 + ,1 + ,33 + ,34 + ,15 + ,11 + ,1 + ,36 + ,38 + ,17 + ,15 + ,1 + ,38 + ,32 + ,13 + ,11 + ,1 + ,32 + ,38 + ,16 + ,10 + ,1 + ,32 + ,30 + ,14 + ,14 + ,1 + ,32 + ,33 + ,11 + ,18 + ,1 + ,34 + ,38 + ,12 + ,14 + ,1 + ,32 + ,32 + ,12 + ,11 + ,1 + ,37 + ,32 + ,15 + ,12 + ,1 + ,39 + ,34 + ,16 + ,13 + ,1 + ,29 + ,34 + ,15 + ,9 + ,1 + ,37 + ,36 + ,12 + ,10 + ,1 + ,35 + ,34 + ,12 + ,15 + ,1 + ,30 + ,28 + ,8 + ,20 + ,1 + ,38 + ,34 + ,13 + ,12 + ,1 + ,34 + ,35 + ,11 + ,12 + ,1 + ,31 + ,35 + ,14 + ,14 + ,1 + ,34 + ,31 + ,15 + ,13 + ,1 + ,35 + ,37 + ,10 + ,11 + ,1 + ,36 + ,35 + ,11 + ,17 + ,1 + ,30 + ,27 + ,12 + ,12 + ,1 + ,39 + ,40 + ,15 + ,13 + ,1 + ,35 + ,37 + ,15 + ,14 + ,1 + ,38 + ,36 + ,14 + ,13 + ,1 + ,31 + ,38 + ,16 + ,15 + ,1 + ,34 + ,39 + ,15 + ,13 + ,1 + ,38 + ,41 + ,15 + ,10 + ,1 + ,34 + ,27 + ,13 + ,11 + ,1 + ,39 + ,30 + ,12 + ,19 + ,1 + ,37 + ,37 + ,17 + ,13 + ,1 + ,34 + ,31 + ,13 + ,17 + ,1 + ,28 + ,31 + ,15 + ,13 + ,1 + ,37 + ,27 + ,13 + ,9 + ,1 + ,33 + ,36 + ,15 + ,11 + ,1 + ,37 + ,38 + ,16 + ,10 + ,1 + ,35 + ,37 + ,15 + ,9 + ,1 + ,37 + ,33 + ,16 + ,12 + ,1 + ,32 + ,34 + ,15 + ,12 + ,1 + ,33 + ,31 + ,14 + ,13 + ,1 + ,38 + ,39 + ,15 + ,13 + ,1 + ,33 + ,34 + ,14 + ,12 + ,1 + ,29 + ,32 + ,13 + ,15 + ,1 + ,33 + ,33 + ,7 + ,22 + ,1 + ,31 + ,36 + ,17 + ,13 + ,1 + ,36 + ,32 + ,13 + ,15 + ,1 + ,35 + ,41 + ,15 + ,13 + ,1 + ,32 + ,28 + ,14 + ,15 + ,1 + ,29 + ,30 + ,13 + ,10 + ,1 + ,39 + ,36 + ,16 + ,11 + ,1 + ,37 + ,35 + ,12 + ,16 + ,1 + ,35 + ,31 + ,14 + ,11 + ,1 + ,37 + ,34 + ,17 + ,11 + ,1 + ,32 + ,36 + ,15 + ,10 + ,1 + ,38 + ,36 + ,17 + ,10 + ,1 + ,37 + ,35 + ,12 + ,16 + ,1 + ,36 + ,37 + ,16 + ,12 + ,1 + ,32 + ,28 + ,11 + ,11 + ,1 + ,33 + ,39 + ,15 + ,16 + ,1 + ,40 + ,32 + ,9 + ,19 + ,1 + ,38 + ,35 + ,16 + ,11 + ,1 + ,41 + ,39 + ,15 + ,16 + ,1 + ,36 + ,35 + ,10 + ,15 + ,1 + ,43 + ,42 + ,10 + ,24 + ,1 + ,30 + ,34 + ,15 + ,14 + ,1 + ,31 + ,33 + ,11 + ,15 + ,1 + ,32 + ,41 + ,13 + ,11 + ,1 + ,32 + ,33 + ,14 + ,15 + ,1 + ,37 + ,34 + ,18 + ,12 + ,1 + ,37 + ,32 + ,16 + ,10 + ,1 + ,33 + ,40 + ,14 + ,14 + ,1 + ,34 + ,40 + ,14 + ,13 + ,1 + ,33 + ,35 + ,14 + ,9 + ,1 + ,38 + ,36 + ,14 + ,15 + ,1 + ,33 + ,37 + ,12 + ,15 + ,1 + ,31 + ,27 + ,14 + ,14 + ,1 + ,38 + ,39 + ,15 + ,11 + ,1 + ,37 + ,38 + ,15 + ,8 + ,1 + ,33 + ,31 + ,15 + ,11 + ,1 + ,31 + ,33 + ,13 + ,11 + ,1 + ,39 + ,32 + ,17 + ,8 + ,1 + ,44 + ,39 + ,17 + ,10 + ,1 + ,33 + ,36 + ,19 + ,11 + ,1 + ,35 + ,33 + ,15 + ,13 + ,1 + ,32 + ,33 + ,13 + ,11 + ,1 + ,28 + ,32 + ,9 + ,20 + ,1 + ,40 + ,37 + ,15 + ,10 + ,1 + ,27 + ,30 + ,15 + ,15 + ,1 + ,37 + ,38 + ,15 + ,12 + ,1 + ,32 + ,29 + ,16 + ,14 + ,1 + ,28 + ,22 + ,11 + ,23 + ,1 + ,34 + ,35 + ,14 + ,14 + ,1 + ,30 + ,35 + ,11 + ,16 + ,1 + ,35 + ,34 + ,15 + ,11 + ,1 + ,31 + ,35 + ,13 + ,12 + ,1 + ,32 + ,34 + ,15 + ,10 + ,1 + ,30 + ,34 + ,16 + ,14 + ,1 + ,30 + ,35 + ,14 + ,12 + ,1 + ,31 + ,23 + ,15 + ,12 + ,1 + ,40 + ,31 + ,16 + ,11 + ,1 + ,32 + ,27 + ,16 + ,12 + ,1 + ,36 + ,36 + ,11 + ,13 + ,1 + ,32 + ,31 + ,12 + ,11 + ,1 + ,35 + ,32 + ,9 + ,19 + ,1 + ,38 + ,39 + ,16 + ,12 + ,1 + ,42 + ,37 + ,13 + ,17 + ,1 + ,34 + ,38 + ,16 + ,9 + ,1 + ,35 + ,39 + ,12 + ,12 + ,1 + ,35 + ,34 + ,9 + ,19 + ,1 + ,33 + ,31 + ,13 + ,18 + ,1 + ,36 + ,32 + ,13 + ,15 + ,1 + ,32 + ,37 + ,14 + ,14 + ,1 + ,33 + ,36 + ,19 + ,11 + ,1 + ,34 + ,32 + ,13 + ,9 + ,1 + ,32 + ,35 + ,12 + ,18 + ,1 + ,34 + ,36 + ,13 + ,16) + ,dim=c(5 + ,162) + ,dimnames=list(c('Time' + ,'Connected' + ,'Separated' + ,'Happiness' + ,'Depression') + ,1:162)) > y <- array(NA,dim=c(5,162),dimnames=list(c('Time','Connected','Separated','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 = '5' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Depression Time Connected Separated Happiness 1 12 1 41 38 14 2 11 1 39 32 18 3 14 1 30 35 11 4 12 1 31 33 12 5 21 1 34 37 16 6 12 1 35 29 18 7 22 1 39 31 14 8 11 1 34 36 14 9 10 1 36 35 15 10 13 1 37 38 15 11 10 1 38 31 17 12 8 1 36 34 19 13 15 1 38 35 10 14 14 1 39 38 16 15 10 1 33 37 18 16 14 1 32 33 14 17 14 1 36 32 14 18 11 1 38 38 17 19 10 1 39 38 14 20 13 1 32 32 16 21 7 1 32 33 18 22 14 1 31 31 11 23 12 1 39 38 14 24 14 1 37 39 12 25 11 1 39 32 17 26 9 1 41 32 9 27 11 1 36 35 16 28 15 1 33 37 14 29 14 1 33 33 15 30 13 1 34 33 11 31 9 1 31 28 16 32 15 1 27 32 13 33 10 1 37 31 17 34 11 1 34 37 15 35 13 1 34 30 14 36 8 1 32 33 16 37 20 1 29 31 9 38 12 1 36 33 15 39 10 1 29 31 17 40 10 1 35 33 13 41 9 1 37 32 15 42 14 1 34 33 16 43 8 1 38 32 16 44 14 1 35 33 12 45 11 1 38 28 12 46 13 1 37 35 11 47 9 1 38 39 15 48 11 1 33 34 15 49 15 1 36 38 17 50 11 1 38 32 13 51 10 1 32 38 16 52 14 1 32 30 14 53 18 1 32 33 11 54 14 1 34 38 12 55 11 1 32 32 12 56 12 1 37 32 15 57 13 1 39 34 16 58 9 1 29 34 15 59 10 1 37 36 12 60 15 1 35 34 12 61 20 1 30 28 8 62 12 1 38 34 13 63 12 1 34 35 11 64 14 1 31 35 14 65 13 1 34 31 15 66 11 1 35 37 10 67 17 1 36 35 11 68 12 1 30 27 12 69 13 1 39 40 15 70 14 1 35 37 15 71 13 1 38 36 14 72 15 1 31 38 16 73 13 1 34 39 15 74 10 1 38 41 15 75 11 1 34 27 13 76 19 1 39 30 12 77 13 1 37 37 17 78 17 1 34 31 13 79 13 1 28 31 15 80 9 1 37 27 13 81 11 1 33 36 15 82 10 1 37 38 16 83 9 1 35 37 15 84 12 1 37 33 16 85 12 1 32 34 15 86 13 1 33 31 14 87 13 1 38 39 15 88 12 1 33 34 14 89 15 1 29 32 13 90 22 1 33 33 7 91 13 1 31 36 17 92 15 1 36 32 13 93 13 1 35 41 15 94 15 1 32 28 14 95 10 1 29 30 13 96 11 1 39 36 16 97 16 1 37 35 12 98 11 1 35 31 14 99 11 1 37 34 17 100 10 1 32 36 15 101 10 1 38 36 17 102 16 1 37 35 12 103 12 1 36 37 16 104 11 1 32 28 11 105 16 1 33 39 15 106 19 1 40 32 9 107 11 1 38 35 16 108 16 1 41 39 15 109 15 1 36 35 10 110 24 1 43 42 10 111 14 1 30 34 15 112 15 1 31 33 11 113 11 1 32 41 13 114 15 1 32 33 14 115 12 1 37 34 18 116 10 1 37 32 16 117 14 1 33 40 14 118 13 1 34 40 14 119 9 1 33 35 14 120 15 1 38 36 14 121 15 1 33 37 12 122 14 1 31 27 14 123 11 1 38 39 15 124 8 1 37 38 15 125 11 1 33 31 15 126 11 1 31 33 13 127 8 1 39 32 17 128 10 1 44 39 17 129 11 1 33 36 19 130 13 1 35 33 15 131 11 1 32 33 13 132 20 1 28 32 9 133 10 1 40 37 15 134 15 1 27 30 15 135 12 1 37 38 15 136 14 1 32 29 16 137 23 1 28 22 11 138 14 1 34 35 14 139 16 1 30 35 11 140 11 1 35 34 15 141 12 1 31 35 13 142 10 1 32 34 15 143 14 1 30 34 16 144 12 1 30 35 14 145 12 1 31 23 15 146 11 1 40 31 16 147 12 1 32 27 16 148 13 1 36 36 11 149 11 1 32 31 12 150 19 1 35 32 9 151 12 1 38 39 16 152 17 1 42 37 13 153 9 1 34 38 16 154 12 1 35 39 12 155 19 1 35 34 9 156 18 1 33 31 13 157 15 1 36 32 13 158 14 1 32 37 14 159 11 1 33 36 19 160 9 1 34 32 13 161 18 1 32 35 12 162 16 1 34 36 13 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Time Connected Separated Happiness 24.15687 NA -0.04870 0.02127 -0.73207 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.2522 -2.0170 -0.1137 1.6625 9.4251 Coefficients: (1 not defined because of singularities) Estimate Std. Error t value Pr(>|t|) (Intercept) 24.15687 2.67531 9.030 5.69e-16 *** Time NA NA NA NA Connected -0.04870 0.06752 -0.721 0.472 Separated 0.02127 0.06426 0.331 0.741 Happiness -0.73207 0.09174 -7.980 2.80e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.677 on 158 degrees of freedom Multiple R-squared: 0.2985, Adjusted R-squared: 0.2852 F-statistic: 22.41 on 3 and 158 DF, p-value: 3.815e-12 > 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.99988516 0.0002296797 0.0001148398 [2,] 0.99987779 0.0002444290 0.0001222145 [3,] 0.99966866 0.0006626772 0.0003313386 [4,] 0.99960232 0.0007953636 0.0003976818 [5,] 0.99945044 0.0010991254 0.0005495627 [6,] 0.99896704 0.0020659260 0.0010329630 [7,] 0.99823145 0.0035370937 0.0017685469 [8,] 0.99669781 0.0066043814 0.0033021907 [9,] 0.99433148 0.0113370475 0.0056685238 [10,] 0.99043159 0.0191368174 0.0095684087 [11,] 0.98486998 0.0302600366 0.0151300183 [12,] 0.98587556 0.0282488777 0.0141244389 [13,] 0.97867411 0.0426517845 0.0213258923 [14,] 0.98203707 0.0359258602 0.0179629301 [15,] 0.97430041 0.0513991780 0.0256995890 [16,] 0.96442729 0.0711454169 0.0355727085 [17,] 0.94941161 0.1011767869 0.0505883935 [18,] 0.93412038 0.1317592485 0.0658796243 [19,] 0.98620201 0.0275959782 0.0137979891 [20,] 0.98038527 0.0392294574 0.0196147287 [21,] 0.97628138 0.0474372321 0.0237186160 [22,] 0.96946316 0.0610736783 0.0305368391 [23,] 0.96089880 0.0782023918 0.0391011959 [24,] 0.95974576 0.0805084702 0.0402542351 [25,] 0.94940292 0.1011941623 0.0505970811 [26,] 0.93485549 0.1302890236 0.0651445118 [27,] 0.92148812 0.1570237604 0.0785118802 [28,] 0.89938959 0.2012208277 0.1006104138 [29,] 0.91799938 0.1640012479 0.0820006239 [30,] 0.94065188 0.1186962365 0.0593481182 [31,] 0.92282063 0.1543587361 0.0771793681 [32,] 0.90661013 0.1867797362 0.0933898681 [33,] 0.91534367 0.1693126604 0.0846563302 [34,] 0.91596314 0.1680737159 0.0840368579 [35,] 0.91083109 0.1783378224 0.0891689112 [36,] 0.91554908 0.1689018353 0.0844509177 [37,] 0.89444180 0.2111164096 0.1055582048 [38,] 0.88785649 0.2242870286 0.1121435143 [39,] 0.87096370 0.2580725933 0.1290362966 [40,] 0.87944660 0.2411067995 0.1205533997 [41,] 0.85834467 0.2833106693 0.1416553346 [42,] 0.88550032 0.2289993534 0.1144996767 [43,] 0.87437567 0.2512486657 0.1256243329 [44,] 0.86433557 0.2713288581 0.1356644290 [45,] 0.84264478 0.3147104343 0.1573552171 [46,] 0.85377099 0.2924580175 0.1462290088 [47,] 0.82476892 0.3504621509 0.1752310755 [48,] 0.83641364 0.3271727183 0.1635863592 [49,] 0.80564058 0.3887188320 0.1943594160 [50,] 0.78733349 0.4253330180 0.2126665090 [51,] 0.81111204 0.3777759193 0.1888879597 [52,] 0.84752525 0.3049495003 0.1524747502 [53,] 0.82425626 0.3514874719 0.1757437360 [54,] 0.83982372 0.3203525622 0.1601762811 [55,] 0.81814862 0.3637027525 0.1818513762 [56,] 0.82529258 0.3494148442 0.1747074221 [57,] 0.79713121 0.4057375767 0.2028687883 [58,] 0.76612177 0.4677564638 0.2338782319 [59,] 0.83434515 0.3313097015 0.1656548507 [60,] 0.82879555 0.3424088925 0.1712044463 [61,] 0.82444574 0.3511085119 0.1755542560 [62,] 0.79744906 0.4051018773 0.2025509386 [63,] 0.77837762 0.4432447686 0.2216223843 [64,] 0.74401698 0.5119660344 0.2559830172 [65,] 0.76056515 0.4788697080 0.2394348540 [66,] 0.72532946 0.5493410811 0.2746705405 [67,] 0.71376583 0.5724683454 0.2862341727 [68,] 0.71217432 0.5756513695 0.2878256848 [69,] 0.80509341 0.3898131733 0.1949065867 [70,] 0.79727579 0.4054484184 0.2027242092 [71,] 0.81579574 0.3684085287 0.1842042644 [72,] 0.78546948 0.4290610320 0.2145305160 [73,] 0.84854662 0.3029067540 0.1514533770 [74,] 0.82694721 0.3461055856 0.1730527928 [75,] 0.80526165 0.3894767042 0.1947383521 [76,] 0.82047138 0.3590572377 0.1795286189 [77,] 0.79019597 0.4196080640 0.2098040320 [78,] 0.75583980 0.4883203970 0.2441601985 [79,] 0.71872675 0.5625465009 0.2812732504 [80,] 0.68267401 0.6346519889 0.3173259945 [81,] 0.64735377 0.7052924572 0.3526462286 [82,] 0.61132105 0.7773579028 0.3886789514 [83,] 0.65860746 0.6827850864 0.3413925432 [84,] 0.64816365 0.7036727039 0.3518363520 [85,] 0.61536618 0.7692676494 0.3846338247 [86,] 0.57446703 0.8510659434 0.4255329717 [87,] 0.55178072 0.8964385659 0.4482192829 [88,] 0.60507307 0.7898538687 0.3949269343 [89,] 0.56018634 0.8796273252 0.4398136626 [90,] 0.52919440 0.9416112025 0.4708056012 [91,] 0.51213033 0.9757393489 0.4878696744 [92,] 0.46566877 0.9313375400 0.5343312300 [93,] 0.45254590 0.9050918005 0.5474540998 [94,] 0.40831074 0.8166214762 0.5916892619 [95,] 0.37678570 0.7535714050 0.6232142975 [96,] 0.33410002 0.6682000376 0.6658999812 [97,] 0.43544094 0.8708818872 0.5645590564 [98,] 0.49103487 0.9820697456 0.5089651272 [99,] 0.47574298 0.9514859609 0.5242570195 [100,] 0.42868553 0.8573710517 0.5713144742 [101,] 0.48343167 0.9668633395 0.5165683303 [102,] 0.45696465 0.9139292933 0.5430353534 [103,] 0.83616415 0.3276717094 0.1638358547 [104,] 0.81483293 0.3703341404 0.1851670702 [105,] 0.78322468 0.4335506378 0.2167753189 [106,] 0.77992523 0.4401495349 0.2200747674 [107,] 0.75794790 0.4841042070 0.2420521035 [108,] 0.75481645 0.4903670943 0.2451835471 [109,] 0.72275192 0.5544961609 0.2772480804 [110,] 0.69321106 0.6135778798 0.3067889399 [111,] 0.65054633 0.6989073373 0.3494536686 [112,] 0.71323074 0.5735385123 0.2867692562 [113,] 0.70682889 0.5863422246 0.2931711123 [114,] 0.66010382 0.6797923501 0.3398961750 [115,] 0.61584541 0.7683091852 0.3841545926 [116,] 0.56645459 0.8670908183 0.4335454091 [117,] 0.61313498 0.7737300483 0.3868650242 [118,] 0.58145717 0.8370856622 0.4185428311 [119,] 0.61691246 0.7661750836 0.3830875418 [120,] 0.61773660 0.7645267916 0.3822633958 [121,] 0.56667425 0.8666514920 0.4333257460 [122,] 0.54982991 0.9003401828 0.4501700914 [123,] 0.49317530 0.9863506063 0.5068246969 [124,] 0.53263787 0.9347242627 0.4673621314 [125,] 0.50210124 0.9957975257 0.4978987628 [126,] 0.46407402 0.9281480434 0.5359259783 [127,] 0.43098803 0.8619760697 0.5690119652 [128,] 0.36930825 0.7386165016 0.6306917492 [129,] 0.33482530 0.6696506088 0.6651746956 [130,] 0.63022556 0.7395488710 0.3697744355 [131,] 0.56959757 0.8608048566 0.4304024283 [132,] 0.50463677 0.9907264685 0.4953632342 [133,] 0.45113181 0.9022636255 0.5488681872 [134,] 0.40605627 0.8121125325 0.5939437338 [135,] 0.38633446 0.7726689225 0.6136655388 [136,] 0.37648862 0.7529772461 0.6235113770 [137,] 0.30863063 0.6172612541 0.6913693729 [138,] 0.24102232 0.4820446478 0.7589776761 [139,] 0.19825422 0.3965084344 0.8017457828 [140,] 0.14330358 0.2866071608 0.8566964196 [141,] 0.14172951 0.2834590189 0.8582704906 [142,] 0.21670652 0.4334130463 0.7832934769 [143,] 0.15242115 0.3048422985 0.8475788508 [144,] 0.09726638 0.1945327699 0.9027336151 [145,] 0.15762964 0.3152592821 0.8423703590 [146,] 0.11107228 0.2221445674 0.8889277163 [147,] 0.08721150 0.1744230073 0.9127884963 > postscript(file="/var/wessaorg/rcomp/tmp/1yro81321632630.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/2bp1h1321632630.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/3q2sh1321632630.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/4lsnr1321632630.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/5eyj51321632630.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 -0.71944518 1.23906512 -1.38754228 -2.56423139 9.42507673 2.10807834 7 8 9 10 11 12 9.33204480 -2.01779858 -2.16705843 0.81783143 -0.52043666 -1.21749870 13 14 15 16 17 18 -0.73002301 2.64730188 -0.15947724 0.94861259 1.16467818 0.33067542 19 20 21 22 23 24 -2.81684313 1.43402730 -3.12309739 -1.25376449 -0.81684313 -0.39965578 25 26 27 28 29 30 0.50699261 -7.25218948 -0.43498592 1.91223275 1.72938407 -2.15020698 31 32 33 34 35 36 -2.52959285 0.99431493 -0.56913563 -1.30699578 0.10981965 -3.58724240 37 38 39 40 41 42 3.18469256 -0.12451902 -0.95872740 -3.63736300 -3.05455034 2.51015554 43 44 45 46 47 48 -3.27377887 -0.36943550 -3.11699007 -2.04664947 -3.15473930 -1.29188564 49 50 51 52 53 54 4.23327747 -2.46999638 -1.69359092 1.01242170 2.75239508 -0.52448300 55 56 57 58 59 60 -3.49426272 -0.05455034 1.73238070 -3.48668153 -4.33584667 0.60929479 61 62 63 64 65 66 2.56512814 -1.51253579 -3.19274639 0.85737421 0.82062245 -4.91865933 67 68 69 70 71 72 1.90465155 -2.48531214 0.87268997 1.74170319 0.17699731 3.25771011 73 74 75 76 77 78 0.65046481 -2.19727871 -2.55844375 4.88916950 2.30324615 3.35647744 79 80 81 82 83 84 0.52842861 -4.41234683 -1.33442505 -1.45009606 -3.25829681 0.65625246 85 86 87 88 89 90 -0.34058461 0.03985097 0.84526070 -1.02395814 1.09171287 3.87280403 91 92 93 94 95 96 2.03232202 1.43260568 0.65662438 2.05496111 -3.86574772 -0.31015871 97 98 99 100 101 102 1.68542303 -1.86275109 0.36705526 -2.38312402 -0.62678518 1.68542303 103 104 105 106 107 108 0.52247467 -4.14125640 3.60176584 2.69911154 -0.33758798 3.99135762 109 110 111 112 113 114 -0.82742095 8.36458393 1.56201745 -0.29630390 -2.95361755 1.94861259 115 116 117 118 119 120 2.09912776 -1.32247784 0.84842363 -0.10287739 -4.04522785 2.17699731 121 122 123 124 125 126 0.44808774 1.02753184 -1.15473930 -4.18216857 -1.22807653 -2.83215889 127 128 129 130 131 132 -2.49300739 -0.39840046 1.59386497 0.82678201 -2.78345992 3.11472388 133 134 135 136 137 138 -2.01480195 2.50099935 -0.18216857 2.49783642 7.79156593 1.00347113 139 140 141 142 143 144 0.61245772 -1.19448769 -1.87469830 -2.34058461 2.29408995 -1.19132476 145 146 147 148 149 150 -0.15531684 -0.15511122 0.54037582 -2.11661815 -3.47299301 2.45561669 151 152 153 154 155 156 0.57733321 3.61845099 -2.59619298 -2.49705373 2.41307728 4.30777846 157 158 159 160 161 162 1.43260568 0.86353377 1.59386497 -4.66479227 3.44192817 2.25012892 > postscript(file="/var/wessaorg/rcomp/tmp/6ei071321632630.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 -0.71944518 NA 1 1.23906512 -0.71944518 2 -1.38754228 1.23906512 3 -2.56423139 -1.38754228 4 9.42507673 -2.56423139 5 2.10807834 9.42507673 6 9.33204480 2.10807834 7 -2.01779858 9.33204480 8 -2.16705843 -2.01779858 9 0.81783143 -2.16705843 10 -0.52043666 0.81783143 11 -1.21749870 -0.52043666 12 -0.73002301 -1.21749870 13 2.64730188 -0.73002301 14 -0.15947724 2.64730188 15 0.94861259 -0.15947724 16 1.16467818 0.94861259 17 0.33067542 1.16467818 18 -2.81684313 0.33067542 19 1.43402730 -2.81684313 20 -3.12309739 1.43402730 21 -1.25376449 -3.12309739 22 -0.81684313 -1.25376449 23 -0.39965578 -0.81684313 24 0.50699261 -0.39965578 25 -7.25218948 0.50699261 26 -0.43498592 -7.25218948 27 1.91223275 -0.43498592 28 1.72938407 1.91223275 29 -2.15020698 1.72938407 30 -2.52959285 -2.15020698 31 0.99431493 -2.52959285 32 -0.56913563 0.99431493 33 -1.30699578 -0.56913563 34 0.10981965 -1.30699578 35 -3.58724240 0.10981965 36 3.18469256 -3.58724240 37 -0.12451902 3.18469256 38 -0.95872740 -0.12451902 39 -3.63736300 -0.95872740 40 -3.05455034 -3.63736300 41 2.51015554 -3.05455034 42 -3.27377887 2.51015554 43 -0.36943550 -3.27377887 44 -3.11699007 -0.36943550 45 -2.04664947 -3.11699007 46 -3.15473930 -2.04664947 47 -1.29188564 -3.15473930 48 4.23327747 -1.29188564 49 -2.46999638 4.23327747 50 -1.69359092 -2.46999638 51 1.01242170 -1.69359092 52 2.75239508 1.01242170 53 -0.52448300 2.75239508 54 -3.49426272 -0.52448300 55 -0.05455034 -3.49426272 56 1.73238070 -0.05455034 57 -3.48668153 1.73238070 58 -4.33584667 -3.48668153 59 0.60929479 -4.33584667 60 2.56512814 0.60929479 61 -1.51253579 2.56512814 62 -3.19274639 -1.51253579 63 0.85737421 -3.19274639 64 0.82062245 0.85737421 65 -4.91865933 0.82062245 66 1.90465155 -4.91865933 67 -2.48531214 1.90465155 68 0.87268997 -2.48531214 69 1.74170319 0.87268997 70 0.17699731 1.74170319 71 3.25771011 0.17699731 72 0.65046481 3.25771011 73 -2.19727871 0.65046481 74 -2.55844375 -2.19727871 75 4.88916950 -2.55844375 76 2.30324615 4.88916950 77 3.35647744 2.30324615 78 0.52842861 3.35647744 79 -4.41234683 0.52842861 80 -1.33442505 -4.41234683 81 -1.45009606 -1.33442505 82 -3.25829681 -1.45009606 83 0.65625246 -3.25829681 84 -0.34058461 0.65625246 85 0.03985097 -0.34058461 86 0.84526070 0.03985097 87 -1.02395814 0.84526070 88 1.09171287 -1.02395814 89 3.87280403 1.09171287 90 2.03232202 3.87280403 91 1.43260568 2.03232202 92 0.65662438 1.43260568 93 2.05496111 0.65662438 94 -3.86574772 2.05496111 95 -0.31015871 -3.86574772 96 1.68542303 -0.31015871 97 -1.86275109 1.68542303 98 0.36705526 -1.86275109 99 -2.38312402 0.36705526 100 -0.62678518 -2.38312402 101 1.68542303 -0.62678518 102 0.52247467 1.68542303 103 -4.14125640 0.52247467 104 3.60176584 -4.14125640 105 2.69911154 3.60176584 106 -0.33758798 2.69911154 107 3.99135762 -0.33758798 108 -0.82742095 3.99135762 109 8.36458393 -0.82742095 110 1.56201745 8.36458393 111 -0.29630390 1.56201745 112 -2.95361755 -0.29630390 113 1.94861259 -2.95361755 114 2.09912776 1.94861259 115 -1.32247784 2.09912776 116 0.84842363 -1.32247784 117 -0.10287739 0.84842363 118 -4.04522785 -0.10287739 119 2.17699731 -4.04522785 120 0.44808774 2.17699731 121 1.02753184 0.44808774 122 -1.15473930 1.02753184 123 -4.18216857 -1.15473930 124 -1.22807653 -4.18216857 125 -2.83215889 -1.22807653 126 -2.49300739 -2.83215889 127 -0.39840046 -2.49300739 128 1.59386497 -0.39840046 129 0.82678201 1.59386497 130 -2.78345992 0.82678201 131 3.11472388 -2.78345992 132 -2.01480195 3.11472388 133 2.50099935 -2.01480195 134 -0.18216857 2.50099935 135 2.49783642 -0.18216857 136 7.79156593 2.49783642 137 1.00347113 7.79156593 138 0.61245772 1.00347113 139 -1.19448769 0.61245772 140 -1.87469830 -1.19448769 141 -2.34058461 -1.87469830 142 2.29408995 -2.34058461 143 -1.19132476 2.29408995 144 -0.15531684 -1.19132476 145 -0.15511122 -0.15531684 146 0.54037582 -0.15511122 147 -2.11661815 0.54037582 148 -3.47299301 -2.11661815 149 2.45561669 -3.47299301 150 0.57733321 2.45561669 151 3.61845099 0.57733321 152 -2.59619298 3.61845099 153 -2.49705373 -2.59619298 154 2.41307728 -2.49705373 155 4.30777846 2.41307728 156 1.43260568 4.30777846 157 0.86353377 1.43260568 158 1.59386497 0.86353377 159 -4.66479227 1.59386497 160 3.44192817 -4.66479227 161 2.25012892 3.44192817 162 NA 2.25012892 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.23906512 -0.71944518 [2,] -1.38754228 1.23906512 [3,] -2.56423139 -1.38754228 [4,] 9.42507673 -2.56423139 [5,] 2.10807834 9.42507673 [6,] 9.33204480 2.10807834 [7,] -2.01779858 9.33204480 [8,] -2.16705843 -2.01779858 [9,] 0.81783143 -2.16705843 [10,] -0.52043666 0.81783143 [11,] -1.21749870 -0.52043666 [12,] -0.73002301 -1.21749870 [13,] 2.64730188 -0.73002301 [14,] -0.15947724 2.64730188 [15,] 0.94861259 -0.15947724 [16,] 1.16467818 0.94861259 [17,] 0.33067542 1.16467818 [18,] -2.81684313 0.33067542 [19,] 1.43402730 -2.81684313 [20,] -3.12309739 1.43402730 [21,] -1.25376449 -3.12309739 [22,] -0.81684313 -1.25376449 [23,] -0.39965578 -0.81684313 [24,] 0.50699261 -0.39965578 [25,] -7.25218948 0.50699261 [26,] -0.43498592 -7.25218948 [27,] 1.91223275 -0.43498592 [28,] 1.72938407 1.91223275 [29,] -2.15020698 1.72938407 [30,] -2.52959285 -2.15020698 [31,] 0.99431493 -2.52959285 [32,] -0.56913563 0.99431493 [33,] -1.30699578 -0.56913563 [34,] 0.10981965 -1.30699578 [35,] -3.58724240 0.10981965 [36,] 3.18469256 -3.58724240 [37,] -0.12451902 3.18469256 [38,] -0.95872740 -0.12451902 [39,] -3.63736300 -0.95872740 [40,] -3.05455034 -3.63736300 [41,] 2.51015554 -3.05455034 [42,] -3.27377887 2.51015554 [43,] -0.36943550 -3.27377887 [44,] -3.11699007 -0.36943550 [45,] -2.04664947 -3.11699007 [46,] -3.15473930 -2.04664947 [47,] -1.29188564 -3.15473930 [48,] 4.23327747 -1.29188564 [49,] -2.46999638 4.23327747 [50,] -1.69359092 -2.46999638 [51,] 1.01242170 -1.69359092 [52,] 2.75239508 1.01242170 [53,] -0.52448300 2.75239508 [54,] -3.49426272 -0.52448300 [55,] -0.05455034 -3.49426272 [56,] 1.73238070 -0.05455034 [57,] -3.48668153 1.73238070 [58,] -4.33584667 -3.48668153 [59,] 0.60929479 -4.33584667 [60,] 2.56512814 0.60929479 [61,] -1.51253579 2.56512814 [62,] -3.19274639 -1.51253579 [63,] 0.85737421 -3.19274639 [64,] 0.82062245 0.85737421 [65,] -4.91865933 0.82062245 [66,] 1.90465155 -4.91865933 [67,] -2.48531214 1.90465155 [68,] 0.87268997 -2.48531214 [69,] 1.74170319 0.87268997 [70,] 0.17699731 1.74170319 [71,] 3.25771011 0.17699731 [72,] 0.65046481 3.25771011 [73,] -2.19727871 0.65046481 [74,] -2.55844375 -2.19727871 [75,] 4.88916950 -2.55844375 [76,] 2.30324615 4.88916950 [77,] 3.35647744 2.30324615 [78,] 0.52842861 3.35647744 [79,] -4.41234683 0.52842861 [80,] -1.33442505 -4.41234683 [81,] -1.45009606 -1.33442505 [82,] -3.25829681 -1.45009606 [83,] 0.65625246 -3.25829681 [84,] -0.34058461 0.65625246 [85,] 0.03985097 -0.34058461 [86,] 0.84526070 0.03985097 [87,] -1.02395814 0.84526070 [88,] 1.09171287 -1.02395814 [89,] 3.87280403 1.09171287 [90,] 2.03232202 3.87280403 [91,] 1.43260568 2.03232202 [92,] 0.65662438 1.43260568 [93,] 2.05496111 0.65662438 [94,] -3.86574772 2.05496111 [95,] -0.31015871 -3.86574772 [96,] 1.68542303 -0.31015871 [97,] -1.86275109 1.68542303 [98,] 0.36705526 -1.86275109 [99,] -2.38312402 0.36705526 [100,] -0.62678518 -2.38312402 [101,] 1.68542303 -0.62678518 [102,] 0.52247467 1.68542303 [103,] -4.14125640 0.52247467 [104,] 3.60176584 -4.14125640 [105,] 2.69911154 3.60176584 [106,] -0.33758798 2.69911154 [107,] 3.99135762 -0.33758798 [108,] -0.82742095 3.99135762 [109,] 8.36458393 -0.82742095 [110,] 1.56201745 8.36458393 [111,] -0.29630390 1.56201745 [112,] -2.95361755 -0.29630390 [113,] 1.94861259 -2.95361755 [114,] 2.09912776 1.94861259 [115,] -1.32247784 2.09912776 [116,] 0.84842363 -1.32247784 [117,] -0.10287739 0.84842363 [118,] -4.04522785 -0.10287739 [119,] 2.17699731 -4.04522785 [120,] 0.44808774 2.17699731 [121,] 1.02753184 0.44808774 [122,] -1.15473930 1.02753184 [123,] -4.18216857 -1.15473930 [124,] -1.22807653 -4.18216857 [125,] -2.83215889 -1.22807653 [126,] -2.49300739 -2.83215889 [127,] -0.39840046 -2.49300739 [128,] 1.59386497 -0.39840046 [129,] 0.82678201 1.59386497 [130,] -2.78345992 0.82678201 [131,] 3.11472388 -2.78345992 [132,] -2.01480195 3.11472388 [133,] 2.50099935 -2.01480195 [134,] -0.18216857 2.50099935 [135,] 2.49783642 -0.18216857 [136,] 7.79156593 2.49783642 [137,] 1.00347113 7.79156593 [138,] 0.61245772 1.00347113 [139,] -1.19448769 0.61245772 [140,] -1.87469830 -1.19448769 [141,] -2.34058461 -1.87469830 [142,] 2.29408995 -2.34058461 [143,] -1.19132476 2.29408995 [144,] -0.15531684 -1.19132476 [145,] -0.15511122 -0.15531684 [146,] 0.54037582 -0.15511122 [147,] -2.11661815 0.54037582 [148,] -3.47299301 -2.11661815 [149,] 2.45561669 -3.47299301 [150,] 0.57733321 2.45561669 [151,] 3.61845099 0.57733321 [152,] -2.59619298 3.61845099 [153,] -2.49705373 -2.59619298 [154,] 2.41307728 -2.49705373 [155,] 4.30777846 2.41307728 [156,] 1.43260568 4.30777846 [157,] 0.86353377 1.43260568 [158,] 1.59386497 0.86353377 [159,] -4.66479227 1.59386497 [160,] 3.44192817 -4.66479227 [161,] 2.25012892 3.44192817 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.23906512 -0.71944518 2 -1.38754228 1.23906512 3 -2.56423139 -1.38754228 4 9.42507673 -2.56423139 5 2.10807834 9.42507673 6 9.33204480 2.10807834 7 -2.01779858 9.33204480 8 -2.16705843 -2.01779858 9 0.81783143 -2.16705843 10 -0.52043666 0.81783143 11 -1.21749870 -0.52043666 12 -0.73002301 -1.21749870 13 2.64730188 -0.73002301 14 -0.15947724 2.64730188 15 0.94861259 -0.15947724 16 1.16467818 0.94861259 17 0.33067542 1.16467818 18 -2.81684313 0.33067542 19 1.43402730 -2.81684313 20 -3.12309739 1.43402730 21 -1.25376449 -3.12309739 22 -0.81684313 -1.25376449 23 -0.39965578 -0.81684313 24 0.50699261 -0.39965578 25 -7.25218948 0.50699261 26 -0.43498592 -7.25218948 27 1.91223275 -0.43498592 28 1.72938407 1.91223275 29 -2.15020698 1.72938407 30 -2.52959285 -2.15020698 31 0.99431493 -2.52959285 32 -0.56913563 0.99431493 33 -1.30699578 -0.56913563 34 0.10981965 -1.30699578 35 -3.58724240 0.10981965 36 3.18469256 -3.58724240 37 -0.12451902 3.18469256 38 -0.95872740 -0.12451902 39 -3.63736300 -0.95872740 40 -3.05455034 -3.63736300 41 2.51015554 -3.05455034 42 -3.27377887 2.51015554 43 -0.36943550 -3.27377887 44 -3.11699007 -0.36943550 45 -2.04664947 -3.11699007 46 -3.15473930 -2.04664947 47 -1.29188564 -3.15473930 48 4.23327747 -1.29188564 49 -2.46999638 4.23327747 50 -1.69359092 -2.46999638 51 1.01242170 -1.69359092 52 2.75239508 1.01242170 53 -0.52448300 2.75239508 54 -3.49426272 -0.52448300 55 -0.05455034 -3.49426272 56 1.73238070 -0.05455034 57 -3.48668153 1.73238070 58 -4.33584667 -3.48668153 59 0.60929479 -4.33584667 60 2.56512814 0.60929479 61 -1.51253579 2.56512814 62 -3.19274639 -1.51253579 63 0.85737421 -3.19274639 64 0.82062245 0.85737421 65 -4.91865933 0.82062245 66 1.90465155 -4.91865933 67 -2.48531214 1.90465155 68 0.87268997 -2.48531214 69 1.74170319 0.87268997 70 0.17699731 1.74170319 71 3.25771011 0.17699731 72 0.65046481 3.25771011 73 -2.19727871 0.65046481 74 -2.55844375 -2.19727871 75 4.88916950 -2.55844375 76 2.30324615 4.88916950 77 3.35647744 2.30324615 78 0.52842861 3.35647744 79 -4.41234683 0.52842861 80 -1.33442505 -4.41234683 81 -1.45009606 -1.33442505 82 -3.25829681 -1.45009606 83 0.65625246 -3.25829681 84 -0.34058461 0.65625246 85 0.03985097 -0.34058461 86 0.84526070 0.03985097 87 -1.02395814 0.84526070 88 1.09171287 -1.02395814 89 3.87280403 1.09171287 90 2.03232202 3.87280403 91 1.43260568 2.03232202 92 0.65662438 1.43260568 93 2.05496111 0.65662438 94 -3.86574772 2.05496111 95 -0.31015871 -3.86574772 96 1.68542303 -0.31015871 97 -1.86275109 1.68542303 98 0.36705526 -1.86275109 99 -2.38312402 0.36705526 100 -0.62678518 -2.38312402 101 1.68542303 -0.62678518 102 0.52247467 1.68542303 103 -4.14125640 0.52247467 104 3.60176584 -4.14125640 105 2.69911154 3.60176584 106 -0.33758798 2.69911154 107 3.99135762 -0.33758798 108 -0.82742095 3.99135762 109 8.36458393 -0.82742095 110 1.56201745 8.36458393 111 -0.29630390 1.56201745 112 -2.95361755 -0.29630390 113 1.94861259 -2.95361755 114 2.09912776 1.94861259 115 -1.32247784 2.09912776 116 0.84842363 -1.32247784 117 -0.10287739 0.84842363 118 -4.04522785 -0.10287739 119 2.17699731 -4.04522785 120 0.44808774 2.17699731 121 1.02753184 0.44808774 122 -1.15473930 1.02753184 123 -4.18216857 -1.15473930 124 -1.22807653 -4.18216857 125 -2.83215889 -1.22807653 126 -2.49300739 -2.83215889 127 -0.39840046 -2.49300739 128 1.59386497 -0.39840046 129 0.82678201 1.59386497 130 -2.78345992 0.82678201 131 3.11472388 -2.78345992 132 -2.01480195 3.11472388 133 2.50099935 -2.01480195 134 -0.18216857 2.50099935 135 2.49783642 -0.18216857 136 7.79156593 2.49783642 137 1.00347113 7.79156593 138 0.61245772 1.00347113 139 -1.19448769 0.61245772 140 -1.87469830 -1.19448769 141 -2.34058461 -1.87469830 142 2.29408995 -2.34058461 143 -1.19132476 2.29408995 144 -0.15531684 -1.19132476 145 -0.15511122 -0.15531684 146 0.54037582 -0.15511122 147 -2.11661815 0.54037582 148 -3.47299301 -2.11661815 149 2.45561669 -3.47299301 150 0.57733321 2.45561669 151 3.61845099 0.57733321 152 -2.59619298 3.61845099 153 -2.49705373 -2.59619298 154 2.41307728 -2.49705373 155 4.30777846 2.41307728 156 1.43260568 4.30777846 157 0.86353377 1.43260568 158 1.59386497 0.86353377 159 -4.66479227 1.59386497 160 3.44192817 -4.66479227 161 2.25012892 3.44192817 > 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/7456i1321632630.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/8ygnw1321632630.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/97c5j1321632630.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/10171s1321632630.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='') + } + } Error: subscript out of bounds Execution halted