R version 2.12.1 (2010-12-16) Copyright (C) 2010 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 = 'No 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 1 13 41 38 12 14 12 2 16 39 32 11 18 11 3 19 30 35 15 11 14 4 15 31 33 6 12 12 5 14 34 37 13 16 21 6 13 35 29 10 18 12 7 19 39 31 12 14 22 8 15 34 36 14 14 11 9 14 36 35 12 15 10 10 15 37 38 6 15 13 11 16 38 31 10 17 10 12 16 36 34 12 19 8 13 16 38 35 12 10 15 14 16 39 38 11 16 14 15 17 33 37 15 18 10 16 15 32 33 12 14 14 17 15 36 32 10 14 14 18 20 38 38 12 17 11 19 18 39 38 11 14 10 20 16 32 32 12 16 13 21 16 32 33 11 18 7 22 16 31 31 12 11 14 23 19 39 38 13 14 12 24 16 37 39 11 12 14 25 17 39 32 9 17 11 26 17 41 32 13 9 9 27 16 36 35 10 16 11 28 15 33 37 14 14 15 29 16 33 33 12 15 14 30 14 34 33 10 11 13 31 15 31 28 12 16 9 32 12 27 32 8 13 15 33 14 37 31 10 17 10 34 16 34 37 12 15 11 35 14 34 30 12 14 13 36 7 32 33 7 16 8 37 10 29 31 6 9 20 38 14 36 33 12 15 12 39 16 29 31 10 17 10 40 16 35 33 10 13 10 41 16 37 32 10 15 9 42 14 34 33 12 16 14 43 20 38 32 15 16 8 44 14 35 33 10 12 14 45 14 38 28 10 12 11 46 11 37 35 12 11 13 47 14 38 39 13 15 9 48 15 33 34 11 15 11 49 16 36 38 11 17 15 50 14 38 32 12 13 11 51 16 32 38 14 16 10 52 14 32 30 10 14 14 53 12 32 33 12 11 18 54 16 34 38 13 12 14 55 9 32 32 5 12 11 56 14 37 32 6 15 12 57 16 39 34 12 16 13 58 16 29 34 12 15 9 59 15 37 36 11 12 10 60 16 35 34 10 12 15 61 12 30 28 7 8 20 62 16 38 34 12 13 12 63 16 34 35 14 11 12 64 14 31 35 11 14 14 65 16 34 31 12 15 13 66 17 35 37 13 10 11 67 18 36 35 14 11 17 68 18 30 27 11 12 12 69 12 39 40 12 15 13 70 16 35 37 12 15 14 71 10 38 36 8 14 13 72 14 31 38 11 16 15 73 18 34 39 14 15 13 74 18 38 41 14 15 10 75 16 34 27 12 13 11 76 17 39 30 9 12 19 77 16 37 37 13 17 13 78 16 34 31 11 13 17 79 13 28 31 12 15 13 80 16 37 27 12 13 9 81 16 33 36 12 15 11 82 20 37 38 12 16 10 83 16 35 37 12 15 9 84 15 37 33 12 16 12 85 15 32 34 11 15 12 86 16 33 31 10 14 13 87 14 38 39 9 15 13 88 16 33 34 12 14 12 89 16 29 32 12 13 15 90 15 33 33 12 7 22 91 12 31 36 9 17 13 92 17 36 32 15 13 15 93 16 35 41 12 15 13 94 15 32 28 12 14 15 95 13 29 30 12 13 10 96 16 39 36 10 16 11 97 16 37 35 13 12 16 98 16 35 31 9 14 11 99 16 37 34 12 17 11 100 14 32 36 10 15 10 101 16 38 36 14 17 10 102 16 37 35 11 12 16 103 20 36 37 15 16 12 104 15 32 28 11 11 11 105 16 33 39 11 15 16 106 13 40 32 12 9 19 107 17 38 35 12 16 11 108 16 41 39 12 15 16 109 16 36 35 11 10 15 110 12 43 42 7 10 24 111 16 30 34 12 15 14 112 16 31 33 14 11 15 113 17 32 41 11 13 11 114 13 32 33 11 14 15 115 12 37 34 10 18 12 116 18 37 32 13 16 10 117 14 33 40 13 14 14 118 14 34 40 8 14 13 119 13 33 35 11 14 9 120 16 38 36 12 14 15 121 13 33 37 11 12 15 122 16 31 27 13 14 14 123 13 38 39 12 15 11 124 16 37 38 14 15 8 125 15 33 31 13 15 11 126 16 31 33 15 13 11 127 15 39 32 10 17 8 128 17 44 39 11 17 10 129 15 33 36 9 19 11 130 12 35 33 11 15 13 131 16 32 33 10 13 11 132 10 28 32 11 9 20 133 16 40 37 8 15 10 134 12 27 30 11 15 15 135 14 37 38 12 15 12 136 15 32 29 12 16 14 137 13 28 22 9 11 23 138 15 34 35 11 14 14 139 11 30 35 10 11 16 140 12 35 34 8 15 11 141 8 31 35 9 13 12 142 16 32 34 8 15 10 143 15 30 34 9 16 14 144 17 30 35 15 14 12 145 16 31 23 11 15 12 146 10 40 31 8 16 11 147 18 32 27 13 16 12 148 13 36 36 12 11 13 149 16 32 31 12 12 11 150 13 35 32 9 9 19 151 10 38 39 7 16 12 152 15 42 37 13 13 17 153 16 34 38 9 16 9 154 16 35 39 6 12 12 155 14 35 34 8 9 19 156 10 33 31 8 13 18 157 17 36 32 15 13 15 158 13 32 37 6 14 14 159 15 33 36 9 19 11 160 16 34 32 11 13 9 161 12 32 35 8 12 18 162 13 34 36 8 13 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Software Happiness Depression 5.84194 0.11556 -0.02408 0.54547 0.06415 -0.07758 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.9692 -1.1392 0.1934 1.1185 4.0012 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.84194 2.38305 2.451 0.0153 * Connected 0.11556 0.04657 2.481 0.0142 * Separate -0.02408 0.04429 -0.544 0.5874 Software 0.54547 0.06857 7.955 3.41e-13 *** Happiness 0.06415 0.07479 0.858 0.3924 Depression -0.07758 0.05510 -1.408 0.1612 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.842 on 156 degrees of freedom Multiple R-squared: 0.3539, Adjusted R-squared: 0.3332 F-statistic: 17.09 on 5 and 156 DF, p-value: 1.85e-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.60433516 0.79132968 0.39566484 [2,] 0.76670494 0.46659012 0.23329506 [3,] 0.70477648 0.59044704 0.29522352 [4,] 0.78424585 0.43150830 0.21575415 [5,] 0.71528033 0.56943934 0.28471967 [6,] 0.68379281 0.63241438 0.31620719 [7,] 0.66475828 0.67048344 0.33524172 [8,] 0.61328959 0.77342082 0.38671041 [9,] 0.53499161 0.93001678 0.46500839 [10,] 0.85842392 0.28315216 0.14157608 [11,] 0.86310549 0.27378902 0.13689451 [12,] 0.81768248 0.36463504 0.18231752 [13,] 0.76944628 0.46110744 0.23055372 [14,] 0.71162261 0.57675477 0.28837739 [15,] 0.73171177 0.53657646 0.26828823 [16,] 0.67832152 0.64335696 0.32167848 [17,] 0.66729965 0.66540069 0.33270035 [18,] 0.60517287 0.78965425 0.39482713 [19,] 0.54541875 0.90916250 0.45458125 [20,] 0.52023245 0.95953511 0.47976755 [21,] 0.45706478 0.91412955 0.54293522 [22,] 0.43626300 0.87252600 0.56373700 [23,] 0.37796133 0.75592266 0.62203867 [24,] 0.36415343 0.72830687 0.63584657 [25,] 0.34449994 0.68899989 0.65550006 [26,] 0.29070856 0.58141713 0.70929144 [27,] 0.27556514 0.55113028 0.72443486 [28,] 0.81231787 0.37536427 0.18768213 [29,] 0.80013946 0.39972107 0.19986054 [30,] 0.79933401 0.40133197 0.20066599 [31,] 0.82029084 0.35941833 0.17970916 [32,] 0.80017527 0.39964946 0.19982473 [33,] 0.76885093 0.46229814 0.23114907 [34,] 0.75437275 0.49125449 0.24562725 [35,] 0.76017630 0.47964741 0.23982370 [36,] 0.72254517 0.55490965 0.27745483 [37,] 0.69209803 0.61580394 0.30790197 [38,] 0.88540767 0.22918466 0.11459233 [39,] 0.91011246 0.17977508 0.08988754 [40,] 0.88776865 0.22446269 0.11223135 [41,] 0.86636694 0.26726613 0.13363306 [42,] 0.86791509 0.26416982 0.13208491 [43,] 0.84068671 0.31862658 0.15931329 [44,] 0.80859090 0.38281821 0.19140910 [45,] 0.83708731 0.32582538 0.16291269 [46,] 0.80613973 0.38772054 0.19386027 [47,] 0.82561274 0.34877451 0.17438726 [48,] 0.80562957 0.38874085 0.19437043 [49,] 0.77218725 0.45562551 0.22781275 [50,] 0.74853015 0.50293970 0.25146985 [51,] 0.70966517 0.58066966 0.29033483 [52,] 0.70610646 0.58778708 0.29389354 [53,] 0.66779271 0.66441458 0.33220729 [54,] 0.62334992 0.75330017 0.37665008 [55,] 0.57906319 0.84187363 0.42093681 [56,] 0.53418527 0.93162945 0.46581473 [57,] 0.49068334 0.98136668 0.50931666 [58,] 0.46203798 0.92407596 0.53796202 [59,] 0.45444002 0.90888004 0.54555998 [60,] 0.58440660 0.83118680 0.41559340 [61,] 0.72740536 0.54518929 0.27259464 [62,] 0.69106387 0.61787227 0.30893613 [63,] 0.78999354 0.42001292 0.21000646 [64,] 0.75569113 0.48861774 0.24430887 [65,] 0.74667354 0.50665293 0.25332646 [66,] 0.72001433 0.55997133 0.27998567 [67,] 0.68036980 0.63926039 0.31963020 [68,] 0.74752633 0.50494733 0.25247367 [69,] 0.71090874 0.57818252 0.28909126 [70,] 0.69577811 0.60844377 0.30422189 [71,] 0.69586185 0.60827631 0.30413815 [72,] 0.65506579 0.68986843 0.34493421 [73,] 0.61607019 0.76785962 0.38392981 [74,] 0.76762661 0.46474678 0.23237339 [75,] 0.73140675 0.53718650 0.26859325 [76,] 0.70228560 0.59542881 0.29771440 [77,] 0.66163408 0.67673183 0.33836592 [78,] 0.65702680 0.68594641 0.34297320 [79,] 0.61350341 0.77299317 0.38649659 [80,] 0.57414813 0.85170374 0.42585187 [81,] 0.55298024 0.89403953 0.44701976 [82,] 0.52400965 0.95198070 0.47599035 [83,] 0.50945179 0.98109643 0.49054821 [84,] 0.46852660 0.93705319 0.53147340 [85,] 0.42794252 0.85588503 0.57205748 [86,] 0.38501721 0.77003442 0.61498279 [87,] 0.39595929 0.79191858 0.60404071 [88,] 0.36265771 0.72531542 0.63734229 [89,] 0.32443182 0.64886363 0.67556818 [90,] 0.32709390 0.65418780 0.67290610 [91,] 0.28602555 0.57205109 0.71397445 [92,] 0.24903536 0.49807071 0.75096464 [93,] 0.22696001 0.45392002 0.77303999 [94,] 0.21297864 0.42595729 0.78702136 [95,] 0.26381573 0.52763147 0.73618427 [96,] 0.22683074 0.45366147 0.77316926 [97,] 0.22437014 0.44874028 0.77562986 [98,] 0.23601327 0.47202654 0.76398673 [99,] 0.21424123 0.42848247 0.78575877 [100,] 0.19212630 0.38425259 0.80787370 [101,] 0.18269238 0.36538477 0.81730762 [102,] 0.16818407 0.33636815 0.83181593 [103,] 0.15341136 0.30682271 0.84658864 [104,] 0.13000738 0.26001476 0.86999262 [105,] 0.15755923 0.31511846 0.84244077 [106,] 0.14030540 0.28061079 0.85969460 [107,] 0.17514535 0.35029070 0.82485465 [108,] 0.16642837 0.33285674 0.83357163 [109,] 0.14596960 0.29193920 0.85403040 [110,] 0.12777343 0.25554687 0.87222657 [111,] 0.13157142 0.26314285 0.86842858 [112,] 0.11958320 0.23916640 0.88041680 [113,] 0.10067855 0.20135710 0.89932145 [114,] 0.08126153 0.16252306 0.91873847 [115,] 0.09303037 0.18606074 0.90696963 [116,] 0.07619953 0.15239906 0.92380047 [117,] 0.06253042 0.12506084 0.93746958 [118,] 0.04860764 0.09721528 0.95139236 [119,] 0.03778137 0.07556274 0.96221863 [120,] 0.03209875 0.06419750 0.96790125 [121,] 0.02529830 0.05059659 0.97470170 [122,] 0.03374543 0.06749086 0.96625457 [123,] 0.02944556 0.05889113 0.97055444 [124,] 0.04390328 0.08780655 0.95609672 [125,] 0.04957517 0.09915033 0.95042483 [126,] 0.06244509 0.12489018 0.93755491 [127,] 0.05064528 0.10129055 0.94935472 [128,] 0.03642918 0.07285837 0.96357082 [129,] 0.02575957 0.05151913 0.97424043 [130,] 0.01776504 0.03553009 0.98223496 [131,] 0.02788027 0.05576054 0.97211973 [132,] 0.02203560 0.04407119 0.97796440 [133,] 0.48405077 0.96810153 0.51594923 [134,] 0.46020094 0.92040189 0.53979906 [135,] 0.39250665 0.78501330 0.60749335 [136,] 0.40519549 0.81039098 0.59480451 [137,] 0.35607767 0.71215535 0.64392233 [138,] 0.34409989 0.68819977 0.65590011 [139,] 0.39612777 0.79225554 0.60387223 [140,] 0.81477765 0.37044471 0.18522235 [141,] 0.78896449 0.42207101 0.21103551 [142,] 0.69057432 0.61885136 0.30942568 [143,] 0.88368300 0.23263400 0.11631700 [144,] 0.93362592 0.13274817 0.06637408 [145,] 0.90069498 0.19861003 0.09930502 > postscript(file="/var/www/rcomp/tmp/1fc891322158795.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/www/rcomp/tmp/2xz5t1322158795.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/www/rcomp/tmp/3s0301322158795.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/www/rcomp/tmp/4ex711322158795.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/www/rcomp/tmp/5wouz1322158795.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.17752076 0.12038092 2.73257916 3.25876690 -1.36826555 -1.86658631 7 8 9 10 11 12 3.66080667 -1.58529622 -1.89128782 2.57094939 0.74390007 -0.32713920 13 14 15 16 17 18 0.58625466 0.62591488 -0.32531600 -0.10275309 0.50187126 3.89911505 19 20 21 22 23 24 2.44390663 0.66728021 0.64305349 1.15709986 2.50812606 1.13772477 25 26 27 28 29 30 2.27547170 0.22054773 1.21307547 -1.13534201 0.71753602 -0.12805048 31 32 33 34 35 36 -0.62380437 -0.22543877 -1.14054209 0.46557049 -1.48369342 -5.96918635 37 38 39 40 41 42 -0.74519361 -1.78429468 1.78392066 1.39534982 0.93426744 -1.46217487 43 44 45 46 47 48 1.94963360 -0.23018278 -0.93000217 -4.51749771 -2.64912289 0.05435115 49 50 51 52 53 54 0.98601395 -1.98876488 -0.51190118 -0.08406140 -2.59997960 0.36937854 55 56 57 58 59 60 -2.41298268 1.34887868 -0.09346065 0.81595648 -0.24483563 1.87147782 61 62 63 64 65 66 0.58568666 0.13697774 -0.33934051 -0.39356234 0.47623555 1.12530901 67 68 69 70 71 72 1.81743674 3.50248827 -3.88481549 0.58274841 -3.61955719 -0.37204378 73 74 75 76 77 78 1.57795396 0.93115087 0.35305640 3.16870160 -0.39972083 1.46032487 79 80 81 82 83 84 -1.83041739 -0.14877431 0.55704632 4.00124735 0.19485548 -0.96400557 85 86 87 88 89 90 0.24748758 1.74688419 -0.15693305 0.65061391 1.36157006 0.85138909 91 92 93 94 95 96 -1.54858030 -0.08374146 0.60149790 -0.14558460 -2.07448692 0.89048396 97 98 99 100 101 102 0.10561613 1.90608020 -0.08165519 -0.31403668 -1.31756532 1.19655387 103 104 105 106 107 108 2.61147373 0.28202906 1.56265418 -2.34263968 0.89102204 0.09272257 109 110 111 112 113 114 1.36283922 -0.39740878 1.08829157 0.19190474 2.46678922 -1.47970563 115 116 117 118 119 120 -2.97729190 1.31128636 -1.59520567 0.93900226 -2.01257096 0.35372450 121 122 123 124 125 126 -1.37062930 0.32284377 -2.94849684 -1.18069452 -1.10883265 -0.79218457 127 128 129 130 131 132 -0.50273293 0.69774029 0.93684075 -3.04568938 1.81960194 -3.33289811 133 134 135 136 137 138 1.87652033 -2.03831552 -1.77944243 -0.32738726 0.62164911 0.25976413 139 140 141 142 143 144 -2.38491931 -1.54035792 -5.39362872 2.72873702 1.66054514 0.38496285 145 146 147 148 149 150 1.09814321 -4.25454624 1.92382266 -2.37785785 0.74465320 -0.12844386 151 152 153 154 155 156 -3.20772694 -1.41058351 1.90674891 3.94102764 1.46518905 -2.71013209 157 158 159 160 161 162 -0.08374146 1.26638822 0.93684075 0.86377819 -0.43409312 0.13956299 > postscript(file="/var/www/rcomp/tmp/6j9n51322158795.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.17752076 NA 1 0.12038092 -3.17752076 2 2.73257916 0.12038092 3 3.25876690 2.73257916 4 -1.36826555 3.25876690 5 -1.86658631 -1.36826555 6 3.66080667 -1.86658631 7 -1.58529622 3.66080667 8 -1.89128782 -1.58529622 9 2.57094939 -1.89128782 10 0.74390007 2.57094939 11 -0.32713920 0.74390007 12 0.58625466 -0.32713920 13 0.62591488 0.58625466 14 -0.32531600 0.62591488 15 -0.10275309 -0.32531600 16 0.50187126 -0.10275309 17 3.89911505 0.50187126 18 2.44390663 3.89911505 19 0.66728021 2.44390663 20 0.64305349 0.66728021 21 1.15709986 0.64305349 22 2.50812606 1.15709986 23 1.13772477 2.50812606 24 2.27547170 1.13772477 25 0.22054773 2.27547170 26 1.21307547 0.22054773 27 -1.13534201 1.21307547 28 0.71753602 -1.13534201 29 -0.12805048 0.71753602 30 -0.62380437 -0.12805048 31 -0.22543877 -0.62380437 32 -1.14054209 -0.22543877 33 0.46557049 -1.14054209 34 -1.48369342 0.46557049 35 -5.96918635 -1.48369342 36 -0.74519361 -5.96918635 37 -1.78429468 -0.74519361 38 1.78392066 -1.78429468 39 1.39534982 1.78392066 40 0.93426744 1.39534982 41 -1.46217487 0.93426744 42 1.94963360 -1.46217487 43 -0.23018278 1.94963360 44 -0.93000217 -0.23018278 45 -4.51749771 -0.93000217 46 -2.64912289 -4.51749771 47 0.05435115 -2.64912289 48 0.98601395 0.05435115 49 -1.98876488 0.98601395 50 -0.51190118 -1.98876488 51 -0.08406140 -0.51190118 52 -2.59997960 -0.08406140 53 0.36937854 -2.59997960 54 -2.41298268 0.36937854 55 1.34887868 -2.41298268 56 -0.09346065 1.34887868 57 0.81595648 -0.09346065 58 -0.24483563 0.81595648 59 1.87147782 -0.24483563 60 0.58568666 1.87147782 61 0.13697774 0.58568666 62 -0.33934051 0.13697774 63 -0.39356234 -0.33934051 64 0.47623555 -0.39356234 65 1.12530901 0.47623555 66 1.81743674 1.12530901 67 3.50248827 1.81743674 68 -3.88481549 3.50248827 69 0.58274841 -3.88481549 70 -3.61955719 0.58274841 71 -0.37204378 -3.61955719 72 1.57795396 -0.37204378 73 0.93115087 1.57795396 74 0.35305640 0.93115087 75 3.16870160 0.35305640 76 -0.39972083 3.16870160 77 1.46032487 -0.39972083 78 -1.83041739 1.46032487 79 -0.14877431 -1.83041739 80 0.55704632 -0.14877431 81 4.00124735 0.55704632 82 0.19485548 4.00124735 83 -0.96400557 0.19485548 84 0.24748758 -0.96400557 85 1.74688419 0.24748758 86 -0.15693305 1.74688419 87 0.65061391 -0.15693305 88 1.36157006 0.65061391 89 0.85138909 1.36157006 90 -1.54858030 0.85138909 91 -0.08374146 -1.54858030 92 0.60149790 -0.08374146 93 -0.14558460 0.60149790 94 -2.07448692 -0.14558460 95 0.89048396 -2.07448692 96 0.10561613 0.89048396 97 1.90608020 0.10561613 98 -0.08165519 1.90608020 99 -0.31403668 -0.08165519 100 -1.31756532 -0.31403668 101 1.19655387 -1.31756532 102 2.61147373 1.19655387 103 0.28202906 2.61147373 104 1.56265418 0.28202906 105 -2.34263968 1.56265418 106 0.89102204 -2.34263968 107 0.09272257 0.89102204 108 1.36283922 0.09272257 109 -0.39740878 1.36283922 110 1.08829157 -0.39740878 111 0.19190474 1.08829157 112 2.46678922 0.19190474 113 -1.47970563 2.46678922 114 -2.97729190 -1.47970563 115 1.31128636 -2.97729190 116 -1.59520567 1.31128636 117 0.93900226 -1.59520567 118 -2.01257096 0.93900226 119 0.35372450 -2.01257096 120 -1.37062930 0.35372450 121 0.32284377 -1.37062930 122 -2.94849684 0.32284377 123 -1.18069452 -2.94849684 124 -1.10883265 -1.18069452 125 -0.79218457 -1.10883265 126 -0.50273293 -0.79218457 127 0.69774029 -0.50273293 128 0.93684075 0.69774029 129 -3.04568938 0.93684075 130 1.81960194 -3.04568938 131 -3.33289811 1.81960194 132 1.87652033 -3.33289811 133 -2.03831552 1.87652033 134 -1.77944243 -2.03831552 135 -0.32738726 -1.77944243 136 0.62164911 -0.32738726 137 0.25976413 0.62164911 138 -2.38491931 0.25976413 139 -1.54035792 -2.38491931 140 -5.39362872 -1.54035792 141 2.72873702 -5.39362872 142 1.66054514 2.72873702 143 0.38496285 1.66054514 144 1.09814321 0.38496285 145 -4.25454624 1.09814321 146 1.92382266 -4.25454624 147 -2.37785785 1.92382266 148 0.74465320 -2.37785785 149 -0.12844386 0.74465320 150 -3.20772694 -0.12844386 151 -1.41058351 -3.20772694 152 1.90674891 -1.41058351 153 3.94102764 1.90674891 154 1.46518905 3.94102764 155 -2.71013209 1.46518905 156 -0.08374146 -2.71013209 157 1.26638822 -0.08374146 158 0.93684075 1.26638822 159 0.86377819 0.93684075 160 -0.43409312 0.86377819 161 0.13956299 -0.43409312 162 NA 0.13956299 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.12038092 -3.17752076 [2,] 2.73257916 0.12038092 [3,] 3.25876690 2.73257916 [4,] -1.36826555 3.25876690 [5,] -1.86658631 -1.36826555 [6,] 3.66080667 -1.86658631 [7,] -1.58529622 3.66080667 [8,] -1.89128782 -1.58529622 [9,] 2.57094939 -1.89128782 [10,] 0.74390007 2.57094939 [11,] -0.32713920 0.74390007 [12,] 0.58625466 -0.32713920 [13,] 0.62591488 0.58625466 [14,] -0.32531600 0.62591488 [15,] -0.10275309 -0.32531600 [16,] 0.50187126 -0.10275309 [17,] 3.89911505 0.50187126 [18,] 2.44390663 3.89911505 [19,] 0.66728021 2.44390663 [20,] 0.64305349 0.66728021 [21,] 1.15709986 0.64305349 [22,] 2.50812606 1.15709986 [23,] 1.13772477 2.50812606 [24,] 2.27547170 1.13772477 [25,] 0.22054773 2.27547170 [26,] 1.21307547 0.22054773 [27,] -1.13534201 1.21307547 [28,] 0.71753602 -1.13534201 [29,] -0.12805048 0.71753602 [30,] -0.62380437 -0.12805048 [31,] -0.22543877 -0.62380437 [32,] -1.14054209 -0.22543877 [33,] 0.46557049 -1.14054209 [34,] -1.48369342 0.46557049 [35,] -5.96918635 -1.48369342 [36,] -0.74519361 -5.96918635 [37,] -1.78429468 -0.74519361 [38,] 1.78392066 -1.78429468 [39,] 1.39534982 1.78392066 [40,] 0.93426744 1.39534982 [41,] -1.46217487 0.93426744 [42,] 1.94963360 -1.46217487 [43,] -0.23018278 1.94963360 [44,] -0.93000217 -0.23018278 [45,] -4.51749771 -0.93000217 [46,] -2.64912289 -4.51749771 [47,] 0.05435115 -2.64912289 [48,] 0.98601395 0.05435115 [49,] -1.98876488 0.98601395 [50,] -0.51190118 -1.98876488 [51,] -0.08406140 -0.51190118 [52,] -2.59997960 -0.08406140 [53,] 0.36937854 -2.59997960 [54,] -2.41298268 0.36937854 [55,] 1.34887868 -2.41298268 [56,] -0.09346065 1.34887868 [57,] 0.81595648 -0.09346065 [58,] -0.24483563 0.81595648 [59,] 1.87147782 -0.24483563 [60,] 0.58568666 1.87147782 [61,] 0.13697774 0.58568666 [62,] -0.33934051 0.13697774 [63,] -0.39356234 -0.33934051 [64,] 0.47623555 -0.39356234 [65,] 1.12530901 0.47623555 [66,] 1.81743674 1.12530901 [67,] 3.50248827 1.81743674 [68,] -3.88481549 3.50248827 [69,] 0.58274841 -3.88481549 [70,] -3.61955719 0.58274841 [71,] -0.37204378 -3.61955719 [72,] 1.57795396 -0.37204378 [73,] 0.93115087 1.57795396 [74,] 0.35305640 0.93115087 [75,] 3.16870160 0.35305640 [76,] -0.39972083 3.16870160 [77,] 1.46032487 -0.39972083 [78,] -1.83041739 1.46032487 [79,] -0.14877431 -1.83041739 [80,] 0.55704632 -0.14877431 [81,] 4.00124735 0.55704632 [82,] 0.19485548 4.00124735 [83,] -0.96400557 0.19485548 [84,] 0.24748758 -0.96400557 [85,] 1.74688419 0.24748758 [86,] -0.15693305 1.74688419 [87,] 0.65061391 -0.15693305 [88,] 1.36157006 0.65061391 [89,] 0.85138909 1.36157006 [90,] -1.54858030 0.85138909 [91,] -0.08374146 -1.54858030 [92,] 0.60149790 -0.08374146 [93,] -0.14558460 0.60149790 [94,] -2.07448692 -0.14558460 [95,] 0.89048396 -2.07448692 [96,] 0.10561613 0.89048396 [97,] 1.90608020 0.10561613 [98,] -0.08165519 1.90608020 [99,] -0.31403668 -0.08165519 [100,] -1.31756532 -0.31403668 [101,] 1.19655387 -1.31756532 [102,] 2.61147373 1.19655387 [103,] 0.28202906 2.61147373 [104,] 1.56265418 0.28202906 [105,] -2.34263968 1.56265418 [106,] 0.89102204 -2.34263968 [107,] 0.09272257 0.89102204 [108,] 1.36283922 0.09272257 [109,] -0.39740878 1.36283922 [110,] 1.08829157 -0.39740878 [111,] 0.19190474 1.08829157 [112,] 2.46678922 0.19190474 [113,] -1.47970563 2.46678922 [114,] -2.97729190 -1.47970563 [115,] 1.31128636 -2.97729190 [116,] -1.59520567 1.31128636 [117,] 0.93900226 -1.59520567 [118,] -2.01257096 0.93900226 [119,] 0.35372450 -2.01257096 [120,] -1.37062930 0.35372450 [121,] 0.32284377 -1.37062930 [122,] -2.94849684 0.32284377 [123,] -1.18069452 -2.94849684 [124,] -1.10883265 -1.18069452 [125,] -0.79218457 -1.10883265 [126,] -0.50273293 -0.79218457 [127,] 0.69774029 -0.50273293 [128,] 0.93684075 0.69774029 [129,] -3.04568938 0.93684075 [130,] 1.81960194 -3.04568938 [131,] -3.33289811 1.81960194 [132,] 1.87652033 -3.33289811 [133,] -2.03831552 1.87652033 [134,] -1.77944243 -2.03831552 [135,] -0.32738726 -1.77944243 [136,] 0.62164911 -0.32738726 [137,] 0.25976413 0.62164911 [138,] -2.38491931 0.25976413 [139,] -1.54035792 -2.38491931 [140,] -5.39362872 -1.54035792 [141,] 2.72873702 -5.39362872 [142,] 1.66054514 2.72873702 [143,] 0.38496285 1.66054514 [144,] 1.09814321 0.38496285 [145,] -4.25454624 1.09814321 [146,] 1.92382266 -4.25454624 [147,] -2.37785785 1.92382266 [148,] 0.74465320 -2.37785785 [149,] -0.12844386 0.74465320 [150,] -3.20772694 -0.12844386 [151,] -1.41058351 -3.20772694 [152,] 1.90674891 -1.41058351 [153,] 3.94102764 1.90674891 [154,] 1.46518905 3.94102764 [155,] -2.71013209 1.46518905 [156,] -0.08374146 -2.71013209 [157,] 1.26638822 -0.08374146 [158,] 0.93684075 1.26638822 [159,] 0.86377819 0.93684075 [160,] -0.43409312 0.86377819 [161,] 0.13956299 -0.43409312 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.12038092 -3.17752076 2 2.73257916 0.12038092 3 3.25876690 2.73257916 4 -1.36826555 3.25876690 5 -1.86658631 -1.36826555 6 3.66080667 -1.86658631 7 -1.58529622 3.66080667 8 -1.89128782 -1.58529622 9 2.57094939 -1.89128782 10 0.74390007 2.57094939 11 -0.32713920 0.74390007 12 0.58625466 -0.32713920 13 0.62591488 0.58625466 14 -0.32531600 0.62591488 15 -0.10275309 -0.32531600 16 0.50187126 -0.10275309 17 3.89911505 0.50187126 18 2.44390663 3.89911505 19 0.66728021 2.44390663 20 0.64305349 0.66728021 21 1.15709986 0.64305349 22 2.50812606 1.15709986 23 1.13772477 2.50812606 24 2.27547170 1.13772477 25 0.22054773 2.27547170 26 1.21307547 0.22054773 27 -1.13534201 1.21307547 28 0.71753602 -1.13534201 29 -0.12805048 0.71753602 30 -0.62380437 -0.12805048 31 -0.22543877 -0.62380437 32 -1.14054209 -0.22543877 33 0.46557049 -1.14054209 34 -1.48369342 0.46557049 35 -5.96918635 -1.48369342 36 -0.74519361 -5.96918635 37 -1.78429468 -0.74519361 38 1.78392066 -1.78429468 39 1.39534982 1.78392066 40 0.93426744 1.39534982 41 -1.46217487 0.93426744 42 1.94963360 -1.46217487 43 -0.23018278 1.94963360 44 -0.93000217 -0.23018278 45 -4.51749771 -0.93000217 46 -2.64912289 -4.51749771 47 0.05435115 -2.64912289 48 0.98601395 0.05435115 49 -1.98876488 0.98601395 50 -0.51190118 -1.98876488 51 -0.08406140 -0.51190118 52 -2.59997960 -0.08406140 53 0.36937854 -2.59997960 54 -2.41298268 0.36937854 55 1.34887868 -2.41298268 56 -0.09346065 1.34887868 57 0.81595648 -0.09346065 58 -0.24483563 0.81595648 59 1.87147782 -0.24483563 60 0.58568666 1.87147782 61 0.13697774 0.58568666 62 -0.33934051 0.13697774 63 -0.39356234 -0.33934051 64 0.47623555 -0.39356234 65 1.12530901 0.47623555 66 1.81743674 1.12530901 67 3.50248827 1.81743674 68 -3.88481549 3.50248827 69 0.58274841 -3.88481549 70 -3.61955719 0.58274841 71 -0.37204378 -3.61955719 72 1.57795396 -0.37204378 73 0.93115087 1.57795396 74 0.35305640 0.93115087 75 3.16870160 0.35305640 76 -0.39972083 3.16870160 77 1.46032487 -0.39972083 78 -1.83041739 1.46032487 79 -0.14877431 -1.83041739 80 0.55704632 -0.14877431 81 4.00124735 0.55704632 82 0.19485548 4.00124735 83 -0.96400557 0.19485548 84 0.24748758 -0.96400557 85 1.74688419 0.24748758 86 -0.15693305 1.74688419 87 0.65061391 -0.15693305 88 1.36157006 0.65061391 89 0.85138909 1.36157006 90 -1.54858030 0.85138909 91 -0.08374146 -1.54858030 92 0.60149790 -0.08374146 93 -0.14558460 0.60149790 94 -2.07448692 -0.14558460 95 0.89048396 -2.07448692 96 0.10561613 0.89048396 97 1.90608020 0.10561613 98 -0.08165519 1.90608020 99 -0.31403668 -0.08165519 100 -1.31756532 -0.31403668 101 1.19655387 -1.31756532 102 2.61147373 1.19655387 103 0.28202906 2.61147373 104 1.56265418 0.28202906 105 -2.34263968 1.56265418 106 0.89102204 -2.34263968 107 0.09272257 0.89102204 108 1.36283922 0.09272257 109 -0.39740878 1.36283922 110 1.08829157 -0.39740878 111 0.19190474 1.08829157 112 2.46678922 0.19190474 113 -1.47970563 2.46678922 114 -2.97729190 -1.47970563 115 1.31128636 -2.97729190 116 -1.59520567 1.31128636 117 0.93900226 -1.59520567 118 -2.01257096 0.93900226 119 0.35372450 -2.01257096 120 -1.37062930 0.35372450 121 0.32284377 -1.37062930 122 -2.94849684 0.32284377 123 -1.18069452 -2.94849684 124 -1.10883265 -1.18069452 125 -0.79218457 -1.10883265 126 -0.50273293 -0.79218457 127 0.69774029 -0.50273293 128 0.93684075 0.69774029 129 -3.04568938 0.93684075 130 1.81960194 -3.04568938 131 -3.33289811 1.81960194 132 1.87652033 -3.33289811 133 -2.03831552 1.87652033 134 -1.77944243 -2.03831552 135 -0.32738726 -1.77944243 136 0.62164911 -0.32738726 137 0.25976413 0.62164911 138 -2.38491931 0.25976413 139 -1.54035792 -2.38491931 140 -5.39362872 -1.54035792 141 2.72873702 -5.39362872 142 1.66054514 2.72873702 143 0.38496285 1.66054514 144 1.09814321 0.38496285 145 -4.25454624 1.09814321 146 1.92382266 -4.25454624 147 -2.37785785 1.92382266 148 0.74465320 -2.37785785 149 -0.12844386 0.74465320 150 -3.20772694 -0.12844386 151 -1.41058351 -3.20772694 152 1.90674891 -1.41058351 153 3.94102764 1.90674891 154 1.46518905 3.94102764 155 -2.71013209 1.46518905 156 -0.08374146 -2.71013209 157 1.26638822 -0.08374146 158 0.93684075 1.26638822 159 0.86377819 0.93684075 160 -0.43409312 0.86377819 161 0.13956299 -0.43409312 > 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/rcomp/tmp/7ticy1322158795.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/www/rcomp/tmp/8lyi11322158795.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/www/rcomp/tmp/9bqb81322158795.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/www/rcomp/tmp/10pg1i1322158795.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11h5jw1322158795.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/rcomp/tmp/122qxy1322158795.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/rcomp/tmp/13eryy1322158795.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/rcomp/tmp/141m3u1322158795.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/rcomp/tmp/155fsr1322158795.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/rcomp/tmp/16ebsq1322158795.tab") + } > > try(system("convert tmp/1fc891322158795.ps tmp/1fc891322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/2xz5t1322158795.ps tmp/2xz5t1322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/3s0301322158795.ps tmp/3s0301322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/4ex711322158795.ps tmp/4ex711322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/5wouz1322158795.ps tmp/5wouz1322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/6j9n51322158795.ps tmp/6j9n51322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/7ticy1322158795.ps tmp/7ticy1322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/8lyi11322158795.ps tmp/8lyi11322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/9bqb81322158795.ps tmp/9bqb81322158795.png",intern=TRUE)) character(0) > try(system("convert tmp/10pg1i1322158795.ps tmp/10pg1i1322158795.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.204 0.672 6.989