R version 2.12.0 (2010-10-15) 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(13 + ,53 + ,41 + ,7 + ,2 + ,16 + ,86 + ,39 + ,5 + ,2 + ,19 + ,66 + ,30 + ,5 + ,2 + ,15 + ,67 + ,31 + ,5 + ,1 + ,14 + ,76 + ,34 + ,8 + ,2 + ,13 + ,78 + ,35 + ,6 + ,2 + ,19 + ,53 + ,39 + ,5 + ,2 + ,15 + ,80 + ,34 + ,6 + ,2 + ,14 + ,74 + ,36 + ,5 + ,2 + ,15 + ,76 + ,37 + ,4 + ,2 + ,16 + ,79 + ,38 + ,6 + ,1 + ,16 + ,54 + ,36 + ,5 + ,2 + ,16 + ,67 + ,38 + ,5 + ,1 + ,16 + ,54 + ,39 + ,6 + ,2 + ,17 + ,87 + ,33 + ,7 + ,2 + ,15 + ,58 + ,32 + ,6 + ,1 + ,15 + ,75 + ,36 + ,7 + ,1 + ,20 + ,88 + ,38 + ,6 + ,2 + ,18 + ,64 + ,39 + ,8 + ,1 + ,16 + ,57 + ,32 + ,7 + ,2 + ,16 + ,66 + ,32 + ,5 + ,1 + ,16 + ,68 + ,31 + ,5 + ,2 + ,19 + ,54 + ,39 + ,7 + ,2 + ,16 + ,56 + ,37 + ,7 + ,2 + ,17 + ,86 + ,39 + ,5 + ,1 + ,17 + ,80 + ,41 + ,4 + ,2 + ,16 + ,76 + ,36 + ,10 + ,1 + ,15 + ,69 + ,33 + ,6 + ,2 + ,16 + ,78 + ,33 + ,5 + ,2 + ,14 + ,67 + ,34 + ,5 + ,1 + ,15 + ,80 + ,31 + ,5 + ,2 + ,12 + ,54 + ,27 + ,5 + ,1 + ,14 + ,71 + ,37 + ,6 + ,2 + ,16 + ,84 + ,34 + ,5 + ,2 + ,14 + ,74 + ,34 + ,5 + ,1 + ,7 + ,71 + ,32 + ,5 + ,1 + ,10 + ,63 + ,29 + ,5 + ,1 + ,14 + ,71 + ,36 + ,5 + ,1 + ,16 + ,76 + ,29 + ,5 + ,2 + ,16 + ,69 + ,35 + ,5 + ,1 + ,16 + ,74 + ,37 + ,5 + ,1 + ,14 + ,75 + ,34 + ,7 + ,2 + ,20 + ,54 + ,38 + ,5 + ,1 + ,14 + ,52 + ,35 + ,6 + ,1 + ,14 + ,69 + ,38 + ,7 + ,2 + ,11 + ,68 + ,37 + ,7 + ,2 + ,14 + ,65 + ,38 + ,5 + ,2 + ,15 + ,75 + ,33 + ,5 + ,2 + ,16 + ,74 + ,36 + ,4 + ,2 + ,14 + ,75 + ,38 + ,5 + ,1 + ,16 + ,72 + ,32 + ,4 + ,2 + ,14 + ,67 + ,32 + ,5 + ,1 + ,12 + ,63 + ,32 + ,5 + ,1 + ,16 + ,62 + ,34 + ,7 + ,2 + ,9 + ,63 + ,32 + ,5 + ,1 + ,14 + ,76 + ,37 + ,5 + ,2 + ,16 + ,74 + ,39 + ,6 + ,2 + ,16 + ,67 + ,29 + ,4 + ,2 + ,15 + ,73 + ,37 + ,6 + ,1 + ,16 + ,70 + ,35 + ,6 + ,2 + ,12 + ,53 + ,30 + ,5 + ,1 + ,16 + ,77 + ,38 + ,7 + ,1 + ,16 + ,77 + ,34 + ,6 + ,2 + ,14 + ,52 + ,31 + ,8 + ,2 + ,16 + ,54 + ,34 + ,7 + ,2 + ,17 + ,80 + ,35 + ,5 + ,1 + ,18 + ,66 + ,36 + ,6 + ,2 + ,18 + ,73 + ,30 + ,6 + ,1 + ,12 + ,63 + ,39 + ,5 + ,2 + ,16 + ,69 + ,35 + ,5 + ,1 + ,10 + ,67 + ,38 + ,5 + ,1 + ,14 + ,54 + ,31 + ,5 + ,2 + ,18 + ,81 + ,34 + ,4 + ,2 + ,18 + ,69 + ,38 + ,6 + ,1 + ,16 + ,84 + ,34 + ,6 + ,1 + ,17 + ,80 + ,39 + ,6 + ,2 + ,16 + ,70 + ,37 + ,6 + ,2 + ,16 + ,69 + ,34 + ,7 + ,2 + ,13 + ,77 + ,28 + ,5 + ,1 + ,16 + ,54 + ,37 + ,7 + ,1 + ,16 + ,79 + ,33 + ,6 + ,1 + ,20 + ,30 + ,37 + ,5 + ,1 + ,16 + ,71 + ,35 + ,5 + ,2 + ,15 + ,73 + ,37 + ,4 + ,1 + ,15 + ,72 + ,32 + ,8 + ,2 + ,16 + ,77 + ,33 + ,8 + ,2 + ,14 + ,75 + ,38 + ,5 + ,1 + ,16 + ,69 + ,33 + ,5 + ,2 + ,16 + ,54 + ,29 + ,6 + ,2 + ,15 + ,70 + ,33 + ,4 + ,2 + ,12 + ,73 + ,31 + ,5 + ,2 + ,17 + ,54 + ,36 + ,5 + ,2 + ,16 + ,77 + ,35 + ,5 + ,2 + ,15 + ,82 + ,32 + ,5 + ,2 + ,13 + ,80 + ,29 + ,6 + ,2 + ,16 + ,80 + ,39 + ,6 + ,2 + ,16 + ,69 + ,37 + ,5 + ,2 + ,16 + ,78 + ,35 + ,6 + ,2 + ,16 + ,81 + ,37 + ,5 + ,1 + ,14 + ,76 + ,32 + ,7 + ,1 + ,16 + ,76 + ,38 + ,5 + ,2 + ,16 + ,73 + ,37 + ,6 + ,1 + ,20 + ,85 + ,36 + ,6 + ,2 + ,15 + ,66 + ,32 + ,6 + ,1 + ,16 + ,79 + ,33 + ,4 + ,2 + ,13 + ,68 + ,40 + ,5 + ,1 + ,17 + ,76 + ,38 + ,5 + ,2 + ,16 + ,71 + ,41 + ,7 + ,1 + ,16 + ,54 + ,36 + ,6 + ,1 + ,12 + ,46 + ,43 + ,9 + ,2 + ,16 + ,82 + ,30 + ,6 + ,2 + ,16 + ,74 + ,31 + ,6 + ,2 + ,17 + ,88 + ,32 + ,5 + ,2 + ,13 + ,38 + ,32 + ,6 + ,1 + ,12 + ,76 + ,37 + ,5 + ,2 + ,18 + ,86 + ,37 + ,8 + ,1 + ,14 + ,54 + ,33 + ,7 + ,2 + ,14 + ,70 + ,34 + ,5 + ,2 + ,13 + ,69 + ,33 + ,7 + ,2 + ,16 + ,90 + ,38 + ,6 + ,2 + ,13 + ,54 + ,33 + ,6 + ,2 + ,16 + ,76 + ,31 + ,9 + ,2 + ,13 + ,89 + ,38 + ,7 + ,2 + ,16 + ,76 + ,37 + ,6 + ,2 + ,15 + ,73 + ,33 + ,5 + ,2 + ,16 + ,79 + ,31 + ,5 + ,2 + ,15 + ,90 + ,39 + ,6 + ,1 + ,17 + ,74 + ,44 + ,6 + ,2 + ,15 + ,81 + ,33 + ,7 + ,2 + ,12 + ,72 + ,35 + ,5 + ,2 + ,16 + ,71 + ,32 + ,5 + ,1 + ,10 + ,66 + ,28 + ,5 + ,1 + ,16 + ,77 + ,40 + ,6 + ,2 + ,12 + ,65 + ,27 + ,4 + ,1 + ,14 + ,74 + ,37 + ,5 + ,1 + ,15 + ,82 + ,32 + ,7 + ,2 + ,13 + ,54 + ,28 + ,5 + ,1 + ,15 + ,63 + ,34 + ,7 + ,1 + ,11 + ,54 + ,30 + ,7 + ,2 + ,12 + ,64 + ,35 + ,6 + ,2 + ,8 + ,69 + ,31 + ,5 + ,1 + ,16 + ,54 + ,32 + ,8 + ,2 + ,15 + ,84 + ,30 + ,5 + ,1 + ,17 + ,86 + ,30 + ,5 + ,2 + ,16 + ,77 + ,31 + ,5 + ,1 + ,10 + ,89 + ,40 + ,6 + ,2 + ,18 + ,76 + ,32 + ,4 + ,2 + ,13 + ,60 + ,36 + ,5 + ,1 + ,16 + ,75 + ,32 + ,5 + ,1 + ,13 + ,73 + ,35 + ,7 + ,1 + ,10 + ,85 + ,38 + ,6 + ,2 + ,15 + ,79 + ,42 + ,7 + ,2 + ,16 + ,71 + ,34 + ,10 + ,1 + ,16 + ,72 + ,35 + ,6 + ,2 + ,14 + ,69 + ,35 + ,8 + ,2 + ,10 + ,78 + ,33 + ,4 + ,2 + ,17 + ,54 + ,36 + ,5 + ,2 + ,13 + ,69 + ,32 + ,6 + ,2 + ,15 + ,81 + ,33 + ,7 + ,2 + ,16 + ,84 + ,34 + ,7 + ,2 + ,12 + ,84 + ,32 + ,6 + ,2 + ,13 + ,69 + ,34 + ,6 + ,2) + ,dim=c(5 + ,162) + ,dimnames=list(c('Learning' + ,'Belonging' + ,'Connected' + ,'Age' + ,'Gender') + ,1:162)) > y <- array(NA,dim=c(5,162),dimnames=list(c('Learning','Belonging','Connected','Age','Gender'),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 Learning Belonging Connected Age Gender 1 13 53 41 7 2 2 16 86 39 5 2 3 19 66 30 5 2 4 15 67 31 5 1 5 14 76 34 8 2 6 13 78 35 6 2 7 19 53 39 5 2 8 15 80 34 6 2 9 14 74 36 5 2 10 15 76 37 4 2 11 16 79 38 6 1 12 16 54 36 5 2 13 16 67 38 5 1 14 16 54 39 6 2 15 17 87 33 7 2 16 15 58 32 6 1 17 15 75 36 7 1 18 20 88 38 6 2 19 18 64 39 8 1 20 16 57 32 7 2 21 16 66 32 5 1 22 16 68 31 5 2 23 19 54 39 7 2 24 16 56 37 7 2 25 17 86 39 5 1 26 17 80 41 4 2 27 16 76 36 10 1 28 15 69 33 6 2 29 16 78 33 5 2 30 14 67 34 5 1 31 15 80 31 5 2 32 12 54 27 5 1 33 14 71 37 6 2 34 16 84 34 5 2 35 14 74 34 5 1 36 7 71 32 5 1 37 10 63 29 5 1 38 14 71 36 5 1 39 16 76 29 5 2 40 16 69 35 5 1 41 16 74 37 5 1 42 14 75 34 7 2 43 20 54 38 5 1 44 14 52 35 6 1 45 14 69 38 7 2 46 11 68 37 7 2 47 14 65 38 5 2 48 15 75 33 5 2 49 16 74 36 4 2 50 14 75 38 5 1 51 16 72 32 4 2 52 14 67 32 5 1 53 12 63 32 5 1 54 16 62 34 7 2 55 9 63 32 5 1 56 14 76 37 5 2 57 16 74 39 6 2 58 16 67 29 4 2 59 15 73 37 6 1 60 16 70 35 6 2 61 12 53 30 5 1 62 16 77 38 7 1 63 16 77 34 6 2 64 14 52 31 8 2 65 16 54 34 7 2 66 17 80 35 5 1 67 18 66 36 6 2 68 18 73 30 6 1 69 12 63 39 5 2 70 16 69 35 5 1 71 10 67 38 5 1 72 14 54 31 5 2 73 18 81 34 4 2 74 18 69 38 6 1 75 16 84 34 6 1 76 17 80 39 6 2 77 16 70 37 6 2 78 16 69 34 7 2 79 13 77 28 5 1 80 16 54 37 7 1 81 16 79 33 6 1 82 20 30 37 5 1 83 16 71 35 5 2 84 15 73 37 4 1 85 15 72 32 8 2 86 16 77 33 8 2 87 14 75 38 5 1 88 16 69 33 5 2 89 16 54 29 6 2 90 15 70 33 4 2 91 12 73 31 5 2 92 17 54 36 5 2 93 16 77 35 5 2 94 15 82 32 5 2 95 13 80 29 6 2 96 16 80 39 6 2 97 16 69 37 5 2 98 16 78 35 6 2 99 16 81 37 5 1 100 14 76 32 7 1 101 16 76 38 5 2 102 16 73 37 6 1 103 20 85 36 6 2 104 15 66 32 6 1 105 16 79 33 4 2 106 13 68 40 5 1 107 17 76 38 5 2 108 16 71 41 7 1 109 16 54 36 6 1 110 12 46 43 9 2 111 16 82 30 6 2 112 16 74 31 6 2 113 17 88 32 5 2 114 13 38 32 6 1 115 12 76 37 5 2 116 18 86 37 8 1 117 14 54 33 7 2 118 14 70 34 5 2 119 13 69 33 7 2 120 16 90 38 6 2 121 13 54 33 6 2 122 16 76 31 9 2 123 13 89 38 7 2 124 16 76 37 6 2 125 15 73 33 5 2 126 16 79 31 5 2 127 15 90 39 6 1 128 17 74 44 6 2 129 15 81 33 7 2 130 12 72 35 5 2 131 16 71 32 5 1 132 10 66 28 5 1 133 16 77 40 6 2 134 12 65 27 4 1 135 14 74 37 5 1 136 15 82 32 7 2 137 13 54 28 5 1 138 15 63 34 7 1 139 11 54 30 7 2 140 12 64 35 6 2 141 8 69 31 5 1 142 16 54 32 8 2 143 15 84 30 5 1 144 17 86 30 5 2 145 16 77 31 5 1 146 10 89 40 6 2 147 18 76 32 4 2 148 13 60 36 5 1 149 16 75 32 5 1 150 13 73 35 7 1 151 10 85 38 6 2 152 15 79 42 7 2 153 16 71 34 10 1 154 16 72 35 6 2 155 14 69 35 8 2 156 10 78 33 4 2 157 17 54 36 5 2 158 13 69 32 6 2 159 15 81 33 7 2 160 16 84 34 7 2 161 12 84 32 6 2 162 13 69 34 6 2 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Belonging Connected Age Gender 8.50282 0.01269 0.13374 0.03401 0.44539 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.2989 -1.1710 0.4483 1.2563 5.5528 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8.50282 2.19490 3.874 0.000157 *** Belonging 0.01269 0.01656 0.766 0.444606 Connected 0.13374 0.05255 2.545 0.011901 * Age 0.03401 0.15309 0.222 0.824477 Gender 0.44539 0.36466 1.221 0.223777 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.215 on 157 degrees of freedom Multiple R-squared: 0.06041, Adjusted R-squared: 0.03647 F-statistic: 2.523 on 4 and 157 DF, p-value: 0.04314 > 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.47339816 0.94679632 0.5266018 [2,] 0.52707866 0.94584269 0.4729213 [3,] 0.46391665 0.92783329 0.5360834 [4,] 0.55706396 0.88587207 0.4429360 [5,] 0.45328625 0.90657250 0.5467137 [6,] 0.34517732 0.69035464 0.6548227 [7,] 0.25454908 0.50909815 0.7454509 [8,] 0.31113045 0.62226090 0.6888695 [9,] 0.24650060 0.49300121 0.7534994 [10,] 0.18349604 0.36699209 0.8165040 [11,] 0.45106146 0.90212292 0.5489385 [12,] 0.52911153 0.94177694 0.4708885 [13,] 0.45640603 0.91281206 0.5435940 [14,] 0.38519600 0.77039200 0.6148040 [15,] 0.31757126 0.63514251 0.6824287 [16,] 0.38435614 0.76871228 0.6156439 [17,] 0.31923152 0.63846305 0.6807685 [18,] 0.27076068 0.54152135 0.7292393 [19,] 0.21878598 0.43757196 0.7812140 [20,] 0.17361148 0.34722297 0.8263885 [21,] 0.13927966 0.27855933 0.8607203 [22,] 0.10641919 0.21283837 0.8935808 [23,] 0.09821261 0.19642522 0.9017874 [24,] 0.07475658 0.14951316 0.9252434 [25,] 0.08294017 0.16588035 0.9170598 [26,] 0.08472886 0.16945773 0.9152711 [27,] 0.06368616 0.12737232 0.9363138 [28,] 0.05232240 0.10464479 0.9476776 [29,] 0.50883058 0.98233885 0.4911694 [30,] 0.58065723 0.83868554 0.4193428 [31,] 0.53043993 0.93912014 0.4695601 [32,] 0.50156768 0.99686464 0.4984323 [33,] 0.47240541 0.94481083 0.5275946 [34,] 0.42918469 0.85836937 0.5708153 [35,] 0.40658383 0.81316767 0.5934162 [36,] 0.59801427 0.80397147 0.4019857 [37,] 0.55369506 0.89260988 0.4463049 [38,] 0.55512909 0.88974181 0.4448709 [39,] 0.72510151 0.54979699 0.2748985 [40,] 0.71471513 0.57056974 0.2852849 [41,] 0.66997041 0.66005919 0.3300296 [42,] 0.62600363 0.74799274 0.3739964 [43,] 0.59635575 0.80728850 0.4036442 [44,] 0.56073623 0.87852754 0.4392638 [45,] 0.51145495 0.97709010 0.4885451 [46,] 0.50697844 0.98604313 0.4930216 [47,] 0.46643582 0.93287165 0.5335642 [48,] 0.66036299 0.67927401 0.3396370 [49,] 0.64271737 0.71456525 0.3572826 [50,] 0.59883519 0.80232962 0.4011648 [51,] 0.58235713 0.83528574 0.4176429 [52,] 0.53484700 0.93030601 0.4651530 [53,] 0.49237790 0.98475580 0.5076221 [54,] 0.47011003 0.94022006 0.5298900 [55,] 0.42868857 0.85737714 0.5713114 [56,] 0.38862304 0.77724608 0.6113770 [57,] 0.34559355 0.69118709 0.6544065 [58,] 0.31269994 0.62539989 0.6873001 [59,] 0.31405853 0.62811707 0.6859415 [60,] 0.33100765 0.66201531 0.6689923 [61,] 0.43649699 0.87299398 0.5635030 [62,] 0.51854252 0.96291495 0.4814575 [63,] 0.48848780 0.97697560 0.5115122 [64,] 0.66847027 0.66305945 0.3315297 [65,] 0.62655645 0.74688710 0.3734435 [66,] 0.65120783 0.69758433 0.3487922 [67,] 0.67925709 0.64148583 0.3207429 [68,] 0.64759655 0.70480690 0.3524034 [69,] 0.61653523 0.76692954 0.3834648 [70,] 0.57585059 0.84829881 0.4241494 [71,] 0.53817842 0.92364315 0.4618216 [72,] 0.50028694 0.99942612 0.4997131 [73,] 0.46896308 0.93792616 0.5310369 [74,] 0.43983299 0.87966599 0.5601670 [75,] 0.70755717 0.58488566 0.2924428 [76,] 0.67625099 0.64749802 0.3237490 [77,] 0.63564958 0.72870085 0.3643504 [78,] 0.59182089 0.81635822 0.4081791 [79,] 0.55361737 0.89276527 0.4463826 [80,] 0.51847978 0.96304044 0.4815202 [81,] 0.48858477 0.97716953 0.5114152 [82,] 0.48293599 0.96587198 0.5170640 [83,] 0.44035588 0.88071176 0.5596441 [84,] 0.45581033 0.91162065 0.5441897 [85,] 0.47338284 0.94676569 0.5266172 [86,] 0.43776874 0.87553748 0.5622313 [87,] 0.39269987 0.78539973 0.6073001 [88,] 0.37053149 0.74106298 0.6294685 [89,] 0.33129117 0.66258234 0.6687088 [90,] 0.30437716 0.60875433 0.6956228 [91,] 0.27185065 0.54370130 0.7281493 [92,] 0.24247751 0.48495503 0.7575225 [93,] 0.20980119 0.41960237 0.7901988 [94,] 0.18569184 0.37138369 0.8143082 [95,] 0.16464844 0.32929688 0.8353516 [96,] 0.29042152 0.58084303 0.7095785 [97,] 0.25692182 0.51384363 0.7430782 [98,] 0.23922449 0.47844899 0.7607755 [99,] 0.22899665 0.45799329 0.7710034 [100,] 0.23329503 0.46659006 0.7667050 [101,] 0.20754717 0.41509434 0.7924528 [102,] 0.21030579 0.42061157 0.7896942 [103,] 0.25424043 0.50848085 0.7457596 [104,] 0.22879356 0.45758711 0.7712064 [105,] 0.21082716 0.42165431 0.7891728 [106,] 0.21953813 0.43907625 0.7804619 [107,] 0.18582321 0.37164642 0.8141768 [108,] 0.20644485 0.41288969 0.7935552 [109,] 0.22558534 0.45117068 0.7744147 [110,] 0.19097286 0.38194573 0.8090271 [111,] 0.16152586 0.32305172 0.8384741 [112,] 0.14741850 0.29483700 0.8525815 [113,] 0.12619098 0.25238197 0.8738090 [114,] 0.10801065 0.21602129 0.8919894 [115,] 0.09017193 0.18034385 0.9098281 [116,] 0.09209292 0.18418584 0.9079071 [117,] 0.07850740 0.15701480 0.9214926 [118,] 0.06362739 0.12725479 0.9363726 [119,] 0.06002743 0.12005487 0.9399726 [120,] 0.04624875 0.09249751 0.9537512 [121,] 0.04685602 0.09371203 0.9531440 [122,] 0.03528183 0.07056365 0.9647182 [123,] 0.03433555 0.06867110 0.9656644 [124,] 0.03500821 0.07001643 0.9649918 [125,] 0.05177114 0.10354229 0.9482289 [126,] 0.04954087 0.09908174 0.9504591 [127,] 0.04279929 0.08559858 0.9572007 [128,] 0.03258057 0.06516114 0.9674194 [129,] 0.02303162 0.04606324 0.9769684 [130,] 0.01709297 0.03418594 0.9829070 [131,] 0.01206243 0.02412487 0.9879376 [132,] 0.02751026 0.05502053 0.9724897 [133,] 0.02868534 0.05737067 0.9713147 [134,] 0.26395755 0.52791509 0.7360425 [135,] 0.21526450 0.43052899 0.7847355 [136,] 0.16496854 0.32993709 0.8350315 [137,] 0.18313104 0.36626208 0.8168690 [138,] 0.16369650 0.32739300 0.8363035 [139,] 0.17783915 0.35567829 0.8221609 [140,] 0.42829223 0.85658445 0.5717078 [141,] 0.39575385 0.79150769 0.6042462 [142,] 0.56982434 0.86035133 0.4301757 [143,] 0.46317167 0.92634334 0.5368283 [144,] 0.57873966 0.84252068 0.4212603 [145,] 0.61974449 0.76051101 0.3802555 [146,] 0.47380694 0.94761388 0.5261931 [147,] 0.34103528 0.68207057 0.6589647 > postscript(file="/var/www/rcomp/tmp/11yr51323885330.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/2pr7n1323885330.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/3nthw1323885330.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/4vgf01323885330.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/5aymd1323885330.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 -2.78749027 0.12919565 4.58664607 0.88560519 -1.17724268 -2.26834021 7 8 9 10 11 12 3.54800364 -0.15998613 -1.31730141 -0.44240951 0.76314616 0.93652162 13 14 15 16 17 18 0.94945055 0.50130191 1.85090161 0.83207860 0.04737294 4.20353914 19 20 21 22 23 24 2.75175589 1.36537252 1.76455997 1.42752739 3.46729133 0.70938179 25 26 27 28 29 30 1.57458230 0.97188037 0.93265006 0.11335291 1.03314312 -0.51560394 31 32 33 34 35 36 0.27523357 -1.41446433 -1.44697491 0.82325984 -0.60444200 -7.29889579 37 38 39 40 41 42 -3.79615745 -0.83384130 1.59347094 1.32527738 0.99434887 -1.13054095 43 44 45 46 47 48 5.11443552 -0.49298363 -1.58933956 -4.44291203 -1.47055380 0.07121658 49 50 51 52 53 54 0.71670917 -1.15207866 1.27703698 -0.24813119 -2.19736658 1.03444401 55 56 57 58 59 60 -5.19736658 -1.47642009 0.24747888 1.74170187 -0.02697056 0.83318900 61 62 63 64 65 66 -1.80298231 0.75451788 0.87808732 -0.47144592 1.13597322 2.18567471 67 68 69 70 71 72 2.75021723 3.90918409 -3.57890787 1.32527738 -5.05054945 -0.39479649 73 74 75 76 77 78 2.89534387 2.89005767 1.23463591 1.17133198 0.56571625 0.94560595 79 80 81 82 83 84 -0.84009719 1.18015074 1.43182804 5.55275952 0.85450843 0.04105059 85 86 87 88 89 90 0.14099468 0.94380254 -1.15207866 1.14736348 1.83866569 0.16868291 91 92 93 94 95 96 -2.63592837 1.93652162 0.77836152 0.11611489 -1.49130425 0.17133198 97 98 99 100 101 102 0.61241797 0.73165979 0.90551081 -0.43037270 0.38984354 0.97302944 103 104 105 106 107 108 4.50908535 0.73054939 1.05446255 -2.33071336 1.38984354 0.42945566 109 110 111 112 113 114 1.34789769 -4.03414612 1.34957707 1.31736991 2.03996799 -0.91409837 115 116 117 118 119 120 -3.47642009 2.74002332 -0.73029040 -0.99906405 -1.92065767 0.17815684 121 122 123 124 125 126 -1.69627982 1.18995587 -2.84316258 0.48956934 0.09659888 1.28792473 127 128 129 130 131 132 -0.51019289 0.57879700 -0.07295148 -3.15818273 1.70110421 -3.70049452 133 134 135 136 137 138 0.07566905 -1.52005642 -1.00565113 0.04809374 -0.54820071 0.46713951 139 140 141 142 143 144 -3.32908127 -3.09066409 -6.13977711 1.36943540 0.80359200 2.33282304 145 146 147 148 149 150 1.75869368 -6.07662476 3.22627238 -1.69423864 1.65033960 -1.79350838 151 152 153 154 155 156 -5.75838740 -1.25119658 1.26357857 0.80780670 -1.22214100 -4.93284630 157 158 159 160 161 162 1.93652162 -1.75291072 -0.07295148 0.75523868 -2.94327798 -2.02038347 > postscript(file="/var/www/rcomp/tmp/6cbl11323885330.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 -2.78749027 NA 1 0.12919565 -2.78749027 2 4.58664607 0.12919565 3 0.88560519 4.58664607 4 -1.17724268 0.88560519 5 -2.26834021 -1.17724268 6 3.54800364 -2.26834021 7 -0.15998613 3.54800364 8 -1.31730141 -0.15998613 9 -0.44240951 -1.31730141 10 0.76314616 -0.44240951 11 0.93652162 0.76314616 12 0.94945055 0.93652162 13 0.50130191 0.94945055 14 1.85090161 0.50130191 15 0.83207860 1.85090161 16 0.04737294 0.83207860 17 4.20353914 0.04737294 18 2.75175589 4.20353914 19 1.36537252 2.75175589 20 1.76455997 1.36537252 21 1.42752739 1.76455997 22 3.46729133 1.42752739 23 0.70938179 3.46729133 24 1.57458230 0.70938179 25 0.97188037 1.57458230 26 0.93265006 0.97188037 27 0.11335291 0.93265006 28 1.03314312 0.11335291 29 -0.51560394 1.03314312 30 0.27523357 -0.51560394 31 -1.41446433 0.27523357 32 -1.44697491 -1.41446433 33 0.82325984 -1.44697491 34 -0.60444200 0.82325984 35 -7.29889579 -0.60444200 36 -3.79615745 -7.29889579 37 -0.83384130 -3.79615745 38 1.59347094 -0.83384130 39 1.32527738 1.59347094 40 0.99434887 1.32527738 41 -1.13054095 0.99434887 42 5.11443552 -1.13054095 43 -0.49298363 5.11443552 44 -1.58933956 -0.49298363 45 -4.44291203 -1.58933956 46 -1.47055380 -4.44291203 47 0.07121658 -1.47055380 48 0.71670917 0.07121658 49 -1.15207866 0.71670917 50 1.27703698 -1.15207866 51 -0.24813119 1.27703698 52 -2.19736658 -0.24813119 53 1.03444401 -2.19736658 54 -5.19736658 1.03444401 55 -1.47642009 -5.19736658 56 0.24747888 -1.47642009 57 1.74170187 0.24747888 58 -0.02697056 1.74170187 59 0.83318900 -0.02697056 60 -1.80298231 0.83318900 61 0.75451788 -1.80298231 62 0.87808732 0.75451788 63 -0.47144592 0.87808732 64 1.13597322 -0.47144592 65 2.18567471 1.13597322 66 2.75021723 2.18567471 67 3.90918409 2.75021723 68 -3.57890787 3.90918409 69 1.32527738 -3.57890787 70 -5.05054945 1.32527738 71 -0.39479649 -5.05054945 72 2.89534387 -0.39479649 73 2.89005767 2.89534387 74 1.23463591 2.89005767 75 1.17133198 1.23463591 76 0.56571625 1.17133198 77 0.94560595 0.56571625 78 -0.84009719 0.94560595 79 1.18015074 -0.84009719 80 1.43182804 1.18015074 81 5.55275952 1.43182804 82 0.85450843 5.55275952 83 0.04105059 0.85450843 84 0.14099468 0.04105059 85 0.94380254 0.14099468 86 -1.15207866 0.94380254 87 1.14736348 -1.15207866 88 1.83866569 1.14736348 89 0.16868291 1.83866569 90 -2.63592837 0.16868291 91 1.93652162 -2.63592837 92 0.77836152 1.93652162 93 0.11611489 0.77836152 94 -1.49130425 0.11611489 95 0.17133198 -1.49130425 96 0.61241797 0.17133198 97 0.73165979 0.61241797 98 0.90551081 0.73165979 99 -0.43037270 0.90551081 100 0.38984354 -0.43037270 101 0.97302944 0.38984354 102 4.50908535 0.97302944 103 0.73054939 4.50908535 104 1.05446255 0.73054939 105 -2.33071336 1.05446255 106 1.38984354 -2.33071336 107 0.42945566 1.38984354 108 1.34789769 0.42945566 109 -4.03414612 1.34789769 110 1.34957707 -4.03414612 111 1.31736991 1.34957707 112 2.03996799 1.31736991 113 -0.91409837 2.03996799 114 -3.47642009 -0.91409837 115 2.74002332 -3.47642009 116 -0.73029040 2.74002332 117 -0.99906405 -0.73029040 118 -1.92065767 -0.99906405 119 0.17815684 -1.92065767 120 -1.69627982 0.17815684 121 1.18995587 -1.69627982 122 -2.84316258 1.18995587 123 0.48956934 -2.84316258 124 0.09659888 0.48956934 125 1.28792473 0.09659888 126 -0.51019289 1.28792473 127 0.57879700 -0.51019289 128 -0.07295148 0.57879700 129 -3.15818273 -0.07295148 130 1.70110421 -3.15818273 131 -3.70049452 1.70110421 132 0.07566905 -3.70049452 133 -1.52005642 0.07566905 134 -1.00565113 -1.52005642 135 0.04809374 -1.00565113 136 -0.54820071 0.04809374 137 0.46713951 -0.54820071 138 -3.32908127 0.46713951 139 -3.09066409 -3.32908127 140 -6.13977711 -3.09066409 141 1.36943540 -6.13977711 142 0.80359200 1.36943540 143 2.33282304 0.80359200 144 1.75869368 2.33282304 145 -6.07662476 1.75869368 146 3.22627238 -6.07662476 147 -1.69423864 3.22627238 148 1.65033960 -1.69423864 149 -1.79350838 1.65033960 150 -5.75838740 -1.79350838 151 -1.25119658 -5.75838740 152 1.26357857 -1.25119658 153 0.80780670 1.26357857 154 -1.22214100 0.80780670 155 -4.93284630 -1.22214100 156 1.93652162 -4.93284630 157 -1.75291072 1.93652162 158 -0.07295148 -1.75291072 159 0.75523868 -0.07295148 160 -2.94327798 0.75523868 161 -2.02038347 -2.94327798 162 NA -2.02038347 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.12919565 -2.78749027 [2,] 4.58664607 0.12919565 [3,] 0.88560519 4.58664607 [4,] -1.17724268 0.88560519 [5,] -2.26834021 -1.17724268 [6,] 3.54800364 -2.26834021 [7,] -0.15998613 3.54800364 [8,] -1.31730141 -0.15998613 [9,] -0.44240951 -1.31730141 [10,] 0.76314616 -0.44240951 [11,] 0.93652162 0.76314616 [12,] 0.94945055 0.93652162 [13,] 0.50130191 0.94945055 [14,] 1.85090161 0.50130191 [15,] 0.83207860 1.85090161 [16,] 0.04737294 0.83207860 [17,] 4.20353914 0.04737294 [18,] 2.75175589 4.20353914 [19,] 1.36537252 2.75175589 [20,] 1.76455997 1.36537252 [21,] 1.42752739 1.76455997 [22,] 3.46729133 1.42752739 [23,] 0.70938179 3.46729133 [24,] 1.57458230 0.70938179 [25,] 0.97188037 1.57458230 [26,] 0.93265006 0.97188037 [27,] 0.11335291 0.93265006 [28,] 1.03314312 0.11335291 [29,] -0.51560394 1.03314312 [30,] 0.27523357 -0.51560394 [31,] -1.41446433 0.27523357 [32,] -1.44697491 -1.41446433 [33,] 0.82325984 -1.44697491 [34,] -0.60444200 0.82325984 [35,] -7.29889579 -0.60444200 [36,] -3.79615745 -7.29889579 [37,] -0.83384130 -3.79615745 [38,] 1.59347094 -0.83384130 [39,] 1.32527738 1.59347094 [40,] 0.99434887 1.32527738 [41,] -1.13054095 0.99434887 [42,] 5.11443552 -1.13054095 [43,] -0.49298363 5.11443552 [44,] -1.58933956 -0.49298363 [45,] -4.44291203 -1.58933956 [46,] -1.47055380 -4.44291203 [47,] 0.07121658 -1.47055380 [48,] 0.71670917 0.07121658 [49,] -1.15207866 0.71670917 [50,] 1.27703698 -1.15207866 [51,] -0.24813119 1.27703698 [52,] -2.19736658 -0.24813119 [53,] 1.03444401 -2.19736658 [54,] -5.19736658 1.03444401 [55,] -1.47642009 -5.19736658 [56,] 0.24747888 -1.47642009 [57,] 1.74170187 0.24747888 [58,] -0.02697056 1.74170187 [59,] 0.83318900 -0.02697056 [60,] -1.80298231 0.83318900 [61,] 0.75451788 -1.80298231 [62,] 0.87808732 0.75451788 [63,] -0.47144592 0.87808732 [64,] 1.13597322 -0.47144592 [65,] 2.18567471 1.13597322 [66,] 2.75021723 2.18567471 [67,] 3.90918409 2.75021723 [68,] -3.57890787 3.90918409 [69,] 1.32527738 -3.57890787 [70,] -5.05054945 1.32527738 [71,] -0.39479649 -5.05054945 [72,] 2.89534387 -0.39479649 [73,] 2.89005767 2.89534387 [74,] 1.23463591 2.89005767 [75,] 1.17133198 1.23463591 [76,] 0.56571625 1.17133198 [77,] 0.94560595 0.56571625 [78,] -0.84009719 0.94560595 [79,] 1.18015074 -0.84009719 [80,] 1.43182804 1.18015074 [81,] 5.55275952 1.43182804 [82,] 0.85450843 5.55275952 [83,] 0.04105059 0.85450843 [84,] 0.14099468 0.04105059 [85,] 0.94380254 0.14099468 [86,] -1.15207866 0.94380254 [87,] 1.14736348 -1.15207866 [88,] 1.83866569 1.14736348 [89,] 0.16868291 1.83866569 [90,] -2.63592837 0.16868291 [91,] 1.93652162 -2.63592837 [92,] 0.77836152 1.93652162 [93,] 0.11611489 0.77836152 [94,] -1.49130425 0.11611489 [95,] 0.17133198 -1.49130425 [96,] 0.61241797 0.17133198 [97,] 0.73165979 0.61241797 [98,] 0.90551081 0.73165979 [99,] -0.43037270 0.90551081 [100,] 0.38984354 -0.43037270 [101,] 0.97302944 0.38984354 [102,] 4.50908535 0.97302944 [103,] 0.73054939 4.50908535 [104,] 1.05446255 0.73054939 [105,] -2.33071336 1.05446255 [106,] 1.38984354 -2.33071336 [107,] 0.42945566 1.38984354 [108,] 1.34789769 0.42945566 [109,] -4.03414612 1.34789769 [110,] 1.34957707 -4.03414612 [111,] 1.31736991 1.34957707 [112,] 2.03996799 1.31736991 [113,] -0.91409837 2.03996799 [114,] -3.47642009 -0.91409837 [115,] 2.74002332 -3.47642009 [116,] -0.73029040 2.74002332 [117,] -0.99906405 -0.73029040 [118,] -1.92065767 -0.99906405 [119,] 0.17815684 -1.92065767 [120,] -1.69627982 0.17815684 [121,] 1.18995587 -1.69627982 [122,] -2.84316258 1.18995587 [123,] 0.48956934 -2.84316258 [124,] 0.09659888 0.48956934 [125,] 1.28792473 0.09659888 [126,] -0.51019289 1.28792473 [127,] 0.57879700 -0.51019289 [128,] -0.07295148 0.57879700 [129,] -3.15818273 -0.07295148 [130,] 1.70110421 -3.15818273 [131,] -3.70049452 1.70110421 [132,] 0.07566905 -3.70049452 [133,] -1.52005642 0.07566905 [134,] -1.00565113 -1.52005642 [135,] 0.04809374 -1.00565113 [136,] -0.54820071 0.04809374 [137,] 0.46713951 -0.54820071 [138,] -3.32908127 0.46713951 [139,] -3.09066409 -3.32908127 [140,] -6.13977711 -3.09066409 [141,] 1.36943540 -6.13977711 [142,] 0.80359200 1.36943540 [143,] 2.33282304 0.80359200 [144,] 1.75869368 2.33282304 [145,] -6.07662476 1.75869368 [146,] 3.22627238 -6.07662476 [147,] -1.69423864 3.22627238 [148,] 1.65033960 -1.69423864 [149,] -1.79350838 1.65033960 [150,] -5.75838740 -1.79350838 [151,] -1.25119658 -5.75838740 [152,] 1.26357857 -1.25119658 [153,] 0.80780670 1.26357857 [154,] -1.22214100 0.80780670 [155,] -4.93284630 -1.22214100 [156,] 1.93652162 -4.93284630 [157,] -1.75291072 1.93652162 [158,] -0.07295148 -1.75291072 [159,] 0.75523868 -0.07295148 [160,] -2.94327798 0.75523868 [161,] -2.02038347 -2.94327798 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.12919565 -2.78749027 2 4.58664607 0.12919565 3 0.88560519 4.58664607 4 -1.17724268 0.88560519 5 -2.26834021 -1.17724268 6 3.54800364 -2.26834021 7 -0.15998613 3.54800364 8 -1.31730141 -0.15998613 9 -0.44240951 -1.31730141 10 0.76314616 -0.44240951 11 0.93652162 0.76314616 12 0.94945055 0.93652162 13 0.50130191 0.94945055 14 1.85090161 0.50130191 15 0.83207860 1.85090161 16 0.04737294 0.83207860 17 4.20353914 0.04737294 18 2.75175589 4.20353914 19 1.36537252 2.75175589 20 1.76455997 1.36537252 21 1.42752739 1.76455997 22 3.46729133 1.42752739 23 0.70938179 3.46729133 24 1.57458230 0.70938179 25 0.97188037 1.57458230 26 0.93265006 0.97188037 27 0.11335291 0.93265006 28 1.03314312 0.11335291 29 -0.51560394 1.03314312 30 0.27523357 -0.51560394 31 -1.41446433 0.27523357 32 -1.44697491 -1.41446433 33 0.82325984 -1.44697491 34 -0.60444200 0.82325984 35 -7.29889579 -0.60444200 36 -3.79615745 -7.29889579 37 -0.83384130 -3.79615745 38 1.59347094 -0.83384130 39 1.32527738 1.59347094 40 0.99434887 1.32527738 41 -1.13054095 0.99434887 42 5.11443552 -1.13054095 43 -0.49298363 5.11443552 44 -1.58933956 -0.49298363 45 -4.44291203 -1.58933956 46 -1.47055380 -4.44291203 47 0.07121658 -1.47055380 48 0.71670917 0.07121658 49 -1.15207866 0.71670917 50 1.27703698 -1.15207866 51 -0.24813119 1.27703698 52 -2.19736658 -0.24813119 53 1.03444401 -2.19736658 54 -5.19736658 1.03444401 55 -1.47642009 -5.19736658 56 0.24747888 -1.47642009 57 1.74170187 0.24747888 58 -0.02697056 1.74170187 59 0.83318900 -0.02697056 60 -1.80298231 0.83318900 61 0.75451788 -1.80298231 62 0.87808732 0.75451788 63 -0.47144592 0.87808732 64 1.13597322 -0.47144592 65 2.18567471 1.13597322 66 2.75021723 2.18567471 67 3.90918409 2.75021723 68 -3.57890787 3.90918409 69 1.32527738 -3.57890787 70 -5.05054945 1.32527738 71 -0.39479649 -5.05054945 72 2.89534387 -0.39479649 73 2.89005767 2.89534387 74 1.23463591 2.89005767 75 1.17133198 1.23463591 76 0.56571625 1.17133198 77 0.94560595 0.56571625 78 -0.84009719 0.94560595 79 1.18015074 -0.84009719 80 1.43182804 1.18015074 81 5.55275952 1.43182804 82 0.85450843 5.55275952 83 0.04105059 0.85450843 84 0.14099468 0.04105059 85 0.94380254 0.14099468 86 -1.15207866 0.94380254 87 1.14736348 -1.15207866 88 1.83866569 1.14736348 89 0.16868291 1.83866569 90 -2.63592837 0.16868291 91 1.93652162 -2.63592837 92 0.77836152 1.93652162 93 0.11611489 0.77836152 94 -1.49130425 0.11611489 95 0.17133198 -1.49130425 96 0.61241797 0.17133198 97 0.73165979 0.61241797 98 0.90551081 0.73165979 99 -0.43037270 0.90551081 100 0.38984354 -0.43037270 101 0.97302944 0.38984354 102 4.50908535 0.97302944 103 0.73054939 4.50908535 104 1.05446255 0.73054939 105 -2.33071336 1.05446255 106 1.38984354 -2.33071336 107 0.42945566 1.38984354 108 1.34789769 0.42945566 109 -4.03414612 1.34789769 110 1.34957707 -4.03414612 111 1.31736991 1.34957707 112 2.03996799 1.31736991 113 -0.91409837 2.03996799 114 -3.47642009 -0.91409837 115 2.74002332 -3.47642009 116 -0.73029040 2.74002332 117 -0.99906405 -0.73029040 118 -1.92065767 -0.99906405 119 0.17815684 -1.92065767 120 -1.69627982 0.17815684 121 1.18995587 -1.69627982 122 -2.84316258 1.18995587 123 0.48956934 -2.84316258 124 0.09659888 0.48956934 125 1.28792473 0.09659888 126 -0.51019289 1.28792473 127 0.57879700 -0.51019289 128 -0.07295148 0.57879700 129 -3.15818273 -0.07295148 130 1.70110421 -3.15818273 131 -3.70049452 1.70110421 132 0.07566905 -3.70049452 133 -1.52005642 0.07566905 134 -1.00565113 -1.52005642 135 0.04809374 -1.00565113 136 -0.54820071 0.04809374 137 0.46713951 -0.54820071 138 -3.32908127 0.46713951 139 -3.09066409 -3.32908127 140 -6.13977711 -3.09066409 141 1.36943540 -6.13977711 142 0.80359200 1.36943540 143 2.33282304 0.80359200 144 1.75869368 2.33282304 145 -6.07662476 1.75869368 146 3.22627238 -6.07662476 147 -1.69423864 3.22627238 148 1.65033960 -1.69423864 149 -1.79350838 1.65033960 150 -5.75838740 -1.79350838 151 -1.25119658 -5.75838740 152 1.26357857 -1.25119658 153 0.80780670 1.26357857 154 -1.22214100 0.80780670 155 -4.93284630 -1.22214100 156 1.93652162 -4.93284630 157 -1.75291072 1.93652162 158 -0.07295148 -1.75291072 159 0.75523868 -0.07295148 160 -2.94327798 0.75523868 161 -2.02038347 -2.94327798 > 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/7gpls1323885330.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/8hrji1323885330.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/9qbof1323885330.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/103v3q1323885330.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/11oknk1323885330.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/1213kb1323885330.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/1327oe1323885330.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/14iagy1323885330.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/15z2qh1323885330.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/16uazk1323885330.tab") + } > > try(system("convert tmp/11yr51323885330.ps tmp/11yr51323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/2pr7n1323885330.ps tmp/2pr7n1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/3nthw1323885330.ps tmp/3nthw1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/4vgf01323885330.ps tmp/4vgf01323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/5aymd1323885330.ps tmp/5aymd1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/6cbl11323885330.ps tmp/6cbl11323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/7gpls1323885330.ps tmp/7gpls1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/8hrji1323885330.ps tmp/8hrji1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/9qbof1323885330.ps tmp/9qbof1323885330.png",intern=TRUE)) character(0) > try(system("convert tmp/103v3q1323885330.ps tmp/103v3q1323885330.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.660 0.330 4.988