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(41 + ,38 + ,13 + ,12 + ,14 + ,12 + ,39 + ,32 + ,16 + ,11 + ,18 + ,11 + ,30 + ,35 + ,19 + ,15 + ,11 + ,14 + ,31 + ,33 + ,15 + ,6 + ,12 + ,12 + ,34 + ,37 + ,14 + ,13 + ,16 + ,21 + ,35 + ,29 + ,13 + ,10 + ,18 + ,12 + ,39 + ,31 + ,19 + ,12 + ,14 + ,22 + ,34 + ,36 + ,15 + ,14 + ,14 + ,11 + ,36 + ,35 + ,14 + ,12 + ,15 + ,10 + ,37 + ,38 + ,15 + ,6 + ,15 + ,13 + ,38 + ,31 + ,16 + ,10 + ,17 + ,10 + ,36 + ,34 + ,16 + ,12 + ,19 + ,8 + ,38 + ,35 + ,16 + ,12 + ,10 + ,15 + ,39 + ,38 + ,16 + ,11 + ,16 + ,14 + ,33 + ,37 + ,17 + ,15 + ,18 + ,10 + ,32 + ,33 + ,15 + ,12 + ,14 + ,14 + ,36 + ,32 + ,15 + ,10 + ,14 + ,14 + ,38 + ,38 + ,20 + ,12 + ,17 + ,11 + ,39 + ,38 + ,18 + ,11 + ,14 + ,10 + ,32 + ,32 + ,16 + ,12 + ,16 + ,13 + ,32 + ,33 + ,16 + ,11 + ,18 + ,7 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,39 + ,32 + ,17 + ,9 + ,17 + ,11 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,31 + ,28 + ,15 + ,12 + ,16 + ,9 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,32 + ,33 + ,7 + ,7 + ,16 + ,8 + ,29 + ,31 + ,10 + ,6 + ,9 + ,20 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,38 + ,28 + ,14 + ,10 + ,12 + ,11 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,37 + ,32 + ,14 + ,6 + ,15 + ,12 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,37 + ,38 + ,20 + ,12 + ,16 + ,10 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,29 + ,30 + ,13 + ,12 + ,13 + ,10 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,33 + ,31 + ,15 + ,13 + ,15 + ,11 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,31 + ,35 + ,8 + ,9 + ,13 + ,12 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,30 + ,34 + ,15 + ,9 + ,16 + ,14 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,35 + ,34 + ,14 + ,8 + ,9 + ,19 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,32 + ,35 + ,12 + ,8 + ,12 + ,18 + ,34 + ,36 + ,13 + ,8 + ,13 + ,16) + ,dim=c(6 + ,162) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression') + ,1:162)) > y <- array(NA,dim=c(6,162),dimnames=list(c('Connected','Separate','Learning','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 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '3' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 Separate Software Happiness Depression t 1 13 41 38 12 14 12 1 2 16 39 32 11 18 11 2 3 19 30 35 15 11 14 3 4 15 31 33 6 12 12 4 5 14 34 37 13 16 21 5 6 13 35 29 10 18 12 6 7 19 39 31 12 14 22 7 8 15 34 36 14 14 11 8 9 14 36 35 12 15 10 9 10 15 37 38 6 15 13 10 11 16 38 31 10 17 10 11 12 16 36 34 12 19 8 12 13 16 38 35 12 10 15 13 14 16 39 38 11 16 14 14 15 17 33 37 15 18 10 15 16 15 32 33 12 14 14 16 17 15 36 32 10 14 14 17 18 20 38 38 12 17 11 18 19 18 39 38 11 14 10 19 20 16 32 32 12 16 13 20 21 16 32 33 11 18 7 21 22 16 31 31 12 11 14 22 23 19 39 38 13 14 12 23 24 16 37 39 11 12 14 24 25 17 39 32 9 17 11 25 26 17 41 32 13 9 9 26 27 16 36 35 10 16 11 27 28 15 33 37 14 14 15 28 29 16 33 33 12 15 14 29 30 14 34 33 10 11 13 30 31 15 31 28 12 16 9 31 32 12 27 32 8 13 15 32 33 14 37 31 10 17 10 33 34 16 34 37 12 15 11 34 35 14 34 30 12 14 13 35 36 7 32 33 7 16 8 36 37 10 29 31 6 9 20 37 38 14 36 33 12 15 12 38 39 16 29 31 10 17 10 39 40 16 35 33 10 13 10 40 41 16 37 32 10 15 9 41 42 14 34 33 12 16 14 42 43 20 38 32 15 16 8 43 44 14 35 33 10 12 14 44 45 14 38 28 10 12 11 45 46 11 37 35 12 11 13 46 47 14 38 39 13 15 9 47 48 15 33 34 11 15 11 48 49 16 36 38 11 17 15 49 50 14 38 32 12 13 11 50 51 16 32 38 14 16 10 51 52 14 32 30 10 14 14 52 53 12 32 33 12 11 18 53 54 16 34 38 13 12 14 54 55 9 32 32 5 12 11 55 56 14 37 32 6 15 12 56 57 16 39 34 12 16 13 57 58 16 29 34 12 15 9 58 59 15 37 36 11 12 10 59 60 16 35 34 10 12 15 60 61 12 30 28 7 8 20 61 62 16 38 34 12 13 12 62 63 16 34 35 14 11 12 63 64 14 31 35 11 14 14 64 65 16 34 31 12 15 13 65 66 17 35 37 13 10 11 66 67 18 36 35 14 11 17 67 68 18 30 27 11 12 12 68 69 12 39 40 12 15 13 69 70 16 35 37 12 15 14 70 71 10 38 36 8 14 13 71 72 14 31 38 11 16 15 72 73 18 34 39 14 15 13 73 74 18 38 41 14 15 10 74 75 16 34 27 12 13 11 75 76 17 39 30 9 12 19 76 77 16 37 37 13 17 13 77 78 16 34 31 11 13 17 78 79 13 28 31 12 15 13 79 80 16 37 27 12 13 9 80 81 16 33 36 12 15 11 81 82 20 37 38 12 16 10 82 83 16 35 37 12 15 9 83 84 15 37 33 12 16 12 84 85 15 32 34 11 15 12 85 86 16 33 31 10 14 13 86 87 14 38 39 9 15 13 87 88 16 33 34 12 14 12 88 89 16 29 32 12 13 15 89 90 15 33 33 12 7 22 90 91 12 31 36 9 17 13 91 92 17 36 32 15 13 15 92 93 16 35 41 12 15 13 93 94 15 32 28 12 14 15 94 95 13 29 30 12 13 10 95 96 16 39 36 10 16 11 96 97 16 37 35 13 12 16 97 98 16 35 31 9 14 11 98 99 16 37 34 12 17 11 99 100 14 32 36 10 15 10 100 101 16 38 36 14 17 10 101 102 16 37 35 11 12 16 102 103 20 36 37 15 16 12 103 104 15 32 28 11 11 11 104 105 16 33 39 11 15 16 105 106 13 40 32 12 9 19 106 107 17 38 35 12 16 11 107 108 16 41 39 12 15 16 108 109 16 36 35 11 10 15 109 110 12 43 42 7 10 24 110 111 16 30 34 12 15 14 111 112 16 31 33 14 11 15 112 113 17 32 41 11 13 11 113 114 13 32 33 11 14 15 114 115 12 37 34 10 18 12 115 116 18 37 32 13 16 10 116 117 14 33 40 13 14 14 117 118 14 34 40 8 14 13 118 119 13 33 35 11 14 9 119 120 16 38 36 12 14 15 120 121 13 33 37 11 12 15 121 122 16 31 27 13 14 14 122 123 13 38 39 12 15 11 123 124 16 37 38 14 15 8 124 125 15 33 31 13 15 11 125 126 16 31 33 15 13 11 126 127 15 39 32 10 17 8 127 128 17 44 39 11 17 10 128 129 15 33 36 9 19 11 129 130 12 35 33 11 15 13 130 131 16 32 33 10 13 11 131 132 10 28 32 11 9 20 132 133 16 40 37 8 15 10 133 134 12 27 30 11 15 15 134 135 14 37 38 12 15 12 135 136 15 32 29 12 16 14 136 137 13 28 22 9 11 23 137 138 15 34 35 11 14 14 138 139 11 30 35 10 11 16 139 140 12 35 34 8 15 11 140 141 8 31 35 9 13 12 141 142 16 32 34 8 15 10 142 143 15 30 34 9 16 14 143 144 17 30 35 15 14 12 144 145 16 31 23 11 15 12 145 146 10 40 31 8 16 11 146 147 18 32 27 13 16 12 147 148 13 36 36 12 11 13 148 149 16 32 31 12 12 11 149 150 13 35 32 9 9 19 150 151 10 38 39 7 16 12 151 152 15 42 37 13 13 17 152 153 16 34 38 9 16 9 153 154 16 35 39 6 12 12 154 155 14 35 34 8 9 19 155 156 10 33 31 8 13 18 156 157 17 36 32 15 13 15 157 158 13 32 37 6 14 14 158 159 15 33 36 9 19 11 159 160 16 34 32 11 13 9 160 161 12 32 35 8 12 18 161 162 13 34 36 8 13 16 162 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Software Happiness Depression 6.349742 0.108770 -0.019653 0.534476 0.060830 -0.073008 t -0.003861 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.1734 -1.0880 0.2509 1.1607 4.1436 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.349742 2.415661 2.629 0.00944 ** Connected 0.108770 0.046833 2.323 0.02151 * Separate -0.019653 0.044373 -0.443 0.65845 Software 0.534476 0.069055 7.740 1.2e-12 *** Happiness 0.060830 0.074729 0.814 0.41689 Depression -0.073008 0.055147 -1.324 0.18749 t -0.003861 0.003171 -1.217 0.22532 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.84 on 155 degrees of freedom Multiple R-squared: 0.36, Adjusted R-squared: 0.3352 F-statistic: 14.53 on 6 and 155 DF, p-value: 4.028e-13 > 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.85774756 0.28450489 0.1422524 [2,] 0.77302175 0.45395650 0.2269782 [3,] 0.78270508 0.43458984 0.2172949 [4,] 0.77677800 0.44644399 0.2232220 [5,] 0.70910462 0.58179075 0.2908954 [6,] 0.63754506 0.72490987 0.3624549 [7,] 0.65844658 0.68310683 0.3415534 [8,] 0.60196688 0.79606623 0.3980331 [9,] 0.83723156 0.32553688 0.1627684 [10,] 0.80627292 0.38745415 0.1937271 [11,] 0.75798650 0.48402701 0.2420135 [12,] 0.69199984 0.61600033 0.3080002 [13,] 0.64665439 0.70669122 0.3533456 [14,] 0.60759493 0.78481013 0.3924051 [15,] 0.58738760 0.82522480 0.4126124 [16,] 0.53358702 0.93282597 0.4664130 [17,] 0.47868730 0.95737459 0.5213127 [18,] 0.42839806 0.85679612 0.5716019 [19,] 0.47790082 0.95580164 0.5220992 [20,] 0.42057218 0.84114436 0.5794278 [21,] 0.43612976 0.87225953 0.5638702 [22,] 0.38431518 0.76863035 0.6156848 [23,] 0.38937502 0.77875004 0.6106250 [24,] 0.38017403 0.76034806 0.6198260 [25,] 0.32378464 0.64756929 0.6762154 [26,] 0.30955832 0.61911665 0.6904417 [27,] 0.82365342 0.35269316 0.1763466 [28,] 0.80468621 0.39062757 0.1953138 [29,] 0.78884859 0.42230282 0.2111514 [30,] 0.82419721 0.35160558 0.1758028 [31,] 0.80994999 0.38010002 0.1900500 [32,] 0.78289808 0.43420384 0.2171019 [33,] 0.76020269 0.47959462 0.2397973 [34,] 0.77538146 0.44923707 0.2246185 [35,] 0.73583664 0.52832672 0.2641634 [36,] 0.70256356 0.59487288 0.2974364 [37,] 0.87083022 0.25833956 0.1291698 [38,] 0.88084936 0.23830127 0.1191506 [39,] 0.85843309 0.28313382 0.1415669 [40,] 0.84351879 0.31296243 0.1564812 [41,] 0.83645304 0.32709393 0.1635470 [42,] 0.80700548 0.38598903 0.1929945 [43,] 0.77432688 0.45134624 0.2256731 [44,] 0.79067493 0.41865015 0.2093251 [45,] 0.76357838 0.47284323 0.2364216 [46,] 0.78593832 0.42812337 0.2140617 [47,] 0.77668714 0.44662571 0.2233129 [48,] 0.74045259 0.51909483 0.2595474 [49,] 0.72889022 0.54221956 0.2711098 [50,] 0.69344383 0.61311234 0.3065562 [51,] 0.70220332 0.59559336 0.2977967 [52,] 0.66716698 0.66566603 0.3328330 [53,] 0.62611168 0.74777664 0.3738883 [54,] 0.58591269 0.82817462 0.4140873 [55,] 0.54334629 0.91330741 0.4566537 [56,] 0.50524019 0.98951962 0.4947598 [57,] 0.48150061 0.96300122 0.5184994 [58,] 0.47724061 0.95448121 0.5227594 [59,] 0.60076819 0.79846362 0.3992318 [60,] 0.73221338 0.53557325 0.2677866 [61,] 0.69900322 0.60199357 0.3009968 [62,] 0.80415875 0.39168249 0.1958412 [63,] 0.77454372 0.45091256 0.2254563 [64,] 0.77031683 0.45936635 0.2296832 [65,] 0.74809235 0.50381531 0.2519077 [66,] 0.71099741 0.57800517 0.2890026 [67,] 0.76636045 0.46727910 0.2336395 [68,] 0.73067342 0.53865316 0.2693266 [69,] 0.71009972 0.57980056 0.2899003 [70,] 0.71488298 0.57023404 0.2851170 [71,] 0.67568176 0.64863648 0.3243182 [72,] 0.63929355 0.72141290 0.3607065 [73,] 0.78090759 0.43818481 0.2190924 [74,] 0.74602962 0.50794077 0.2539704 [75,] 0.71944359 0.56111282 0.2805564 [76,] 0.67963750 0.64072500 0.3203625 [77,] 0.66700769 0.66598462 0.3329923 [78,] 0.62449912 0.75100177 0.3755009 [79,] 0.58292106 0.83415788 0.4170789 [80,] 0.55629164 0.88741672 0.4437084 [81,] 0.52282247 0.95435506 0.4771775 [82,] 0.51449059 0.97101882 0.4855094 [83,] 0.47139772 0.94279544 0.5286023 [84,] 0.42914445 0.85828890 0.5708556 [85,] 0.38469524 0.76939048 0.6153048 [86,] 0.40570159 0.81140318 0.5942984 [87,] 0.36858501 0.73717002 0.6314150 [88,] 0.32727527 0.65455054 0.6727247 [89,] 0.32244676 0.64489352 0.6775532 [90,] 0.28092508 0.56185016 0.7190749 [91,] 0.24607366 0.49214732 0.7539263 [92,] 0.22477650 0.44955301 0.7752235 [93,] 0.20710192 0.41420385 0.7928981 [94,] 0.25463630 0.50927260 0.7453637 [95,] 0.21767748 0.43535497 0.7823225 [96,] 0.21393356 0.42786712 0.7860664 [97,] 0.22503707 0.45007415 0.7749629 [98,] 0.20335543 0.40671086 0.7966446 [99,] 0.18188441 0.36376882 0.8181156 [100,] 0.17550966 0.35101933 0.8244903 [101,] 0.16799800 0.33599600 0.8320020 [102,] 0.15853186 0.31706373 0.8414681 [103,] 0.13876712 0.27753423 0.8612329 [104,] 0.18620543 0.37241087 0.8137946 [105,] 0.16296624 0.32593248 0.8370338 [106,] 0.18320797 0.36641595 0.8167920 [107,] 0.18588859 0.37177719 0.8141114 [108,] 0.16187210 0.32374419 0.8381279 [109,] 0.15973525 0.31947050 0.8402648 [110,] 0.14920280 0.29840561 0.8507972 [111,] 0.15371889 0.30743779 0.8462811 [112,] 0.13007885 0.26015769 0.8699212 [113,] 0.11410211 0.22820423 0.8858979 [114,] 0.11296872 0.22593744 0.8870313 [115,] 0.09007812 0.18015625 0.9099219 [116,] 0.07102603 0.14205206 0.9289740 [117,] 0.05420680 0.10841360 0.9457932 [118,] 0.04047159 0.08094318 0.9595284 [119,] 0.04281571 0.08563142 0.9571843 [120,] 0.04076073 0.08152146 0.9592393 [121,] 0.04088671 0.08177342 0.9591133 [122,] 0.04492421 0.08984841 0.9550758 [123,] 0.04959757 0.09919515 0.9504024 [124,] 0.10182390 0.20364780 0.8981761 [125,] 0.10197362 0.20394724 0.8980264 [126,] 0.08028783 0.16057566 0.9197122 [127,] 0.05960237 0.11920473 0.9403976 [128,] 0.04996499 0.09992998 0.9500350 [129,] 0.04869841 0.09739683 0.9513016 [130,] 0.04326902 0.08653804 0.9567310 [131,] 0.02987984 0.05975969 0.9701202 [132,] 0.39938379 0.79876758 0.6006162 [133,] 0.39698573 0.79397146 0.6030143 [134,] 0.35558063 0.71116126 0.6444194 [135,] 0.32535160 0.65070321 0.6746484 [136,] 0.28306253 0.56612507 0.7169375 [137,] 0.26435885 0.52871771 0.7356411 [138,] 0.40280711 0.80561423 0.5971929 [139,] 0.73433323 0.53133355 0.2656668 [140,] 0.69094244 0.61811511 0.3090576 [141,] 0.56345932 0.87308136 0.4365407 [142,] 0.78909693 0.42180615 0.2109031 [143,] 0.83826751 0.32346498 0.1617325 > postscript(file="/var/wessaorg/rcomp/tmp/10sri1322166028.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/2f5wq1322166028.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/3m9l81322166028.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/4tlm21322166028.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/5l8be1322166028.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.44785766 -0.12622971 2.42245334 2.88167222 -1.68974186 -2.12718353 7 8 9 10 11 12 3.38535156 -1.84070883 -2.13892850 2.24100035 0.51993004 -0.53633597 13 14 15 16 17 18 0.32816329 0.37870202 -0.53606461 -0.36326892 0.25480909 3.68858500 19 20 21 22 23 24 2.22763313 0.43785211 0.43613416 0.91184781 2.32014005 0.89782160 25 26 27 28 29 30 2.09234538 0.08138685 1.01169162 -1.34304147 0.51731875 -0.34832746 31 32 33 34 35 36 -0.78155684 -0.50556149 -1.28636669 0.28744156 -1.63942615 -6.17338621 37 38 39 40 41 42 -1.04614115 -1.92026217 1.60695792 1.24082456 0.81282354 -1.60209359 43 44 45 46 47 48 1.90555823 -0.39087124 -1.03061218 -4.64251275 -2.73863587 -0.07422463 49 50 51 52 53 54 0.85231129 -2.06247672 -0.61252388 -0.21429640 -2.74590506 0.25134507 55 56 57 58 59 60 -2.58839317 1.22765913 -0.14138977 0.71897025 -0.31804969 1.76355973 61 62 63 64 65 66 0.40513698 0.09616531 -0.39253155 -0.49540751 0.43521526 1.07188473 67 68 69 70 71 72 1.77041037 3.44722139 -3.91631189 0.53667681 -3.67970166 -0.45421436 73 74 75 76 77 78 1.55437631 0.94343944 0.37085144 3.13814246 -0.38298286 1.43357049 79 80 81 82 83 84 -1.85811561 -0.08217187 0.55800631 4.03225538 0.22182479 -0.91227480 85 86 87 88 89 90 0.25039556 1.75483928 -0.15427739 0.67956151 1.35904955 0.82351864 91 92 93 94 95 96 -1.55806443 0.00581338 0.63107642 -0.08740165 -2.02213356 0.97141591 97 98 99 100 101 102 0.17809592 1.97208597 0.03144969 -0.26392879 -1.17225167 1.26635028 103 104 105 106 107 108 2.74503344 0.37613811 1.60913649 -2.23643997 1.03404777 0.21608157 109 110 111 112 113 114 1.45079659 -0.37418515 1.17985157 0.30266506 2.54471847 -1.37744673 115 116 117 118 119 120 -2.82565139 1.51111926 -1.47902020 1.01544076 -1.86565470 0.51758077 121 122 123 124 125 126 -1.25891890 0.50232811 -2.76473887 -0.95973685 -0.90487038 -0.59145404 127 128 129 130 131 132 -0.26737325 0.94175113 1.10342215 -2.84883344 1.99145726 -3.22333926 133 134 135 136 137 138 2.08191473 -1.87617448 -1.55628707 -0.10027101 0.76574446 0.46396631 139 140 141 142 143 144 -2.23411105 -1.33316286 -5.21437607 2.92786076 1.84598778 0.63829173 145 146 147 148 149 150 1.37461351 -3.97364026 2.22239705 -2.12030824 1.01351970 0.08070402 151 152 153 154 155 156 -2.97208572 -1.10193697 2.16308728 4.14360205 1.67378961 -2.48009776 157 158 159 160 161 162 0.25675221 1.47040387 1.21924007 1.18572927 -0.21258085 0.38654706 > postscript(file="/var/wessaorg/rcomp/tmp/6npma1322166028.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.44785766 NA 1 -0.12622971 -3.44785766 2 2.42245334 -0.12622971 3 2.88167222 2.42245334 4 -1.68974186 2.88167222 5 -2.12718353 -1.68974186 6 3.38535156 -2.12718353 7 -1.84070883 3.38535156 8 -2.13892850 -1.84070883 9 2.24100035 -2.13892850 10 0.51993004 2.24100035 11 -0.53633597 0.51993004 12 0.32816329 -0.53633597 13 0.37870202 0.32816329 14 -0.53606461 0.37870202 15 -0.36326892 -0.53606461 16 0.25480909 -0.36326892 17 3.68858500 0.25480909 18 2.22763313 3.68858500 19 0.43785211 2.22763313 20 0.43613416 0.43785211 21 0.91184781 0.43613416 22 2.32014005 0.91184781 23 0.89782160 2.32014005 24 2.09234538 0.89782160 25 0.08138685 2.09234538 26 1.01169162 0.08138685 27 -1.34304147 1.01169162 28 0.51731875 -1.34304147 29 -0.34832746 0.51731875 30 -0.78155684 -0.34832746 31 -0.50556149 -0.78155684 32 -1.28636669 -0.50556149 33 0.28744156 -1.28636669 34 -1.63942615 0.28744156 35 -6.17338621 -1.63942615 36 -1.04614115 -6.17338621 37 -1.92026217 -1.04614115 38 1.60695792 -1.92026217 39 1.24082456 1.60695792 40 0.81282354 1.24082456 41 -1.60209359 0.81282354 42 1.90555823 -1.60209359 43 -0.39087124 1.90555823 44 -1.03061218 -0.39087124 45 -4.64251275 -1.03061218 46 -2.73863587 -4.64251275 47 -0.07422463 -2.73863587 48 0.85231129 -0.07422463 49 -2.06247672 0.85231129 50 -0.61252388 -2.06247672 51 -0.21429640 -0.61252388 52 -2.74590506 -0.21429640 53 0.25134507 -2.74590506 54 -2.58839317 0.25134507 55 1.22765913 -2.58839317 56 -0.14138977 1.22765913 57 0.71897025 -0.14138977 58 -0.31804969 0.71897025 59 1.76355973 -0.31804969 60 0.40513698 1.76355973 61 0.09616531 0.40513698 62 -0.39253155 0.09616531 63 -0.49540751 -0.39253155 64 0.43521526 -0.49540751 65 1.07188473 0.43521526 66 1.77041037 1.07188473 67 3.44722139 1.77041037 68 -3.91631189 3.44722139 69 0.53667681 -3.91631189 70 -3.67970166 0.53667681 71 -0.45421436 -3.67970166 72 1.55437631 -0.45421436 73 0.94343944 1.55437631 74 0.37085144 0.94343944 75 3.13814246 0.37085144 76 -0.38298286 3.13814246 77 1.43357049 -0.38298286 78 -1.85811561 1.43357049 79 -0.08217187 -1.85811561 80 0.55800631 -0.08217187 81 4.03225538 0.55800631 82 0.22182479 4.03225538 83 -0.91227480 0.22182479 84 0.25039556 -0.91227480 85 1.75483928 0.25039556 86 -0.15427739 1.75483928 87 0.67956151 -0.15427739 88 1.35904955 0.67956151 89 0.82351864 1.35904955 90 -1.55806443 0.82351864 91 0.00581338 -1.55806443 92 0.63107642 0.00581338 93 -0.08740165 0.63107642 94 -2.02213356 -0.08740165 95 0.97141591 -2.02213356 96 0.17809592 0.97141591 97 1.97208597 0.17809592 98 0.03144969 1.97208597 99 -0.26392879 0.03144969 100 -1.17225167 -0.26392879 101 1.26635028 -1.17225167 102 2.74503344 1.26635028 103 0.37613811 2.74503344 104 1.60913649 0.37613811 105 -2.23643997 1.60913649 106 1.03404777 -2.23643997 107 0.21608157 1.03404777 108 1.45079659 0.21608157 109 -0.37418515 1.45079659 110 1.17985157 -0.37418515 111 0.30266506 1.17985157 112 2.54471847 0.30266506 113 -1.37744673 2.54471847 114 -2.82565139 -1.37744673 115 1.51111926 -2.82565139 116 -1.47902020 1.51111926 117 1.01544076 -1.47902020 118 -1.86565470 1.01544076 119 0.51758077 -1.86565470 120 -1.25891890 0.51758077 121 0.50232811 -1.25891890 122 -2.76473887 0.50232811 123 -0.95973685 -2.76473887 124 -0.90487038 -0.95973685 125 -0.59145404 -0.90487038 126 -0.26737325 -0.59145404 127 0.94175113 -0.26737325 128 1.10342215 0.94175113 129 -2.84883344 1.10342215 130 1.99145726 -2.84883344 131 -3.22333926 1.99145726 132 2.08191473 -3.22333926 133 -1.87617448 2.08191473 134 -1.55628707 -1.87617448 135 -0.10027101 -1.55628707 136 0.76574446 -0.10027101 137 0.46396631 0.76574446 138 -2.23411105 0.46396631 139 -1.33316286 -2.23411105 140 -5.21437607 -1.33316286 141 2.92786076 -5.21437607 142 1.84598778 2.92786076 143 0.63829173 1.84598778 144 1.37461351 0.63829173 145 -3.97364026 1.37461351 146 2.22239705 -3.97364026 147 -2.12030824 2.22239705 148 1.01351970 -2.12030824 149 0.08070402 1.01351970 150 -2.97208572 0.08070402 151 -1.10193697 -2.97208572 152 2.16308728 -1.10193697 153 4.14360205 2.16308728 154 1.67378961 4.14360205 155 -2.48009776 1.67378961 156 0.25675221 -2.48009776 157 1.47040387 0.25675221 158 1.21924007 1.47040387 159 1.18572927 1.21924007 160 -0.21258085 1.18572927 161 0.38654706 -0.21258085 162 NA 0.38654706 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.12622971 -3.44785766 [2,] 2.42245334 -0.12622971 [3,] 2.88167222 2.42245334 [4,] -1.68974186 2.88167222 [5,] -2.12718353 -1.68974186 [6,] 3.38535156 -2.12718353 [7,] -1.84070883 3.38535156 [8,] -2.13892850 -1.84070883 [9,] 2.24100035 -2.13892850 [10,] 0.51993004 2.24100035 [11,] -0.53633597 0.51993004 [12,] 0.32816329 -0.53633597 [13,] 0.37870202 0.32816329 [14,] -0.53606461 0.37870202 [15,] -0.36326892 -0.53606461 [16,] 0.25480909 -0.36326892 [17,] 3.68858500 0.25480909 [18,] 2.22763313 3.68858500 [19,] 0.43785211 2.22763313 [20,] 0.43613416 0.43785211 [21,] 0.91184781 0.43613416 [22,] 2.32014005 0.91184781 [23,] 0.89782160 2.32014005 [24,] 2.09234538 0.89782160 [25,] 0.08138685 2.09234538 [26,] 1.01169162 0.08138685 [27,] -1.34304147 1.01169162 [28,] 0.51731875 -1.34304147 [29,] -0.34832746 0.51731875 [30,] -0.78155684 -0.34832746 [31,] -0.50556149 -0.78155684 [32,] -1.28636669 -0.50556149 [33,] 0.28744156 -1.28636669 [34,] -1.63942615 0.28744156 [35,] -6.17338621 -1.63942615 [36,] -1.04614115 -6.17338621 [37,] -1.92026217 -1.04614115 [38,] 1.60695792 -1.92026217 [39,] 1.24082456 1.60695792 [40,] 0.81282354 1.24082456 [41,] -1.60209359 0.81282354 [42,] 1.90555823 -1.60209359 [43,] -0.39087124 1.90555823 [44,] -1.03061218 -0.39087124 [45,] -4.64251275 -1.03061218 [46,] -2.73863587 -4.64251275 [47,] -0.07422463 -2.73863587 [48,] 0.85231129 -0.07422463 [49,] -2.06247672 0.85231129 [50,] -0.61252388 -2.06247672 [51,] -0.21429640 -0.61252388 [52,] -2.74590506 -0.21429640 [53,] 0.25134507 -2.74590506 [54,] -2.58839317 0.25134507 [55,] 1.22765913 -2.58839317 [56,] -0.14138977 1.22765913 [57,] 0.71897025 -0.14138977 [58,] -0.31804969 0.71897025 [59,] 1.76355973 -0.31804969 [60,] 0.40513698 1.76355973 [61,] 0.09616531 0.40513698 [62,] -0.39253155 0.09616531 [63,] -0.49540751 -0.39253155 [64,] 0.43521526 -0.49540751 [65,] 1.07188473 0.43521526 [66,] 1.77041037 1.07188473 [67,] 3.44722139 1.77041037 [68,] -3.91631189 3.44722139 [69,] 0.53667681 -3.91631189 [70,] -3.67970166 0.53667681 [71,] -0.45421436 -3.67970166 [72,] 1.55437631 -0.45421436 [73,] 0.94343944 1.55437631 [74,] 0.37085144 0.94343944 [75,] 3.13814246 0.37085144 [76,] -0.38298286 3.13814246 [77,] 1.43357049 -0.38298286 [78,] -1.85811561 1.43357049 [79,] -0.08217187 -1.85811561 [80,] 0.55800631 -0.08217187 [81,] 4.03225538 0.55800631 [82,] 0.22182479 4.03225538 [83,] -0.91227480 0.22182479 [84,] 0.25039556 -0.91227480 [85,] 1.75483928 0.25039556 [86,] -0.15427739 1.75483928 [87,] 0.67956151 -0.15427739 [88,] 1.35904955 0.67956151 [89,] 0.82351864 1.35904955 [90,] -1.55806443 0.82351864 [91,] 0.00581338 -1.55806443 [92,] 0.63107642 0.00581338 [93,] -0.08740165 0.63107642 [94,] -2.02213356 -0.08740165 [95,] 0.97141591 -2.02213356 [96,] 0.17809592 0.97141591 [97,] 1.97208597 0.17809592 [98,] 0.03144969 1.97208597 [99,] -0.26392879 0.03144969 [100,] -1.17225167 -0.26392879 [101,] 1.26635028 -1.17225167 [102,] 2.74503344 1.26635028 [103,] 0.37613811 2.74503344 [104,] 1.60913649 0.37613811 [105,] -2.23643997 1.60913649 [106,] 1.03404777 -2.23643997 [107,] 0.21608157 1.03404777 [108,] 1.45079659 0.21608157 [109,] -0.37418515 1.45079659 [110,] 1.17985157 -0.37418515 [111,] 0.30266506 1.17985157 [112,] 2.54471847 0.30266506 [113,] -1.37744673 2.54471847 [114,] -2.82565139 -1.37744673 [115,] 1.51111926 -2.82565139 [116,] -1.47902020 1.51111926 [117,] 1.01544076 -1.47902020 [118,] -1.86565470 1.01544076 [119,] 0.51758077 -1.86565470 [120,] -1.25891890 0.51758077 [121,] 0.50232811 -1.25891890 [122,] -2.76473887 0.50232811 [123,] -0.95973685 -2.76473887 [124,] -0.90487038 -0.95973685 [125,] -0.59145404 -0.90487038 [126,] -0.26737325 -0.59145404 [127,] 0.94175113 -0.26737325 [128,] 1.10342215 0.94175113 [129,] -2.84883344 1.10342215 [130,] 1.99145726 -2.84883344 [131,] -3.22333926 1.99145726 [132,] 2.08191473 -3.22333926 [133,] -1.87617448 2.08191473 [134,] -1.55628707 -1.87617448 [135,] -0.10027101 -1.55628707 [136,] 0.76574446 -0.10027101 [137,] 0.46396631 0.76574446 [138,] -2.23411105 0.46396631 [139,] -1.33316286 -2.23411105 [140,] -5.21437607 -1.33316286 [141,] 2.92786076 -5.21437607 [142,] 1.84598778 2.92786076 [143,] 0.63829173 1.84598778 [144,] 1.37461351 0.63829173 [145,] -3.97364026 1.37461351 [146,] 2.22239705 -3.97364026 [147,] -2.12030824 2.22239705 [148,] 1.01351970 -2.12030824 [149,] 0.08070402 1.01351970 [150,] -2.97208572 0.08070402 [151,] -1.10193697 -2.97208572 [152,] 2.16308728 -1.10193697 [153,] 4.14360205 2.16308728 [154,] 1.67378961 4.14360205 [155,] -2.48009776 1.67378961 [156,] 0.25675221 -2.48009776 [157,] 1.47040387 0.25675221 [158,] 1.21924007 1.47040387 [159,] 1.18572927 1.21924007 [160,] -0.21258085 1.18572927 [161,] 0.38654706 -0.21258085 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.12622971 -3.44785766 2 2.42245334 -0.12622971 3 2.88167222 2.42245334 4 -1.68974186 2.88167222 5 -2.12718353 -1.68974186 6 3.38535156 -2.12718353 7 -1.84070883 3.38535156 8 -2.13892850 -1.84070883 9 2.24100035 -2.13892850 10 0.51993004 2.24100035 11 -0.53633597 0.51993004 12 0.32816329 -0.53633597 13 0.37870202 0.32816329 14 -0.53606461 0.37870202 15 -0.36326892 -0.53606461 16 0.25480909 -0.36326892 17 3.68858500 0.25480909 18 2.22763313 3.68858500 19 0.43785211 2.22763313 20 0.43613416 0.43785211 21 0.91184781 0.43613416 22 2.32014005 0.91184781 23 0.89782160 2.32014005 24 2.09234538 0.89782160 25 0.08138685 2.09234538 26 1.01169162 0.08138685 27 -1.34304147 1.01169162 28 0.51731875 -1.34304147 29 -0.34832746 0.51731875 30 -0.78155684 -0.34832746 31 -0.50556149 -0.78155684 32 -1.28636669 -0.50556149 33 0.28744156 -1.28636669 34 -1.63942615 0.28744156 35 -6.17338621 -1.63942615 36 -1.04614115 -6.17338621 37 -1.92026217 -1.04614115 38 1.60695792 -1.92026217 39 1.24082456 1.60695792 40 0.81282354 1.24082456 41 -1.60209359 0.81282354 42 1.90555823 -1.60209359 43 -0.39087124 1.90555823 44 -1.03061218 -0.39087124 45 -4.64251275 -1.03061218 46 -2.73863587 -4.64251275 47 -0.07422463 -2.73863587 48 0.85231129 -0.07422463 49 -2.06247672 0.85231129 50 -0.61252388 -2.06247672 51 -0.21429640 -0.61252388 52 -2.74590506 -0.21429640 53 0.25134507 -2.74590506 54 -2.58839317 0.25134507 55 1.22765913 -2.58839317 56 -0.14138977 1.22765913 57 0.71897025 -0.14138977 58 -0.31804969 0.71897025 59 1.76355973 -0.31804969 60 0.40513698 1.76355973 61 0.09616531 0.40513698 62 -0.39253155 0.09616531 63 -0.49540751 -0.39253155 64 0.43521526 -0.49540751 65 1.07188473 0.43521526 66 1.77041037 1.07188473 67 3.44722139 1.77041037 68 -3.91631189 3.44722139 69 0.53667681 -3.91631189 70 -3.67970166 0.53667681 71 -0.45421436 -3.67970166 72 1.55437631 -0.45421436 73 0.94343944 1.55437631 74 0.37085144 0.94343944 75 3.13814246 0.37085144 76 -0.38298286 3.13814246 77 1.43357049 -0.38298286 78 -1.85811561 1.43357049 79 -0.08217187 -1.85811561 80 0.55800631 -0.08217187 81 4.03225538 0.55800631 82 0.22182479 4.03225538 83 -0.91227480 0.22182479 84 0.25039556 -0.91227480 85 1.75483928 0.25039556 86 -0.15427739 1.75483928 87 0.67956151 -0.15427739 88 1.35904955 0.67956151 89 0.82351864 1.35904955 90 -1.55806443 0.82351864 91 0.00581338 -1.55806443 92 0.63107642 0.00581338 93 -0.08740165 0.63107642 94 -2.02213356 -0.08740165 95 0.97141591 -2.02213356 96 0.17809592 0.97141591 97 1.97208597 0.17809592 98 0.03144969 1.97208597 99 -0.26392879 0.03144969 100 -1.17225167 -0.26392879 101 1.26635028 -1.17225167 102 2.74503344 1.26635028 103 0.37613811 2.74503344 104 1.60913649 0.37613811 105 -2.23643997 1.60913649 106 1.03404777 -2.23643997 107 0.21608157 1.03404777 108 1.45079659 0.21608157 109 -0.37418515 1.45079659 110 1.17985157 -0.37418515 111 0.30266506 1.17985157 112 2.54471847 0.30266506 113 -1.37744673 2.54471847 114 -2.82565139 -1.37744673 115 1.51111926 -2.82565139 116 -1.47902020 1.51111926 117 1.01544076 -1.47902020 118 -1.86565470 1.01544076 119 0.51758077 -1.86565470 120 -1.25891890 0.51758077 121 0.50232811 -1.25891890 122 -2.76473887 0.50232811 123 -0.95973685 -2.76473887 124 -0.90487038 -0.95973685 125 -0.59145404 -0.90487038 126 -0.26737325 -0.59145404 127 0.94175113 -0.26737325 128 1.10342215 0.94175113 129 -2.84883344 1.10342215 130 1.99145726 -2.84883344 131 -3.22333926 1.99145726 132 2.08191473 -3.22333926 133 -1.87617448 2.08191473 134 -1.55628707 -1.87617448 135 -0.10027101 -1.55628707 136 0.76574446 -0.10027101 137 0.46396631 0.76574446 138 -2.23411105 0.46396631 139 -1.33316286 -2.23411105 140 -5.21437607 -1.33316286 141 2.92786076 -5.21437607 142 1.84598778 2.92786076 143 0.63829173 1.84598778 144 1.37461351 0.63829173 145 -3.97364026 1.37461351 146 2.22239705 -3.97364026 147 -2.12030824 2.22239705 148 1.01351970 -2.12030824 149 0.08070402 1.01351970 150 -2.97208572 0.08070402 151 -1.10193697 -2.97208572 152 2.16308728 -1.10193697 153 4.14360205 2.16308728 154 1.67378961 4.14360205 155 -2.48009776 1.67378961 156 0.25675221 -2.48009776 157 1.47040387 0.25675221 158 1.21924007 1.47040387 159 1.18572927 1.21924007 160 -0.21258085 1.18572927 161 0.38654706 -0.21258085 > 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/7u0wh1322166028.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/87gl71322166028.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/98cqo1322166028.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/10hme41322166028.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/11w0cp1322166028.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/12mzs71322166028.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/1383mv1322166028.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/14t95n1322166028.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/15915g1322166028.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/16hqoq1322166028.tab") + } > > try(system("convert tmp/10sri1322166028.ps tmp/10sri1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/2f5wq1322166028.ps tmp/2f5wq1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/3m9l81322166028.ps tmp/3m9l81322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/4tlm21322166028.ps tmp/4tlm21322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/5l8be1322166028.ps tmp/5l8be1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/6npma1322166028.ps tmp/6npma1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/7u0wh1322166028.ps tmp/7u0wh1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/87gl71322166028.ps tmp/87gl71322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/98cqo1322166028.ps tmp/98cqo1322166028.png",intern=TRUE)) character(0) > try(system("convert tmp/10hme41322166028.ps tmp/10hme41322166028.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.167 0.559 5.765