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 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Connected Separate Learning Software Happiness Depression 1 41 38 13 12 14 12 2 39 32 16 11 18 11 3 30 35 19 15 11 14 4 31 33 15 6 12 12 5 34 37 14 13 16 21 6 35 29 13 10 18 12 7 39 31 19 12 14 22 8 34 36 15 14 14 11 9 36 35 14 12 15 10 10 37 38 15 6 15 13 11 38 31 16 10 17 10 12 36 34 16 12 19 8 13 38 35 16 12 10 15 14 39 38 16 11 16 14 15 33 37 17 15 18 10 16 32 33 15 12 14 14 17 36 32 15 10 14 14 18 38 38 20 12 17 11 19 39 38 18 11 14 10 20 32 32 16 12 16 13 21 32 33 16 11 18 7 22 31 31 16 12 11 14 23 39 38 19 13 14 12 24 37 39 16 11 12 14 25 39 32 17 9 17 11 26 41 32 17 13 9 9 27 36 35 16 10 16 11 28 33 37 15 14 14 15 29 33 33 16 12 15 14 30 34 33 14 10 11 13 31 31 28 15 12 16 9 32 27 32 12 8 13 15 33 37 31 14 10 17 10 34 34 37 16 12 15 11 35 34 30 14 12 14 13 36 32 33 7 7 16 8 37 29 31 10 6 9 20 38 36 33 14 12 15 12 39 29 31 16 10 17 10 40 35 33 16 10 13 10 41 37 32 16 10 15 9 42 34 33 14 12 16 14 43 38 32 20 15 16 8 44 35 33 14 10 12 14 45 38 28 14 10 12 11 46 37 35 11 12 11 13 47 38 39 14 13 15 9 48 33 34 15 11 15 11 49 36 38 16 11 17 15 50 38 32 14 12 13 11 51 32 38 16 14 16 10 52 32 30 14 10 14 14 53 32 33 12 12 11 18 54 34 38 16 13 12 14 55 32 32 9 5 12 11 56 37 32 14 6 15 12 57 39 34 16 12 16 13 58 29 34 16 12 15 9 59 37 36 15 11 12 10 60 35 34 16 10 12 15 61 30 28 12 7 8 20 62 38 34 16 12 13 12 63 34 35 16 14 11 12 64 31 35 14 11 14 14 65 34 31 16 12 15 13 66 35 37 17 13 10 11 67 36 35 18 14 11 17 68 30 27 18 11 12 12 69 39 40 12 12 15 13 70 35 37 16 12 15 14 71 38 36 10 8 14 13 72 31 38 14 11 16 15 73 34 39 18 14 15 13 74 38 41 18 14 15 10 75 34 27 16 12 13 11 76 39 30 17 9 12 19 77 37 37 16 13 17 13 78 34 31 16 11 13 17 79 28 31 13 12 15 13 80 37 27 16 12 13 9 81 33 36 16 12 15 11 82 37 38 20 12 16 10 83 35 37 16 12 15 9 84 37 33 15 12 16 12 85 32 34 15 11 15 12 86 33 31 16 10 14 13 87 38 39 14 9 15 13 88 33 34 16 12 14 12 89 29 32 16 12 13 15 90 33 33 15 12 7 22 91 31 36 12 9 17 13 92 36 32 17 15 13 15 93 35 41 16 12 15 13 94 32 28 15 12 14 15 95 29 30 13 12 13 10 96 39 36 16 10 16 11 97 37 35 16 13 12 16 98 35 31 16 9 14 11 99 37 34 16 12 17 11 100 32 36 14 10 15 10 101 38 36 16 14 17 10 102 37 35 16 11 12 16 103 36 37 20 15 16 12 104 32 28 15 11 11 11 105 33 39 16 11 15 16 106 40 32 13 12 9 19 107 38 35 17 12 16 11 108 41 39 16 12 15 16 109 36 35 16 11 10 15 110 43 42 12 7 10 24 111 30 34 16 12 15 14 112 31 33 16 14 11 15 113 32 41 17 11 13 11 114 32 33 13 11 14 15 115 37 34 12 10 18 12 116 37 32 18 13 16 10 117 33 40 14 13 14 14 118 34 40 14 8 14 13 119 33 35 13 11 14 9 120 38 36 16 12 14 15 121 33 37 13 11 12 15 122 31 27 16 13 14 14 123 38 39 13 12 15 11 124 37 38 16 14 15 8 125 33 31 15 13 15 11 126 31 33 16 15 13 11 127 39 32 15 10 17 8 128 44 39 17 11 17 10 129 33 36 15 9 19 11 130 35 33 12 11 15 13 131 32 33 16 10 13 11 132 28 32 10 11 9 20 133 40 37 16 8 15 10 134 27 30 12 11 15 15 135 37 38 14 12 15 12 136 32 29 15 12 16 14 137 28 22 13 9 11 23 138 34 35 15 11 14 14 139 30 35 11 10 11 16 140 35 34 12 8 15 11 141 31 35 8 9 13 12 142 32 34 16 8 15 10 143 30 34 15 9 16 14 144 30 35 17 15 14 12 145 31 23 16 11 15 12 146 40 31 10 8 16 11 147 32 27 18 13 16 12 148 36 36 13 12 11 13 149 32 31 16 12 12 11 150 35 32 13 9 9 19 151 38 39 10 7 16 12 152 42 37 15 13 13 17 153 34 38 16 9 16 9 154 35 39 16 6 12 12 155 35 34 14 8 9 19 156 33 31 10 8 13 18 157 36 32 17 15 13 15 158 32 37 13 6 14 14 159 33 36 15 9 19 11 160 34 32 16 11 13 9 161 32 35 12 8 12 18 162 34 36 13 8 13 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Separate Learning Software Happiness Depression 19.67609 0.33095 0.32857 -0.13957 0.05389 -0.03571 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.2577 -2.2086 -0.3786 2.1208 7.4259 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 19.67609 3.77986 5.206 6.02e-07 *** Separate 0.33095 0.06990 4.734 4.90e-06 *** Learning 0.32857 0.13242 2.481 0.0142 * Software -0.13957 0.13662 -1.022 0.3086 Happiness 0.05389 0.12634 0.427 0.6703 Depression -0.03571 0.09346 -0.382 0.7029 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.107 on 156 degrees of freedom Multiple R-squared: 0.179, Adjusted R-squared: 0.1527 F-statistic: 6.803 on 5 and 156 DF, p-value: 9.109e-06 > 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.94658657 0.10682687 0.05341343 [2,] 0.90292681 0.19414637 0.09707319 [3,] 0.84249488 0.31501025 0.15750512 [4,] 0.82499380 0.35001239 0.17500620 [5,] 0.87190607 0.25618785 0.12809393 [6,] 0.82872480 0.34255039 0.17127520 [7,] 0.82988544 0.34022912 0.17011456 [8,] 0.82611442 0.34777116 0.17388558 [9,] 0.76711920 0.46576160 0.23288080 [10,] 0.70727141 0.58545717 0.29272859 [11,] 0.68394601 0.63210798 0.31605399 [12,] 0.68298426 0.63403147 0.31701574 [13,] 0.68999463 0.62001075 0.31000537 [14,] 0.64580077 0.70839847 0.35419923 [15,] 0.61821604 0.76356793 0.38178396 [16,] 0.54765089 0.90469822 0.45234911 [17,] 0.53997007 0.92005985 0.46002993 [18,] 0.80074403 0.39851195 0.19925597 [19,] 0.75298761 0.49402479 0.24701239 [20,] 0.72529629 0.54940742 0.27470371 [21,] 0.69235192 0.61529616 0.30764808 [22,] 0.63898096 0.72203807 0.36101904 [23,] 0.60961336 0.78077328 0.39038664 [24,] 0.76771994 0.46456012 0.23228006 [25,] 0.76349650 0.47300700 0.23650350 [26,] 0.73790383 0.52419234 0.26209617 [27,] 0.69527145 0.60945710 0.30472855 [28,] 0.64357309 0.71285381 0.35642691 [29,] 0.61818056 0.76363888 0.38181944 [30,] 0.58696935 0.82606129 0.41303065 [31,] 0.71061962 0.57876075 0.28938038 [32,] 0.66181607 0.67636785 0.33818393 [33,] 0.63188299 0.73623403 0.36811701 [34,] 0.57969143 0.84061714 0.42030857 [35,] 0.54625102 0.90749795 0.45374898 [36,] 0.50066940 0.99866119 0.49933060 [37,] 0.59518818 0.80962363 0.40481182 [38,] 0.61392267 0.77215466 0.38607733 [39,] 0.58045946 0.83908109 0.41954054 [40,] 0.55180830 0.89638341 0.44819170 [41,] 0.50085607 0.99828786 0.49914393 [42,] 0.53368476 0.93263049 0.46631524 [43,] 0.58112170 0.83775659 0.41887830 [44,] 0.54055329 0.91889342 0.45944671 [45,] 0.49375118 0.98750237 0.50624882 [46,] 0.46265233 0.92530467 0.53734767 [47,] 0.41603663 0.83207325 0.58396337 [48,] 0.40106072 0.80212144 0.59893928 [49,] 0.43014149 0.86028298 0.56985851 [50,] 0.58010495 0.83979011 0.41989505 [51,] 0.54554637 0.90890727 0.45445363 [52,] 0.49767554 0.99535109 0.50232446 [53,] 0.46320897 0.92641794 0.53679103 [54,] 0.46034067 0.92068133 0.53965933 [55,] 0.41887780 0.83775560 0.58112220 [56,] 0.43014764 0.86029529 0.56985236 [57,] 0.38478914 0.76957829 0.61521086 [58,] 0.34558563 0.69117127 0.65441437 [59,] 0.30527383 0.61054766 0.69472617 [60,] 0.32235676 0.64471351 0.67764324 [61,] 0.33303102 0.66606205 0.66696898 [62,] 0.29435511 0.58871021 0.70564489 [63,] 0.31777648 0.63555296 0.68222352 [64,] 0.37035734 0.74071468 0.62964266 [65,] 0.36425698 0.72851396 0.63574302 [66,] 0.32184558 0.64369116 0.67815442 [67,] 0.29136353 0.58272707 0.70863647 [68,] 0.36208210 0.72416419 0.63791790 [69,] 0.32456252 0.64912505 0.67543748 [70,] 0.28419179 0.56838357 0.71580821 [71,] 0.34404368 0.68808736 0.65595632 [72,] 0.39847174 0.79694349 0.60152826 [73,] 0.38409874 0.76819748 0.61590126 [74,] 0.34288767 0.68577533 0.65711233 [75,] 0.30509058 0.61018116 0.69490942 [76,] 0.29418927 0.58837853 0.70581073 [77,] 0.28309705 0.56619410 0.71690295 [78,] 0.25002482 0.50004964 0.74997518 [79,] 0.22608912 0.45217823 0.77391088 [80,] 0.20304187 0.40608374 0.79695813 [81,] 0.25501383 0.51002767 0.74498617 [82,] 0.22010377 0.44020753 0.77989623 [83,] 0.23630336 0.47260672 0.76369664 [84,] 0.21561924 0.43123849 0.78438076 [85,] 0.20035217 0.40070434 0.79964783 [86,] 0.16989314 0.33978628 0.83010686 [87,] 0.17359157 0.34718313 0.82640843 [88,] 0.17319839 0.34639678 0.82680161 [89,] 0.15851836 0.31703671 0.84148164 [90,] 0.13688881 0.27377762 0.86311119 [91,] 0.12156964 0.24313928 0.87843036 [92,] 0.12021994 0.24043988 0.87978006 [93,] 0.11095010 0.22190020 0.88904990 [94,] 0.09885483 0.19770966 0.90114517 [95,] 0.08074471 0.16148942 0.91925529 [96,] 0.06619589 0.13239178 0.93380411 [97,] 0.07359028 0.14718056 0.92640972 [98,] 0.18918012 0.37836024 0.81081988 [99,] 0.17584864 0.35169727 0.82415136 [100,] 0.20273796 0.40547592 0.79726204 [101,] 0.18260218 0.36520435 0.81739782 [102,] 0.34204469 0.68408937 0.65795531 [103,] 0.39100224 0.78200449 0.60899776 [104,] 0.36852703 0.73705407 0.63147297 [105,] 0.44836267 0.89672535 0.55163733 [106,] 0.40873660 0.81747320 0.59126340 [107,] 0.39078888 0.78157777 0.60921112 [108,] 0.36764370 0.73528740 0.63235630 [109,] 0.36958697 0.73917395 0.63041303 [110,] 0.35410621 0.70821242 0.64589379 [111,] 0.31664652 0.63329304 0.68335348 [112,] 0.30537730 0.61075460 0.69462270 [113,] 0.27260657 0.54521314 0.72739343 [114,] 0.23312044 0.46624088 0.76687956 [115,] 0.20664593 0.41329186 0.79335407 [116,] 0.17103954 0.34207908 0.82896046 [117,] 0.13836819 0.27673639 0.86163181 [118,] 0.13677160 0.27354320 0.86322840 [119,] 0.17306083 0.34612166 0.82693917 [120,] 0.35172237 0.70344475 0.64827763 [121,] 0.32408132 0.64816264 0.67591868 [122,] 0.28509122 0.57018244 0.71490878 [123,] 0.25553476 0.51106953 0.74446524 [124,] 0.29203743 0.58407487 0.70796257 [125,] 0.37149607 0.74299215 0.62850393 [126,] 0.52380103 0.95239795 0.47619897 [127,] 0.46863613 0.93727226 0.53136387 [128,] 0.40500693 0.81001385 0.59499307 [129,] 0.38282091 0.76564183 0.61717909 [130,] 0.31888977 0.63777954 0.68111023 [131,] 0.41358977 0.82717953 0.58641023 [132,] 0.35144977 0.70289954 0.64855023 [133,] 0.54332385 0.91335230 0.45667615 [134,] 0.47765481 0.95530963 0.52234519 [135,] 0.49262237 0.98524474 0.50737763 [136,] 0.75071067 0.49857865 0.24928933 [137,] 0.67645624 0.64708753 0.32354376 [138,] 0.95989584 0.08020832 0.04010416 [139,] 0.94316539 0.11366922 0.05683461 [140,] 0.96669005 0.06661991 0.03330995 [141,] 0.95781400 0.08437199 0.04218600 [142,] 0.92386328 0.15227344 0.07613672 [143,] 0.86888293 0.26223413 0.13111707 [144,] 0.98277852 0.03444297 0.01722148 [145,] 0.94852574 0.10294851 0.05147426 > postscript(file="/var/www/rcomp/tmp/1j0vd1322583127.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/2nscu1322583127.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/38zbw1322583127.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/47d6x1322583127.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/5rs4k1322583127.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 5.82525994 4.43442518 -5.50151918 -3.90674320 -0.81917250 2.30913039 7 8 9 10 11 12 4.52760707 -0.92655649 1.36423249 0.31254837 3.64398778 0.75106855 13 14 15 16 17 18 3.15509075 2.66363053 -3.02634516 -2.10570356 1.94611545 0.32789788 19 20 21 22 23 24 1.97142561 -2.24681017 -3.03936886 -2.61070580 1.99340962 0.54823408 25 26 27 28 29 30 3.88061268 6.79856295 0.40978432 -2.11466387 -1.48816149 0.06968896 31 32 33 34 35 36 -1.73728128 -6.25770877 3.30112650 -1.91909683 1.18000711 -0.49702005 37 38 39 40 41 42 -3.15464262 2.09755557 -5.35601222 0.19764061 2.38510336 0.11508867 43 44 45 46 47 48 2.67905578 1.05151123 5.59913230 3.67262733 2.14428466 -1.73724118 49 50 51 52 53 54 -0.35454720 4.50057259 -4.06051524 -1.06341376 -0.81548645 -1.84168350 55 56 57 58 59 60 -0.77965300 2.59111117 4.09128840 -5.99766636 1.72681226 0.09913263 61 62 63 64 65 66 -1.62547479 3.21724327 -0.72679861 -3.57860147 0.13802911 -0.83865751 67 68 69 70 71 72 0.79461683 -3.20891775 3.47375014 -0.81196434 3.95031687 -4.64351991 73 74 75 76 77 78 -2.88758361 0.34338247 1.49818743 5.09764359 1.18411355 0.24908371 79 80 81 82 83 84 -4.87626281 4.42676576 -2.58814612 -0.65392439 -0.99051849 2.71509765 85 86 87 88 89 90 -2.70153035 -1.08721403 1.72886457 -1.83664530 -5.01372281 -0.44279695 91 92 93 94 95 96 -3.72892170 2.07640539 -2.17147802 -0.41523916 -3.54466746 3.07883361 97 98 99 100 101 102 2.22259030 0.70179845 1.96597818 -3.24584993 2.54749762 1.94345860 103 104 105 106 107 108 -0.83285446 -0.53598264 -3.54200995 7.33038286 2.36034667 4.59755590 109 110 111 112 113 114 1.01552490 6.77628143 -4.81911220 -2.95776469 -5.60325776 -1.55241986 115 116 117 118 119 120 2.98294618 2.12848446 -2.95422333 -2.68776343 -1.42858627 2.60858577 121 122 123 124 125 126 -1.76844557 -1.30900279 2.40470983 0.92195167 -0.46525734 -3.06881929 127 128 129 130 131 132 4.57018476 6.80737857 -2.89382858 1.65083928 -2.76664855 -3.78776407 133 134 135 136 137 138 3.48692893 -5.28488692 1.44280201 -0.88967784 -1.74374137 -0.90717084 139 140 141 142 143 144 -3.49937188 0.82976934 -1.90385011 -3.52021893 -4.96312896 -5.07746781 145 146 147 148 149 150 -0.38964187 7.42587164 -1.14534031 1.68453789 -1.77172686 1.91168531 151 152 153 154 155 156 2.67441092 6.87108050 -2.79405533 -2.22101684 0.78164867 0.83751316 157 158 159 160 161 162 2.07640539 -3.60976280 -2.89382858 -0.36755365 -2.08953985 -0.87437015 > postscript(file="/var/www/rcomp/tmp/69b2k1322583127.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 5.82525994 NA 1 4.43442518 5.82525994 2 -5.50151918 4.43442518 3 -3.90674320 -5.50151918 4 -0.81917250 -3.90674320 5 2.30913039 -0.81917250 6 4.52760707 2.30913039 7 -0.92655649 4.52760707 8 1.36423249 -0.92655649 9 0.31254837 1.36423249 10 3.64398778 0.31254837 11 0.75106855 3.64398778 12 3.15509075 0.75106855 13 2.66363053 3.15509075 14 -3.02634516 2.66363053 15 -2.10570356 -3.02634516 16 1.94611545 -2.10570356 17 0.32789788 1.94611545 18 1.97142561 0.32789788 19 -2.24681017 1.97142561 20 -3.03936886 -2.24681017 21 -2.61070580 -3.03936886 22 1.99340962 -2.61070580 23 0.54823408 1.99340962 24 3.88061268 0.54823408 25 6.79856295 3.88061268 26 0.40978432 6.79856295 27 -2.11466387 0.40978432 28 -1.48816149 -2.11466387 29 0.06968896 -1.48816149 30 -1.73728128 0.06968896 31 -6.25770877 -1.73728128 32 3.30112650 -6.25770877 33 -1.91909683 3.30112650 34 1.18000711 -1.91909683 35 -0.49702005 1.18000711 36 -3.15464262 -0.49702005 37 2.09755557 -3.15464262 38 -5.35601222 2.09755557 39 0.19764061 -5.35601222 40 2.38510336 0.19764061 41 0.11508867 2.38510336 42 2.67905578 0.11508867 43 1.05151123 2.67905578 44 5.59913230 1.05151123 45 3.67262733 5.59913230 46 2.14428466 3.67262733 47 -1.73724118 2.14428466 48 -0.35454720 -1.73724118 49 4.50057259 -0.35454720 50 -4.06051524 4.50057259 51 -1.06341376 -4.06051524 52 -0.81548645 -1.06341376 53 -1.84168350 -0.81548645 54 -0.77965300 -1.84168350 55 2.59111117 -0.77965300 56 4.09128840 2.59111117 57 -5.99766636 4.09128840 58 1.72681226 -5.99766636 59 0.09913263 1.72681226 60 -1.62547479 0.09913263 61 3.21724327 -1.62547479 62 -0.72679861 3.21724327 63 -3.57860147 -0.72679861 64 0.13802911 -3.57860147 65 -0.83865751 0.13802911 66 0.79461683 -0.83865751 67 -3.20891775 0.79461683 68 3.47375014 -3.20891775 69 -0.81196434 3.47375014 70 3.95031687 -0.81196434 71 -4.64351991 3.95031687 72 -2.88758361 -4.64351991 73 0.34338247 -2.88758361 74 1.49818743 0.34338247 75 5.09764359 1.49818743 76 1.18411355 5.09764359 77 0.24908371 1.18411355 78 -4.87626281 0.24908371 79 4.42676576 -4.87626281 80 -2.58814612 4.42676576 81 -0.65392439 -2.58814612 82 -0.99051849 -0.65392439 83 2.71509765 -0.99051849 84 -2.70153035 2.71509765 85 -1.08721403 -2.70153035 86 1.72886457 -1.08721403 87 -1.83664530 1.72886457 88 -5.01372281 -1.83664530 89 -0.44279695 -5.01372281 90 -3.72892170 -0.44279695 91 2.07640539 -3.72892170 92 -2.17147802 2.07640539 93 -0.41523916 -2.17147802 94 -3.54466746 -0.41523916 95 3.07883361 -3.54466746 96 2.22259030 3.07883361 97 0.70179845 2.22259030 98 1.96597818 0.70179845 99 -3.24584993 1.96597818 100 2.54749762 -3.24584993 101 1.94345860 2.54749762 102 -0.83285446 1.94345860 103 -0.53598264 -0.83285446 104 -3.54200995 -0.53598264 105 7.33038286 -3.54200995 106 2.36034667 7.33038286 107 4.59755590 2.36034667 108 1.01552490 4.59755590 109 6.77628143 1.01552490 110 -4.81911220 6.77628143 111 -2.95776469 -4.81911220 112 -5.60325776 -2.95776469 113 -1.55241986 -5.60325776 114 2.98294618 -1.55241986 115 2.12848446 2.98294618 116 -2.95422333 2.12848446 117 -2.68776343 -2.95422333 118 -1.42858627 -2.68776343 119 2.60858577 -1.42858627 120 -1.76844557 2.60858577 121 -1.30900279 -1.76844557 122 2.40470983 -1.30900279 123 0.92195167 2.40470983 124 -0.46525734 0.92195167 125 -3.06881929 -0.46525734 126 4.57018476 -3.06881929 127 6.80737857 4.57018476 128 -2.89382858 6.80737857 129 1.65083928 -2.89382858 130 -2.76664855 1.65083928 131 -3.78776407 -2.76664855 132 3.48692893 -3.78776407 133 -5.28488692 3.48692893 134 1.44280201 -5.28488692 135 -0.88967784 1.44280201 136 -1.74374137 -0.88967784 137 -0.90717084 -1.74374137 138 -3.49937188 -0.90717084 139 0.82976934 -3.49937188 140 -1.90385011 0.82976934 141 -3.52021893 -1.90385011 142 -4.96312896 -3.52021893 143 -5.07746781 -4.96312896 144 -0.38964187 -5.07746781 145 7.42587164 -0.38964187 146 -1.14534031 7.42587164 147 1.68453789 -1.14534031 148 -1.77172686 1.68453789 149 1.91168531 -1.77172686 150 2.67441092 1.91168531 151 6.87108050 2.67441092 152 -2.79405533 6.87108050 153 -2.22101684 -2.79405533 154 0.78164867 -2.22101684 155 0.83751316 0.78164867 156 2.07640539 0.83751316 157 -3.60976280 2.07640539 158 -2.89382858 -3.60976280 159 -0.36755365 -2.89382858 160 -2.08953985 -0.36755365 161 -0.87437015 -2.08953985 162 NA -0.87437015 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 4.43442518 5.82525994 [2,] -5.50151918 4.43442518 [3,] -3.90674320 -5.50151918 [4,] -0.81917250 -3.90674320 [5,] 2.30913039 -0.81917250 [6,] 4.52760707 2.30913039 [7,] -0.92655649 4.52760707 [8,] 1.36423249 -0.92655649 [9,] 0.31254837 1.36423249 [10,] 3.64398778 0.31254837 [11,] 0.75106855 3.64398778 [12,] 3.15509075 0.75106855 [13,] 2.66363053 3.15509075 [14,] -3.02634516 2.66363053 [15,] -2.10570356 -3.02634516 [16,] 1.94611545 -2.10570356 [17,] 0.32789788 1.94611545 [18,] 1.97142561 0.32789788 [19,] -2.24681017 1.97142561 [20,] -3.03936886 -2.24681017 [21,] -2.61070580 -3.03936886 [22,] 1.99340962 -2.61070580 [23,] 0.54823408 1.99340962 [24,] 3.88061268 0.54823408 [25,] 6.79856295 3.88061268 [26,] 0.40978432 6.79856295 [27,] -2.11466387 0.40978432 [28,] -1.48816149 -2.11466387 [29,] 0.06968896 -1.48816149 [30,] -1.73728128 0.06968896 [31,] -6.25770877 -1.73728128 [32,] 3.30112650 -6.25770877 [33,] -1.91909683 3.30112650 [34,] 1.18000711 -1.91909683 [35,] -0.49702005 1.18000711 [36,] -3.15464262 -0.49702005 [37,] 2.09755557 -3.15464262 [38,] -5.35601222 2.09755557 [39,] 0.19764061 -5.35601222 [40,] 2.38510336 0.19764061 [41,] 0.11508867 2.38510336 [42,] 2.67905578 0.11508867 [43,] 1.05151123 2.67905578 [44,] 5.59913230 1.05151123 [45,] 3.67262733 5.59913230 [46,] 2.14428466 3.67262733 [47,] -1.73724118 2.14428466 [48,] -0.35454720 -1.73724118 [49,] 4.50057259 -0.35454720 [50,] -4.06051524 4.50057259 [51,] -1.06341376 -4.06051524 [52,] -0.81548645 -1.06341376 [53,] -1.84168350 -0.81548645 [54,] -0.77965300 -1.84168350 [55,] 2.59111117 -0.77965300 [56,] 4.09128840 2.59111117 [57,] -5.99766636 4.09128840 [58,] 1.72681226 -5.99766636 [59,] 0.09913263 1.72681226 [60,] -1.62547479 0.09913263 [61,] 3.21724327 -1.62547479 [62,] -0.72679861 3.21724327 [63,] -3.57860147 -0.72679861 [64,] 0.13802911 -3.57860147 [65,] -0.83865751 0.13802911 [66,] 0.79461683 -0.83865751 [67,] -3.20891775 0.79461683 [68,] 3.47375014 -3.20891775 [69,] -0.81196434 3.47375014 [70,] 3.95031687 -0.81196434 [71,] -4.64351991 3.95031687 [72,] -2.88758361 -4.64351991 [73,] 0.34338247 -2.88758361 [74,] 1.49818743 0.34338247 [75,] 5.09764359 1.49818743 [76,] 1.18411355 5.09764359 [77,] 0.24908371 1.18411355 [78,] -4.87626281 0.24908371 [79,] 4.42676576 -4.87626281 [80,] -2.58814612 4.42676576 [81,] -0.65392439 -2.58814612 [82,] -0.99051849 -0.65392439 [83,] 2.71509765 -0.99051849 [84,] -2.70153035 2.71509765 [85,] -1.08721403 -2.70153035 [86,] 1.72886457 -1.08721403 [87,] -1.83664530 1.72886457 [88,] -5.01372281 -1.83664530 [89,] -0.44279695 -5.01372281 [90,] -3.72892170 -0.44279695 [91,] 2.07640539 -3.72892170 [92,] -2.17147802 2.07640539 [93,] -0.41523916 -2.17147802 [94,] -3.54466746 -0.41523916 [95,] 3.07883361 -3.54466746 [96,] 2.22259030 3.07883361 [97,] 0.70179845 2.22259030 [98,] 1.96597818 0.70179845 [99,] -3.24584993 1.96597818 [100,] 2.54749762 -3.24584993 [101,] 1.94345860 2.54749762 [102,] -0.83285446 1.94345860 [103,] -0.53598264 -0.83285446 [104,] -3.54200995 -0.53598264 [105,] 7.33038286 -3.54200995 [106,] 2.36034667 7.33038286 [107,] 4.59755590 2.36034667 [108,] 1.01552490 4.59755590 [109,] 6.77628143 1.01552490 [110,] -4.81911220 6.77628143 [111,] -2.95776469 -4.81911220 [112,] -5.60325776 -2.95776469 [113,] -1.55241986 -5.60325776 [114,] 2.98294618 -1.55241986 [115,] 2.12848446 2.98294618 [116,] -2.95422333 2.12848446 [117,] -2.68776343 -2.95422333 [118,] -1.42858627 -2.68776343 [119,] 2.60858577 -1.42858627 [120,] -1.76844557 2.60858577 [121,] -1.30900279 -1.76844557 [122,] 2.40470983 -1.30900279 [123,] 0.92195167 2.40470983 [124,] -0.46525734 0.92195167 [125,] -3.06881929 -0.46525734 [126,] 4.57018476 -3.06881929 [127,] 6.80737857 4.57018476 [128,] -2.89382858 6.80737857 [129,] 1.65083928 -2.89382858 [130,] -2.76664855 1.65083928 [131,] -3.78776407 -2.76664855 [132,] 3.48692893 -3.78776407 [133,] -5.28488692 3.48692893 [134,] 1.44280201 -5.28488692 [135,] -0.88967784 1.44280201 [136,] -1.74374137 -0.88967784 [137,] -0.90717084 -1.74374137 [138,] -3.49937188 -0.90717084 [139,] 0.82976934 -3.49937188 [140,] -1.90385011 0.82976934 [141,] -3.52021893 -1.90385011 [142,] -4.96312896 -3.52021893 [143,] -5.07746781 -4.96312896 [144,] -0.38964187 -5.07746781 [145,] 7.42587164 -0.38964187 [146,] -1.14534031 7.42587164 [147,] 1.68453789 -1.14534031 [148,] -1.77172686 1.68453789 [149,] 1.91168531 -1.77172686 [150,] 2.67441092 1.91168531 [151,] 6.87108050 2.67441092 [152,] -2.79405533 6.87108050 [153,] -2.22101684 -2.79405533 [154,] 0.78164867 -2.22101684 [155,] 0.83751316 0.78164867 [156,] 2.07640539 0.83751316 [157,] -3.60976280 2.07640539 [158,] -2.89382858 -3.60976280 [159,] -0.36755365 -2.89382858 [160,] -2.08953985 -0.36755365 [161,] -0.87437015 -2.08953985 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 4.43442518 5.82525994 2 -5.50151918 4.43442518 3 -3.90674320 -5.50151918 4 -0.81917250 -3.90674320 5 2.30913039 -0.81917250 6 4.52760707 2.30913039 7 -0.92655649 4.52760707 8 1.36423249 -0.92655649 9 0.31254837 1.36423249 10 3.64398778 0.31254837 11 0.75106855 3.64398778 12 3.15509075 0.75106855 13 2.66363053 3.15509075 14 -3.02634516 2.66363053 15 -2.10570356 -3.02634516 16 1.94611545 -2.10570356 17 0.32789788 1.94611545 18 1.97142561 0.32789788 19 -2.24681017 1.97142561 20 -3.03936886 -2.24681017 21 -2.61070580 -3.03936886 22 1.99340962 -2.61070580 23 0.54823408 1.99340962 24 3.88061268 0.54823408 25 6.79856295 3.88061268 26 0.40978432 6.79856295 27 -2.11466387 0.40978432 28 -1.48816149 -2.11466387 29 0.06968896 -1.48816149 30 -1.73728128 0.06968896 31 -6.25770877 -1.73728128 32 3.30112650 -6.25770877 33 -1.91909683 3.30112650 34 1.18000711 -1.91909683 35 -0.49702005 1.18000711 36 -3.15464262 -0.49702005 37 2.09755557 -3.15464262 38 -5.35601222 2.09755557 39 0.19764061 -5.35601222 40 2.38510336 0.19764061 41 0.11508867 2.38510336 42 2.67905578 0.11508867 43 1.05151123 2.67905578 44 5.59913230 1.05151123 45 3.67262733 5.59913230 46 2.14428466 3.67262733 47 -1.73724118 2.14428466 48 -0.35454720 -1.73724118 49 4.50057259 -0.35454720 50 -4.06051524 4.50057259 51 -1.06341376 -4.06051524 52 -0.81548645 -1.06341376 53 -1.84168350 -0.81548645 54 -0.77965300 -1.84168350 55 2.59111117 -0.77965300 56 4.09128840 2.59111117 57 -5.99766636 4.09128840 58 1.72681226 -5.99766636 59 0.09913263 1.72681226 60 -1.62547479 0.09913263 61 3.21724327 -1.62547479 62 -0.72679861 3.21724327 63 -3.57860147 -0.72679861 64 0.13802911 -3.57860147 65 -0.83865751 0.13802911 66 0.79461683 -0.83865751 67 -3.20891775 0.79461683 68 3.47375014 -3.20891775 69 -0.81196434 3.47375014 70 3.95031687 -0.81196434 71 -4.64351991 3.95031687 72 -2.88758361 -4.64351991 73 0.34338247 -2.88758361 74 1.49818743 0.34338247 75 5.09764359 1.49818743 76 1.18411355 5.09764359 77 0.24908371 1.18411355 78 -4.87626281 0.24908371 79 4.42676576 -4.87626281 80 -2.58814612 4.42676576 81 -0.65392439 -2.58814612 82 -0.99051849 -0.65392439 83 2.71509765 -0.99051849 84 -2.70153035 2.71509765 85 -1.08721403 -2.70153035 86 1.72886457 -1.08721403 87 -1.83664530 1.72886457 88 -5.01372281 -1.83664530 89 -0.44279695 -5.01372281 90 -3.72892170 -0.44279695 91 2.07640539 -3.72892170 92 -2.17147802 2.07640539 93 -0.41523916 -2.17147802 94 -3.54466746 -0.41523916 95 3.07883361 -3.54466746 96 2.22259030 3.07883361 97 0.70179845 2.22259030 98 1.96597818 0.70179845 99 -3.24584993 1.96597818 100 2.54749762 -3.24584993 101 1.94345860 2.54749762 102 -0.83285446 1.94345860 103 -0.53598264 -0.83285446 104 -3.54200995 -0.53598264 105 7.33038286 -3.54200995 106 2.36034667 7.33038286 107 4.59755590 2.36034667 108 1.01552490 4.59755590 109 6.77628143 1.01552490 110 -4.81911220 6.77628143 111 -2.95776469 -4.81911220 112 -5.60325776 -2.95776469 113 -1.55241986 -5.60325776 114 2.98294618 -1.55241986 115 2.12848446 2.98294618 116 -2.95422333 2.12848446 117 -2.68776343 -2.95422333 118 -1.42858627 -2.68776343 119 2.60858577 -1.42858627 120 -1.76844557 2.60858577 121 -1.30900279 -1.76844557 122 2.40470983 -1.30900279 123 0.92195167 2.40470983 124 -0.46525734 0.92195167 125 -3.06881929 -0.46525734 126 4.57018476 -3.06881929 127 6.80737857 4.57018476 128 -2.89382858 6.80737857 129 1.65083928 -2.89382858 130 -2.76664855 1.65083928 131 -3.78776407 -2.76664855 132 3.48692893 -3.78776407 133 -5.28488692 3.48692893 134 1.44280201 -5.28488692 135 -0.88967784 1.44280201 136 -1.74374137 -0.88967784 137 -0.90717084 -1.74374137 138 -3.49937188 -0.90717084 139 0.82976934 -3.49937188 140 -1.90385011 0.82976934 141 -3.52021893 -1.90385011 142 -4.96312896 -3.52021893 143 -5.07746781 -4.96312896 144 -0.38964187 -5.07746781 145 7.42587164 -0.38964187 146 -1.14534031 7.42587164 147 1.68453789 -1.14534031 148 -1.77172686 1.68453789 149 1.91168531 -1.77172686 150 2.67441092 1.91168531 151 6.87108050 2.67441092 152 -2.79405533 6.87108050 153 -2.22101684 -2.79405533 154 0.78164867 -2.22101684 155 0.83751316 0.78164867 156 2.07640539 0.83751316 157 -3.60976280 2.07640539 158 -2.89382858 -3.60976280 159 -0.36755365 -2.89382858 160 -2.08953985 -0.36755365 161 -0.87437015 -2.08953985 > 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/7dfj31322583127.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/8bqwu1322583127.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/9qs8d1322583127.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/10kk8s1322583127.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/11jkor1322583127.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/12xvoo1322583127.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/13nt9x1322583127.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/145cii1322583127.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/15s2l31322583127.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/16siyi1322583127.tab") + } > > try(system("convert tmp/1j0vd1322583127.ps tmp/1j0vd1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/2nscu1322583127.ps tmp/2nscu1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/38zbw1322583127.ps tmp/38zbw1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/47d6x1322583127.ps tmp/47d6x1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/5rs4k1322583127.ps tmp/5rs4k1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/69b2k1322583127.ps tmp/69b2k1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/7dfj31322583127.ps tmp/7dfj31322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/8bqwu1322583127.ps tmp/8bqwu1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/9qs8d1322583127.ps tmp/9qs8d1322583127.png",intern=TRUE)) character(0) > try(system("convert tmp/10kk8s1322583127.ps tmp/10kk8s1322583127.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.352 0.716 7.221