R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i686-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(14
+ ,41
+ ,38
+ ,13
+ ,12
+ ,53
+ ,18
+ ,39
+ ,32
+ ,16
+ ,11
+ ,83
+ ,11
+ ,30
+ ,35
+ ,19
+ ,15
+ ,66
+ ,12
+ ,31
+ ,33
+ ,15
+ ,6
+ ,67
+ ,16
+ ,34
+ ,37
+ ,14
+ ,13
+ ,76
+ ,18
+ ,35
+ ,29
+ ,13
+ ,10
+ ,78
+ ,14
+ ,39
+ ,31
+ ,19
+ ,12
+ ,53
+ ,14
+ ,34
+ ,36
+ ,15
+ ,14
+ ,80
+ ,15
+ ,36
+ ,35
+ ,14
+ ,12
+ ,74
+ ,15
+ ,37
+ ,38
+ ,15
+ ,9
+ ,76
+ ,17
+ ,38
+ ,31
+ ,16
+ ,10
+ ,79
+ ,19
+ ,36
+ ,34
+ ,16
+ ,12
+ ,54
+ ,10
+ ,38
+ ,35
+ ,16
+ ,12
+ ,67
+ ,16
+ ,39
+ ,38
+ ,16
+ ,11
+ ,54
+ ,18
+ ,33
+ ,37
+ ,17
+ ,15
+ ,87
+ ,14
+ ,32
+ ,33
+ ,15
+ ,12
+ ,58
+ ,14
+ ,36
+ ,32
+ ,15
+ ,10
+ ,75
+ ,17
+ ,38
+ ,38
+ ,20
+ ,12
+ ,88
+ ,14
+ ,39
+ ,38
+ ,18
+ ,11
+ ,64
+ ,16
+ ,32
+ ,32
+ ,16
+ ,12
+ ,57
+ ,18
+ ,32
+ ,33
+ ,16
+ ,11
+ ,66
+ ,11
+ ,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+ ,56
+ ,12
+ ,21
+ ,20
+ ,12
+ ,9
+ ,53
+ ,15
+ ,31
+ ,34
+ ,11
+ ,7
+ ,70
+ ,13
+ ,33
+ ,32
+ ,10
+ ,7
+ ,78
+ ,13
+ ,36
+ ,34
+ ,12
+ ,6
+ ,71
+ ,13
+ ,33
+ ,32
+ ,16
+ ,9
+ ,72
+ ,12
+ ,37
+ ,33
+ ,12
+ ,10
+ ,68
+ ,12
+ ,34
+ ,33
+ ,14
+ ,11
+ ,67
+ ,9
+ ,35
+ ,37
+ ,16
+ ,12
+ ,75
+ ,9
+ ,31
+ ,32
+ ,14
+ ,8
+ ,62
+ ,15
+ ,37
+ ,34
+ ,13
+ ,11
+ ,67
+ ,10
+ ,35
+ ,30
+ ,4
+ ,3
+ ,83
+ ,14
+ ,27
+ ,30
+ ,15
+ ,11
+ ,64
+ ,15
+ ,34
+ ,38
+ ,11
+ ,12
+ ,68
+ ,7
+ ,40
+ ,36
+ ,11
+ ,7
+ ,62
+ ,14
+ ,29
+ ,32
+ ,14
+ ,9
+ ,72)
+ ,dim=c(6
+ ,264)
+ ,dimnames=list(c('Happiness'
+ ,'Connected'
+ ,'Separate'
+ ,'Learning'
+ ,'Software'
+ ,'Sport1')
+ ,1:264))
> y <- array(NA,dim=c(6,264),dimnames=list(c('Happiness','Connected','Separate','Learning','Software','Sport1'),1:264))
> 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 = 'Include Quarterly Dummies'
> par1 = '1'
> par3 <- 'No Linear Trend'
> par2 <- 'Include Quarterly Dummies'
> par1 <- '1'
> #'GNU S' R Code compiled by R2WASP v. 1.2.327 ()
> #Author: root
> #To cite this work: Wessa P., (2013), Multiple Regression (v1.0.29) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_multipleregression.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
> 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
Happiness Connected Separate Learning Software Sport1 Q1 Q2 Q3
1 14 41 38 13 12 53 1 0 0
2 18 39 32 16 11 83 0 1 0
3 11 30 35 19 15 66 0 0 1
4 12 31 33 15 6 67 0 0 0
5 16 34 37 14 13 76 1 0 0
6 18 35 29 13 10 78 0 1 0
7 14 39 31 19 12 53 0 0 1
8 14 34 36 15 14 80 0 0 0
9 15 36 35 14 12 74 1 0 0
10 15 37 38 15 9 76 0 1 0
11 17 38 31 16 10 79 0 0 1
12 19 36 34 16 12 54 0 0 0
13 10 38 35 16 12 67 1 0 0
14 16 39 38 16 11 54 0 1 0
15 18 33 37 17 15 87 0 0 1
16 14 32 33 15 12 58 0 0 0
17 14 36 32 15 10 75 1 0 0
18 17 38 38 20 12 88 0 1 0
19 14 39 38 18 11 64 0 0 1
20 16 32 32 16 12 57 0 0 0
21 18 32 33 16 11 66 1 0 0
22 11 31 31 16 12 68 0 1 0
23 14 39 38 19 13 54 0 0 1
24 12 37 39 16 11 56 0 0 0
25 17 39 32 17 12 86 1 0 0
26 9 41 32 17 13 80 0 1 0
27 16 36 35 16 10 76 0 0 1
28 14 33 37 15 14 69 0 0 0
29 15 33 33 16 12 78 1 0 0
30 11 34 33 14 10 67 0 1 0
31 16 31 31 15 12 80 0 0 1
32 13 27 32 12 8 54 0 0 0
33 17 37 31 14 10 71 1 0 0
34 15 34 37 16 12 84 0 1 0
35 14 34 30 14 12 74 0 0 1
36 16 32 33 10 7 71 0 0 0
37 9 29 31 10 9 63 1 0 0
38 15 36 33 14 12 71 0 1 0
39 17 29 31 16 10 76 0 0 1
40 13 35 33 16 10 69 0 0 0
41 15 37 32 16 10 74 1 0 0
42 16 34 33 14 12 75 0 1 0
43 16 38 32 20 15 54 0 0 1
44 12 35 33 14 10 52 0 0 0
45 15 38 28 14 10 69 1 0 0
46 11 37 35 11 12 68 0 1 0
47 15 38 39 14 13 65 0 0 1
48 15 33 34 15 11 75 0 0 0
49 17 36 38 16 11 74 1 0 0
50 13 38 32 14 12 75 0 1 0
51 16 32 38 16 14 72 0 0 1
52 14 32 30 14 10 67 0 0 0
53 11 32 33 12 12 63 1 0 0
54 12 34 38 16 13 62 0 1 0
55 12 32 32 9 5 63 0 0 1
56 15 37 35 14 6 76 0 0 0
57 16 39 34 16 12 74 1 0 0
58 15 29 34 16 12 67 0 1 0
59 12 37 36 15 11 73 0 0 1
60 12 35 34 16 10 70 0 0 0
61 8 30 28 12 7 53 1 0 0
62 13 38 34 16 12 77 0 1 0
63 11 34 35 16 14 80 0 0 1
64 14 31 35 14 11 52 0 0 0
65 15 34 31 16 12 54 1 0 0
66 10 35 37 17 13 80 0 1 0
67 11 36 35 18 14 66 0 0 1
68 12 30 27 18 11 73 0 0 0
69 15 39 40 12 12 63 1 0 0
70 15 35 37 16 12 69 0 1 0
71 14 38 36 10 8 67 0 0 1
72 16 31 38 14 11 54 0 0 0
73 15 34 39 18 14 81 1 0 0
74 15 38 41 18 14 69 0 1 0
75 13 34 27 16 12 84 0 0 1
76 12 39 30 17 9 80 0 0 0
77 17 37 37 16 13 70 1 0 0
78 13 34 31 16 11 69 0 1 0
79 15 28 31 13 12 77 0 0 1
80 13 37 27 16 12 54 0 0 0
81 15 33 36 16 12 79 1 0 0
82 15 35 37 16 12 71 0 1 0
83 16 37 33 15 12 73 0 0 1
84 15 32 34 15 11 72 0 0 0
85 14 33 31 16 10 77 1 0 0
86 15 38 39 14 9 75 0 1 0
87 14 33 34 16 12 69 0 0 1
88 13 29 32 16 12 54 0 0 0
89 7 33 33 15 12 70 1 0 0
90 17 31 36 12 9 73 0 1 0
91 13 36 32 17 15 54 0 0 1
92 15 35 41 16 12 77 0 0 0
93 14 32 28 15 12 82 1 0 0
94 13 29 30 13 12 80 0 1 0
95 16 39 36 16 10 80 0 0 1
96 12 37 35 16 13 69 0 0 0
97 14 35 31 16 9 78 1 0 0
98 17 37 34 16 12 81 0 1 0
99 15 32 36 14 10 76 0 0 1
100 17 38 36 16 14 76 0 0 0
101 12 37 35 16 11 73 1 0 0
102 16 36 37 20 15 85 0 1 0
103 11 32 28 15 11 66 0 0 1
104 15 33 39 16 11 79 0 0 0
105 9 40 32 13 12 68 1 0 0
106 16 38 35 17 12 76 0 1 0
107 15 41 39 16 12 71 0 0 1
108 10 36 35 16 11 54 0 0 0
109 10 43 42 12 7 46 1 0 0
110 15 30 34 16 12 85 0 1 0
111 11 31 33 16 14 74 0 0 1
112 13 32 41 17 11 88 0 0 0
113 14 32 33 13 11 38 1 0 0
114 18 37 34 12 10 76 0 1 0
115 16 37 32 18 13 86 0 0 1
116 14 33 40 14 13 54 0 0 0
117 14 34 40 14 8 67 1 0 0
118 14 33 35 13 11 69 0 1 0
119 14 38 36 16 12 90 0 0 1
120 12 33 37 13 11 54 0 0 0
121 14 31 27 16 13 76 1 0 0
122 15 38 39 13 12 89 0 1 0
123 15 37 38 16 14 76 0 0 1
124 15 36 31 15 13 73 0 0 0
125 13 31 33 16 15 79 1 0 0
126 17 39 32 15 10 90 0 1 0
127 17 44 39 17 11 74 0 0 1
128 19 33 36 15 9 81 0 0 0
129 15 35 33 12 11 72 1 0 0
130 13 32 33 16 10 71 0 1 0
131 9 28 32 10 11 66 0 0 1
132 15 40 37 16 8 77 0 0 0
133 15 27 30 12 11 65 1 0 0
134 15 37 38 14 12 74 0 1 0
135 16 32 29 15 12 85 0 0 1
136 11 28 22 13 9 54 0 0 0
137 14 34 35 15 11 63 1 0 0
138 11 30 35 11 10 54 0 1 0
139 15 35 34 12 8 64 0 0 1
140 13 31 35 11 9 69 0 0 0
141 15 32 34 16 8 54 1 0 0
142 16 30 37 15 9 84 0 1 0
143 14 30 35 17 15 86 0 0 1
144 15 31 23 16 11 77 0 0 0
145 16 40 31 10 8 89 1 0 0
146 16 32 27 18 13 76 0 1 0
147 11 36 36 13 12 60 0 0 1
148 12 32 31 16 12 75 0 0 0
149 9 35 32 13 9 73 1 0 0
150 16 38 39 10 7 85 0 1 0
151 13 42 37 15 13 79 0 0 1
152 16 34 38 16 9 71 0 0 0
153 12 35 39 16 6 72 1 0 0
154 9 38 34 14 8 69 0 1 0
155 13 33 31 10 8 78 0 0 1
156 13 36 32 17 15 54 0 0 0
157 14 32 37 13 6 69 1 0 0
158 19 33 36 15 9 81 0 1 0
159 13 34 32 16 11 84 0 0 1
160 12 32 38 12 8 84 0 0 0
161 13 34 36 13 8 69 1 0 0
162 10 27 26 13 10 66 0 1 0
163 14 31 26 12 8 81 0 0 1
164 16 38 33 17 14 82 0 0 0
165 10 34 39 15 10 72 1 0 0
166 11 24 30 10 8 54 0 1 0
167 14 30 33 14 11 78 0 0 1
168 12 26 25 11 12 74 0 0 0
169 9 34 38 13 12 82 1 0 0
170 9 27 37 16 12 73 0 1 0
171 11 37 31 12 5 55 0 0 1
172 16 36 37 16 12 72 0 0 0
173 9 41 35 12 10 78 1 0 0
174 13 29 25 9 7 59 0 1 0
175 16 36 28 12 12 72 0 0 1
176 13 32 35 15 11 78 0 0 0
177 9 37 33 12 8 68 1 0 0
178 12 30 30 12 9 69 0 1 0
179 16 31 31 14 10 67 0 0 1
180 11 38 37 12 9 74 0 0 0
181 14 36 36 16 12 54 1 0 0
182 13 35 30 11 6 67 0 1 0
183 15 31 36 19 15 70 0 0 1
184 14 38 32 15 12 80 0 0 0
185 16 22 28 8 12 89 1 0 0
186 13 32 36 16 12 76 0 1 0
187 14 36 34 17 11 74 0 0 1
188 15 39 31 12 7 87 0 0 0
189 13 28 28 11 7 54 1 0 0
190 11 32 36 11 5 61 0 1 0
191 11 32 36 14 12 38 0 0 1
192 14 38 40 16 12 75 0 0 0
193 15 32 33 12 3 69 1 0 0
194 11 35 37 16 11 62 0 1 0
195 15 32 32 13 10 72 0 0 1
196 12 37 38 15 12 70 0 0 0
197 14 34 31 16 9 79 1 0 0
198 14 33 37 16 12 87 0 1 0
199 8 33 33 14 9 62 0 0 1
200 13 26 32 16 12 77 0 0 0
201 9 30 30 16 12 69 1 0 0
202 15 24 30 14 10 69 0 1 0
203 17 34 31 11 9 75 0 0 1
204 13 34 32 12 12 54 0 0 0
205 15 33 34 15 8 72 1 0 0
206 15 34 36 15 11 74 0 1 0
207 14 35 37 16 11 85 0 0 1
208 16 35 36 16 12 52 0 0 0
209 13 36 33 11 10 70 1 0 0
210 16 34 33 15 10 84 0 1 0
211 9 34 33 12 12 64 0 0 1
212 16 41 44 12 12 84 0 0 0
213 11 32 39 15 11 87 1 0 0
214 10 30 32 15 8 79 0 1 0
215 11 35 35 16 12 67 0 0 1
216 15 28 25 14 10 65 0 0 0
217 17 33 35 17 11 85 1 0 0
218 14 39 34 14 10 83 0 1 0
219 8 36 35 13 8 61 0 0 1
220 15 36 39 15 12 82 0 0 0
221 11 35 33 13 12 76 1 0 0
222 16 38 36 14 10 58 0 1 0
223 10 33 32 15 12 72 0 0 1
224 15 31 32 12 9 72 0 0 0
225 9 34 36 13 9 38 1 0 0
226 16 32 36 8 6 78 0 1 0
227 19 31 32 14 10 54 0 0 1
228 12 33 34 14 9 63 0 0 0
229 8 34 33 11 9 66 1 0 0
230 11 34 35 12 9 70 0 1 0
231 14 34 30 13 6 71 0 0 1
232 9 33 38 10 10 67 0 0 0
233 15 32 34 16 6 58 1 0 0
234 13 41 33 18 14 72 0 1 0
235 16 34 32 13 10 72 0 0 1
236 11 36 31 11 10 70 0 0 0
237 12 37 30 4 6 76 1 0 0
238 13 36 27 13 12 50 0 1 0
239 10 29 31 16 12 72 0 0 1
240 11 37 30 10 7 72 0 0 0
241 12 27 32 12 8 88 1 0 0
242 8 35 35 12 11 53 0 1 0
243 12 28 28 10 3 58 0 0 1
244 12 35 33 13 6 66 0 0 0
245 15 37 31 15 10 82 1 0 0
246 11 29 35 12 8 69 0 1 0
247 13 32 35 14 9 68 0 0 1
248 14 36 32 10 9 44 0 0 0
249 10 19 21 12 8 56 1 0 0
250 12 21 20 12 9 53 0 1 0
251 15 31 34 11 7 70 0 0 1
252 13 33 32 10 7 78 0 0 0
253 13 36 34 12 6 71 1 0 0
254 13 33 32 16 9 72 0 1 0
255 12 37 33 12 10 68 0 0 1
256 12 34 33 14 11 67 0 0 0
257 9 35 37 16 12 75 1 0 0
258 9 31 32 14 8 62 0 1 0
259 15 37 34 13 11 67 0 0 1
260 10 35 30 4 3 83 0 0 0
261 14 27 30 15 11 64 1 0 0
262 15 34 38 11 12 68 0 1 0
263 7 40 36 11 7 62 0 0 1
264 14 29 32 14 9 72 0 0 0
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Connected Separate Learning Software Sport1
5.089597 0.038594 0.007826 0.198368 -0.001627 0.060541
Q1 Q2 Q3
-0.557171 -0.154235 -0.217600
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.2582 -1.5315 0.3181 1.6211 6.6510
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.089597 1.793403 2.838 0.00491 **
Connected 0.038594 0.043582 0.886 0.37670
Separate 0.007826 0.044932 0.174 0.86186
Learning 0.198368 0.077058 2.574 0.01061 *
Software -0.001627 0.080710 -0.020 0.98393
Sport1 0.060541 0.014314 4.230 3.27e-05 ***
Q1 -0.557171 0.411800 -1.353 0.17725
Q2 -0.154235 0.413441 -0.373 0.70942
Q3 -0.217600 0.413982 -0.526 0.59960
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.358 on 255 degrees of freedom
Multiple R-squared: 0.1368, Adjusted R-squared: 0.1097
F-statistic: 5.052 on 8 and 255 DF, p-value: 7.691e-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.78897659 0.42204682 0.21102341
[2,] 0.87277956 0.25444088 0.12722044
[3,] 0.79772981 0.40454037 0.20227019
[4,] 0.80544727 0.38910547 0.19455273
[5,] 0.73666920 0.52666161 0.26333080
[6,] 0.67244678 0.65510645 0.32755322
[7,] 0.63960066 0.72079869 0.36039934
[8,] 0.55080008 0.89839985 0.44919992
[9,] 0.51166911 0.97666179 0.48833089
[10,] 0.80081201 0.39837598 0.19918799
[11,] 0.89341186 0.21317627 0.10658814
[12,] 0.85427421 0.29145157 0.14572579
[13,] 0.84537282 0.30925437 0.15462718
[14,] 0.80289478 0.39421043 0.19710522
[15,] 0.97905895 0.04188210 0.02094105
[16,] 0.96997064 0.06005872 0.03002936
[17,] 0.95825058 0.08349883 0.04174942
[18,] 0.94267661 0.11464678 0.05732339
[19,] 0.95201030 0.09597941 0.04798970
[20,] 0.93644440 0.12711119 0.06355560
[21,] 0.91797614 0.16404772 0.08202386
[22,] 0.91054779 0.17890443 0.08945221
[23,] 0.88538334 0.22923332 0.11461666
[24,] 0.86615550 0.26768900 0.13384450
[25,] 0.84154342 0.31691316 0.15845658
[26,] 0.89649503 0.20700993 0.10350497
[27,] 0.87549644 0.24900712 0.12450356
[28,] 0.87435331 0.25129337 0.12564669
[29,] 0.86748642 0.26502717 0.13251358
[30,] 0.83901404 0.32197193 0.16098596
[31,] 0.82461026 0.35077947 0.17538974
[32,] 0.81216928 0.37566145 0.18783072
[33,] 0.78991338 0.42017324 0.21008662
[34,] 0.75773204 0.48453593 0.24226796
[35,] 0.75913498 0.48173004 0.24086502
[36,] 0.72509539 0.54980923 0.27490461
[37,] 0.68408881 0.63182239 0.31591119
[38,] 0.68210878 0.63578243 0.31789122
[39,] 0.64924154 0.70151691 0.35075846
[40,] 0.61974492 0.76051016 0.38025508
[41,] 0.57509735 0.84980530 0.42490265
[42,] 0.55979657 0.88040687 0.44020343
[43,] 0.52078740 0.95842520 0.47921260
[44,] 0.48975633 0.97951267 0.51024367
[45,] 0.45000809 0.90001618 0.54999191
[46,] 0.41765534 0.83531068 0.58234466
[47,] 0.39975223 0.79950447 0.60024777
[48,] 0.42267285 0.84534569 0.57732715
[49,] 0.44257559 0.88515118 0.55742441
[50,] 0.51638372 0.96723255 0.48361628
[51,] 0.49509912 0.99019824 0.50490088
[52,] 0.59148007 0.81703985 0.40851993
[53,] 0.56355156 0.87289687 0.43644844
[54,] 0.55468483 0.89063033 0.44531517
[55,] 0.67367990 0.65264020 0.32632010
[56,] 0.71119290 0.57761419 0.28880710
[57,] 0.72147717 0.55704566 0.27852283
[58,] 0.70461587 0.59076826 0.29538413
[59,] 0.67883511 0.64232978 0.32116489
[60,] 0.64538957 0.70922086 0.35461043
[61,] 0.66916514 0.66166973 0.33083486
[62,] 0.63473723 0.73052554 0.36526277
[63,] 0.59804767 0.80390466 0.40195233
[64,] 0.57561748 0.84876504 0.42438252
[65,] 0.60878882 0.78242237 0.39121118
[66,] 0.62310127 0.75379746 0.37689873
[67,] 0.58632901 0.82734199 0.41367099
[68,] 0.56208391 0.87583217 0.43791609
[69,] 0.52245054 0.95509893 0.47754946
[70,] 0.48826082 0.97652165 0.51173918
[71,] 0.45567639 0.91135278 0.54432361
[72,] 0.44080536 0.88161072 0.55919464
[73,] 0.40754801 0.81509602 0.59245199
[74,] 0.37187399 0.74374799 0.62812601
[75,] 0.33867554 0.67735108 0.66132446
[76,] 0.30443623 0.60887246 0.69556377
[77,] 0.27145472 0.54290944 0.72854528
[78,] 0.53296747 0.93406505 0.46703253
[79,] 0.57931391 0.84137217 0.42068609
[80,] 0.54192965 0.91614069 0.45807035
[81,] 0.50808470 0.98383059 0.49191530
[82,] 0.47019453 0.94038906 0.52980547
[83,] 0.43423481 0.86846961 0.56576519
[84,] 0.40397697 0.80795395 0.59602303
[85,] 0.40070217 0.80140434 0.59929783
[86,] 0.36567686 0.73135371 0.63432314
[87,] 0.36783103 0.73566206 0.63216897
[88,] 0.33867367 0.67734734 0.66132633
[89,] 0.33831557 0.67663114 0.66168443
[90,] 0.33503406 0.67006813 0.66496594
[91,] 0.30384759 0.60769519 0.69615241
[92,] 0.29880592 0.59761185 0.70119408
[93,] 0.26974059 0.53948117 0.73025941
[94,] 0.34447413 0.68894827 0.65552587
[95,] 0.32313643 0.64627285 0.67686357
[96,] 0.29550034 0.59100067 0.70449966
[97,] 0.32609828 0.65219657 0.67390172
[98,] 0.33168829 0.66337657 0.66831171
[99,] 0.29971930 0.59943861 0.70028070
[100,] 0.32102352 0.64204704 0.67897648
[101,] 0.33545163 0.67090325 0.66454837
[102,] 0.35943790 0.71887580 0.64056210
[103,] 0.43492364 0.86984727 0.56507636
[104,] 0.40348206 0.80696413 0.59651794
[105,] 0.38087010 0.76174019 0.61912990
[106,] 0.35491288 0.70982577 0.64508712
[107,] 0.32581513 0.65163025 0.67418487
[108,] 0.30511641 0.61023283 0.69488359
[109,] 0.27861754 0.55723508 0.72138246
[110,] 0.25000898 0.50001796 0.74999102
[111,] 0.22512050 0.45024100 0.77487950
[112,] 0.20250154 0.40500309 0.79749846
[113,] 0.18252796 0.36505592 0.81747204
[114,] 0.16262428 0.32524856 0.83737572
[115,] 0.15411083 0.30822166 0.84588917
[116,] 0.15521937 0.31043874 0.84478063
[117,] 0.21279211 0.42558423 0.78720789
[118,] 0.20829435 0.41658871 0.79170565
[119,] 0.18659516 0.37319032 0.81340484
[120,] 0.21598388 0.43196776 0.78401612
[121,] 0.19329248 0.38658495 0.80670752
[122,] 0.20621990 0.41243980 0.79378010
[123,] 0.19076702 0.38153404 0.80923298
[124,] 0.17775905 0.35551810 0.82224095
[125,] 0.16216064 0.32432129 0.83783936
[126,] 0.14917086 0.29834171 0.85082914
[127,] 0.13279573 0.26559147 0.86720427
[128,] 0.12934426 0.25868851 0.87065574
[129,] 0.11230727 0.22461454 0.88769273
[130,] 0.11822190 0.23644381 0.88177810
[131,] 0.10889802 0.21779603 0.89110198
[132,] 0.09427006 0.18854011 0.90572994
[133,] 0.08216671 0.16433343 0.91783329
[134,] 0.08193495 0.16386990 0.91806505
[135,] 0.07739736 0.15479471 0.92260264
[136,] 0.07149891 0.14299781 0.92850109
[137,] 0.06975733 0.13951466 0.93024267
[138,] 0.10091006 0.20182012 0.89908994
[139,] 0.10264097 0.20528194 0.89735903
[140,] 0.09257318 0.18514635 0.90742682
[141,] 0.08795995 0.17591990 0.91204005
[142,] 0.08503295 0.17006590 0.91496705
[143,] 0.12938748 0.25877497 0.87061252
[144,] 0.11166482 0.22332964 0.88833518
[145,] 0.09525070 0.19050140 0.90474930
[146,] 0.08736174 0.17472348 0.91263826
[147,] 0.15026451 0.30052901 0.84973549
[148,] 0.13890135 0.27780269 0.86109865
[149,] 0.13647472 0.27294945 0.86352528
[150,] 0.12127470 0.24254939 0.87872530
[151,] 0.13027900 0.26055799 0.86972100
[152,] 0.11208341 0.22416682 0.88791659
[153,] 0.09912413 0.19824826 0.90087587
[154,] 0.11188975 0.22377950 0.88811025
[155,] 0.09572909 0.19145818 0.90427091
[156,] 0.08114027 0.16228054 0.91885973
[157,] 0.07311589 0.14623179 0.92688411
[158,] 0.10655947 0.21311894 0.89344053
[159,] 0.15835397 0.31670795 0.84164603
[160,] 0.14238575 0.28477150 0.85761425
[161,] 0.13843388 0.27686776 0.86156612
[162,] 0.18298918 0.36597836 0.81701082
[163,] 0.16384611 0.32769222 0.83615389
[164,] 0.17164019 0.34328038 0.82835981
[165,] 0.15338965 0.30677930 0.84661035
[166,] 0.17866643 0.35733286 0.82133357
[167,] 0.15747650 0.31495300 0.84252350
[168,] 0.17019738 0.34039475 0.82980262
[169,] 0.17135545 0.34271089 0.82864455
[170,] 0.16300261 0.32600521 0.83699739
[171,] 0.14091761 0.28183522 0.85908239
[172,] 0.12619411 0.25238823 0.87380589
[173,] 0.10747317 0.21494635 0.89252683
[174,] 0.12562759 0.25125518 0.87437241
[175,] 0.10865037 0.21730074 0.89134963
[176,] 0.09193986 0.18387971 0.90806014
[177,] 0.07737618 0.15475236 0.92262382
[178,] 0.07026763 0.14053526 0.92973237
[179,] 0.06150291 0.12300583 0.93849709
[180,] 0.05066427 0.10132853 0.94933573
[181,] 0.04137654 0.08275309 0.95862346
[182,] 0.04191055 0.08382110 0.95808945
[183,] 0.03953599 0.07907198 0.96046401
[184,] 0.03743139 0.07486279 0.96256861
[185,] 0.03313541 0.06627082 0.96686459
[186,] 0.02673632 0.05347263 0.97326368
[187,] 0.02126072 0.04252144 0.97873928
[188,] 0.03849541 0.07699082 0.96150459
[189,] 0.03193758 0.06387515 0.96806242
[190,] 0.04400384 0.08800767 0.95599616
[191,] 0.04057400 0.08114799 0.95942600
[192,] 0.06430287 0.12860575 0.93569713
[193,] 0.05277930 0.10555860 0.94722070
[194,] 0.04901082 0.09802163 0.95098918
[195,] 0.04251267 0.08502533 0.95748733
[196,] 0.03403636 0.06807273 0.96596364
[197,] 0.03898336 0.07796672 0.96101664
[198,] 0.03250343 0.06500685 0.96749657
[199,] 0.03001110 0.06002220 0.96998890
[200,] 0.03546460 0.07092921 0.96453540
[201,] 0.03796165 0.07592329 0.96203835
[202,] 0.03624413 0.07248827 0.96375587
[203,] 0.05038330 0.10076660 0.94961670
[204,] 0.04732129 0.09464258 0.95267871
[205,] 0.04258958 0.08517917 0.95741042
[206,] 0.05239240 0.10478480 0.94760760
[207,] 0.04141302 0.08282605 0.95858698
[208,] 0.07529063 0.15058126 0.92470937
[209,] 0.06843745 0.13687490 0.93156255
[210,] 0.05673376 0.11346753 0.94326624
[211,] 0.07623281 0.15246563 0.92376719
[212,] 0.09758557 0.19517115 0.90241443
[213,] 0.09781939 0.19563877 0.90218061
[214,] 0.08644314 0.17288628 0.91355686
[215,] 0.15751963 0.31503926 0.84248037
[216,] 0.39414920 0.78829839 0.60585080
[217,] 0.34259732 0.68519464 0.65740268
[218,] 0.42583047 0.85166094 0.57416953
[219,] 0.37597522 0.75195043 0.62402478
[220,] 0.32843230 0.65686461 0.67156770
[221,] 0.34127275 0.68254550 0.65872725
[222,] 0.38900044 0.77800089 0.61099956
[223,] 0.33225783 0.66451566 0.66774217
[224,] 0.37350210 0.74700420 0.62649790
[225,] 0.34509044 0.69018089 0.65490956
[226,] 0.28564690 0.57129381 0.71435310
[227,] 0.24991267 0.49982534 0.75008733
[228,] 0.34095092 0.68190184 0.65904908
[229,] 0.29403960 0.58807919 0.70596040
[230,] 0.24381206 0.48762412 0.75618794
[231,] 0.28295015 0.56590031 0.71704985
[232,] 0.24729731 0.49459461 0.75270269
[233,] 0.19210812 0.38421623 0.80789188
[234,] 0.21953989 0.43907979 0.78046011
[235,] 0.18530230 0.37060460 0.81469770
[236,] 0.12893353 0.25786706 0.87106647
[237,] 0.19568593 0.39137185 0.80431407
[238,] 0.17077125 0.34154250 0.82922875
[239,] 0.12368341 0.24736682 0.87631659
[240,] 0.07614559 0.15229118 0.92385441
[241,] 0.03925520 0.07851041 0.96074480
> postscript(file="/var/fisher/rcomp/tmp/1i7uo1384982525.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/fisher/rcomp/tmp/2vofp1384982525.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/fisher/rcomp/tmp/3vflf1384982525.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/fisher/rcomp/tmp/4v31o1384982525.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/fisher/rcomp/tmp/5x9nb1384982525.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 = 264
Frequency = 1
1 2 3 4 5 6
1.819870786 3.128114976 -3.044049663 -1.566300338 2.508669346 4.202154142
7 8 9 10 11 12
0.422061559 -0.479581542 1.566588843 0.777248473 2.478438482 5.831329309
13 14 15 16 17 18
-3.483548486 2.836849642 2.949888848 0.949736193 0.327904475 1.025199701
19 20 21 22 23 24
-0.101932610 2.819735176 4.822583366 -2.645561984 0.308363676 -1.369105002
25 26 27 28 29 30
2.152686685 -5.962564830 1.705945259 0.217138560 1.059122732 -2.322972777
31 32 33 34 35 36
1.889678594 0.981295599 3.737669280 0.223040455 0.343337241 3.146409590
37 38 39 40 41 42
-2.677401841 1.360928034 3.007409436 -1.033620436 1.151483051 2.195951983
43 44 45 46 47 48
2.198800455 -0.607684976 1.843635980 -1.916590248 1.665021220 0.872490222
49 50 51 52 53 54
3.144746680 -0.950598522 2.085514915 0.623459686 -1.200693142 -1.451254685
55 56 57 58 59 60
0.051279457 0.839980528 2.061895829 1.468688810 -1.958856694 -2.101987765
61 62 63 64 65 66
-3.487096593 -1.484069871 -3.452523607 1.532666100 2.489167495 -4.770130861
67 68 69 70 71 72
-3.078873208 -2.430966487 2.474364007 1.092562833 1.352757089 3.388105217
73 74 75 76 77 78
0.398464788 0.551992287 -1.635331816 -3.030465777 3.359396731 -0.823512431
79 80 81 82 83 84
1.583821145 -0.152481299 0.975102953 0.971480625 2.066248777 1.092707716
85 86 87 88 89 90
0.132062693 0.989737515 0.256595352 0.117141035 -6.258180090 3.801194367
91 92 93 94 95 96
-0.128906143 0.422694525 0.093051969 -0.691935604 1.340172071 -2.121580862
97 98 99 100 101 102
-0.007293572 2.312359895 1.249232456 2.409837799 -1.809827724 0.296717991
103 104 105 106 107 108
-2.279488254 0.392826335 -4.002694242 1.370276662 0.787628560 -3.178123712
109 110 111 112 113 114
-1.674600385 0.340354756 -2.957841986 -2.327470214 3.112839316 4.405285206
115 116 117 118 119 120
0.693562409 1.298517995 1.021926626 0.778881889 -1.223391194 -0.482888577
121 122 123 124 125 126
0.305977451 0.345410794 0.650379587 0.904522150 -0.919349619 1.901068798
127 128 129 130 131 132
2.290227559 4.490337555 2.137027579 -0.884685521 -3.164574695 0.254521327
133 134 135 136 137 138
2.893047441 1.101579415 1.564031341 -1.175777884 1.109734209 -0.802109108
139 140 141 142 143 144
2.269078706 0.095318777 2.536370001 1.570905142 -0.858135051 0.716316507
145 146 147 148 149 150
2.322366652 1.467710006 -1.734864671 -2.262178471 -4.117309239 2.174546267
151 152 153 154 155 156
-1.519646862 1.843133617 -1.711537136 -4.609511532 -0.081093018 -0.346506199
157 158 159 160 161 162
1.196626211 4.644572132 -1.676089737 -2.074865782 0.130517664 -2.739120476
163 164 165 166 167 168
0.456866467 0.871701503 -3.468067422 -0.336298135 0.230444084 -0.931273193
169 170 171 172 173 174
-4.665661953 -4.840848124 -1.244641436 1.718110762 -4.475063386 1.403898107
175 176 177 178 179 180
2.799620226 -1.278365133 -3.702876759 -0.871089685 2.871827699 -2.691566816
181 182 183 184 185 186
1.372848006 0.250509568 0.667365514 -0.605906964 3.443784487 -1.207616123
187 188 189 190 191 192
-0.361887857 0.526508407 1.727919013 -1.319045407 -0.446951999 -0.564179590
193 194 195 196 197 198
2.421419068 -2.485276235 1.721070118 -2.008859091 -0.029240493 -0.919988674
199 200 201 202 203 204
-4.919934392 -1.159521810 -4.256746110 1.965365513 3.865194562 0.717643507
205 206 207 208 209 210
1.606404292 1.033019270 -0.814356148 2.975353249 0.416257154 1.449460109
211 212 213 214 215 216
-3.677993702 1.537336411 -3.297368822 -4.088885009 -2.707337030 1.938049748
217 218 219 220 221 222
2.419687412 -0.492427578 -4.794086735 0.295415618 -2.301878387 3.044041754
223 224 225 226 227 228
-3.711007164 1.738805794 -1.991081316 3.248487660 6.651035826 -1.205901777
229 230 231 232 233 234
-4.266016861 -2.125138644 0.713568122 -3.684270912 2.290951992 -1.682803773
235 236 237 238 239 240
2.643881753 -2.125261543 0.419966260 0.877616914 -3.747172556 -2.083623751
241 242 243 244 245 246
-1.519930790 -4.131280465 0.338044667 -1.263399271 0.873348790 -1.873253424
247 248 249 250 251 252
-0.260239283 2.637722486 -1.187773528 0.523177870 2.256950362 -0.308146095
253 254 255 256 257 258
0.143014294 -0.977621378 -1.039194257 -1.475580558 -4.867747221 -3.899912078
259 260 261 262 263 264
1.816779072 -2.488684639 1.358483507 2.175713624 -5.621720898 0.419257467
> postscript(file="/var/fisher/rcomp/tmp/6bobt1384982525.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 = 264
Frequency = 1
lag(myerror, k = 1) myerror
0 1.819870786 NA
1 3.128114976 1.819870786
2 -3.044049663 3.128114976
3 -1.566300338 -3.044049663
4 2.508669346 -1.566300338
5 4.202154142 2.508669346
6 0.422061559 4.202154142
7 -0.479581542 0.422061559
8 1.566588843 -0.479581542
9 0.777248473 1.566588843
10 2.478438482 0.777248473
11 5.831329309 2.478438482
12 -3.483548486 5.831329309
13 2.836849642 -3.483548486
14 2.949888848 2.836849642
15 0.949736193 2.949888848
16 0.327904475 0.949736193
17 1.025199701 0.327904475
18 -0.101932610 1.025199701
19 2.819735176 -0.101932610
20 4.822583366 2.819735176
21 -2.645561984 4.822583366
22 0.308363676 -2.645561984
23 -1.369105002 0.308363676
24 2.152686685 -1.369105002
25 -5.962564830 2.152686685
26 1.705945259 -5.962564830
27 0.217138560 1.705945259
28 1.059122732 0.217138560
29 -2.322972777 1.059122732
30 1.889678594 -2.322972777
31 0.981295599 1.889678594
32 3.737669280 0.981295599
33 0.223040455 3.737669280
34 0.343337241 0.223040455
35 3.146409590 0.343337241
36 -2.677401841 3.146409590
37 1.360928034 -2.677401841
38 3.007409436 1.360928034
39 -1.033620436 3.007409436
40 1.151483051 -1.033620436
41 2.195951983 1.151483051
42 2.198800455 2.195951983
43 -0.607684976 2.198800455
44 1.843635980 -0.607684976
45 -1.916590248 1.843635980
46 1.665021220 -1.916590248
47 0.872490222 1.665021220
48 3.144746680 0.872490222
49 -0.950598522 3.144746680
50 2.085514915 -0.950598522
51 0.623459686 2.085514915
52 -1.200693142 0.623459686
53 -1.451254685 -1.200693142
54 0.051279457 -1.451254685
55 0.839980528 0.051279457
56 2.061895829 0.839980528
57 1.468688810 2.061895829
58 -1.958856694 1.468688810
59 -2.101987765 -1.958856694
60 -3.487096593 -2.101987765
61 -1.484069871 -3.487096593
62 -3.452523607 -1.484069871
63 1.532666100 -3.452523607
64 2.489167495 1.532666100
65 -4.770130861 2.489167495
66 -3.078873208 -4.770130861
67 -2.430966487 -3.078873208
68 2.474364007 -2.430966487
69 1.092562833 2.474364007
70 1.352757089 1.092562833
71 3.388105217 1.352757089
72 0.398464788 3.388105217
73 0.551992287 0.398464788
74 -1.635331816 0.551992287
75 -3.030465777 -1.635331816
76 3.359396731 -3.030465777
77 -0.823512431 3.359396731
78 1.583821145 -0.823512431
79 -0.152481299 1.583821145
80 0.975102953 -0.152481299
81 0.971480625 0.975102953
82 2.066248777 0.971480625
83 1.092707716 2.066248777
84 0.132062693 1.092707716
85 0.989737515 0.132062693
86 0.256595352 0.989737515
87 0.117141035 0.256595352
88 -6.258180090 0.117141035
89 3.801194367 -6.258180090
90 -0.128906143 3.801194367
91 0.422694525 -0.128906143
92 0.093051969 0.422694525
93 -0.691935604 0.093051969
94 1.340172071 -0.691935604
95 -2.121580862 1.340172071
96 -0.007293572 -2.121580862
97 2.312359895 -0.007293572
98 1.249232456 2.312359895
99 2.409837799 1.249232456
100 -1.809827724 2.409837799
101 0.296717991 -1.809827724
102 -2.279488254 0.296717991
103 0.392826335 -2.279488254
104 -4.002694242 0.392826335
105 1.370276662 -4.002694242
106 0.787628560 1.370276662
107 -3.178123712 0.787628560
108 -1.674600385 -3.178123712
109 0.340354756 -1.674600385
110 -2.957841986 0.340354756
111 -2.327470214 -2.957841986
112 3.112839316 -2.327470214
113 4.405285206 3.112839316
114 0.693562409 4.405285206
115 1.298517995 0.693562409
116 1.021926626 1.298517995
117 0.778881889 1.021926626
118 -1.223391194 0.778881889
119 -0.482888577 -1.223391194
120 0.305977451 -0.482888577
121 0.345410794 0.305977451
122 0.650379587 0.345410794
123 0.904522150 0.650379587
124 -0.919349619 0.904522150
125 1.901068798 -0.919349619
126 2.290227559 1.901068798
127 4.490337555 2.290227559
128 2.137027579 4.490337555
129 -0.884685521 2.137027579
130 -3.164574695 -0.884685521
131 0.254521327 -3.164574695
132 2.893047441 0.254521327
133 1.101579415 2.893047441
134 1.564031341 1.101579415
135 -1.175777884 1.564031341
136 1.109734209 -1.175777884
137 -0.802109108 1.109734209
138 2.269078706 -0.802109108
139 0.095318777 2.269078706
140 2.536370001 0.095318777
141 1.570905142 2.536370001
142 -0.858135051 1.570905142
143 0.716316507 -0.858135051
144 2.322366652 0.716316507
145 1.467710006 2.322366652
146 -1.734864671 1.467710006
147 -2.262178471 -1.734864671
148 -4.117309239 -2.262178471
149 2.174546267 -4.117309239
150 -1.519646862 2.174546267
151 1.843133617 -1.519646862
152 -1.711537136 1.843133617
153 -4.609511532 -1.711537136
154 -0.081093018 -4.609511532
155 -0.346506199 -0.081093018
156 1.196626211 -0.346506199
157 4.644572132 1.196626211
158 -1.676089737 4.644572132
159 -2.074865782 -1.676089737
160 0.130517664 -2.074865782
161 -2.739120476 0.130517664
162 0.456866467 -2.739120476
163 0.871701503 0.456866467
164 -3.468067422 0.871701503
165 -0.336298135 -3.468067422
166 0.230444084 -0.336298135
167 -0.931273193 0.230444084
168 -4.665661953 -0.931273193
169 -4.840848124 -4.665661953
170 -1.244641436 -4.840848124
171 1.718110762 -1.244641436
172 -4.475063386 1.718110762
173 1.403898107 -4.475063386
174 2.799620226 1.403898107
175 -1.278365133 2.799620226
176 -3.702876759 -1.278365133
177 -0.871089685 -3.702876759
178 2.871827699 -0.871089685
179 -2.691566816 2.871827699
180 1.372848006 -2.691566816
181 0.250509568 1.372848006
182 0.667365514 0.250509568
183 -0.605906964 0.667365514
184 3.443784487 -0.605906964
185 -1.207616123 3.443784487
186 -0.361887857 -1.207616123
187 0.526508407 -0.361887857
188 1.727919013 0.526508407
189 -1.319045407 1.727919013
190 -0.446951999 -1.319045407
191 -0.564179590 -0.446951999
192 2.421419068 -0.564179590
193 -2.485276235 2.421419068
194 1.721070118 -2.485276235
195 -2.008859091 1.721070118
196 -0.029240493 -2.008859091
197 -0.919988674 -0.029240493
198 -4.919934392 -0.919988674
199 -1.159521810 -4.919934392
200 -4.256746110 -1.159521810
201 1.965365513 -4.256746110
202 3.865194562 1.965365513
203 0.717643507 3.865194562
204 1.606404292 0.717643507
205 1.033019270 1.606404292
206 -0.814356148 1.033019270
207 2.975353249 -0.814356148
208 0.416257154 2.975353249
209 1.449460109 0.416257154
210 -3.677993702 1.449460109
211 1.537336411 -3.677993702
212 -3.297368822 1.537336411
213 -4.088885009 -3.297368822
214 -2.707337030 -4.088885009
215 1.938049748 -2.707337030
216 2.419687412 1.938049748
217 -0.492427578 2.419687412
218 -4.794086735 -0.492427578
219 0.295415618 -4.794086735
220 -2.301878387 0.295415618
221 3.044041754 -2.301878387
222 -3.711007164 3.044041754
223 1.738805794 -3.711007164
224 -1.991081316 1.738805794
225 3.248487660 -1.991081316
226 6.651035826 3.248487660
227 -1.205901777 6.651035826
228 -4.266016861 -1.205901777
229 -2.125138644 -4.266016861
230 0.713568122 -2.125138644
231 -3.684270912 0.713568122
232 2.290951992 -3.684270912
233 -1.682803773 2.290951992
234 2.643881753 -1.682803773
235 -2.125261543 2.643881753
236 0.419966260 -2.125261543
237 0.877616914 0.419966260
238 -3.747172556 0.877616914
239 -2.083623751 -3.747172556
240 -1.519930790 -2.083623751
241 -4.131280465 -1.519930790
242 0.338044667 -4.131280465
243 -1.263399271 0.338044667
244 0.873348790 -1.263399271
245 -1.873253424 0.873348790
246 -0.260239283 -1.873253424
247 2.637722486 -0.260239283
248 -1.187773528 2.637722486
249 0.523177870 -1.187773528
250 2.256950362 0.523177870
251 -0.308146095 2.256950362
252 0.143014294 -0.308146095
253 -0.977621378 0.143014294
254 -1.039194257 -0.977621378
255 -1.475580558 -1.039194257
256 -4.867747221 -1.475580558
257 -3.899912078 -4.867747221
258 1.816779072 -3.899912078
259 -2.488684639 1.816779072
260 1.358483507 -2.488684639
261 2.175713624 1.358483507
262 -5.621720898 2.175713624
263 0.419257467 -5.621720898
264 NA 0.419257467
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 3.128114976 1.819870786
[2,] -3.044049663 3.128114976
[3,] -1.566300338 -3.044049663
[4,] 2.508669346 -1.566300338
[5,] 4.202154142 2.508669346
[6,] 0.422061559 4.202154142
[7,] -0.479581542 0.422061559
[8,] 1.566588843 -0.479581542
[9,] 0.777248473 1.566588843
[10,] 2.478438482 0.777248473
[11,] 5.831329309 2.478438482
[12,] -3.483548486 5.831329309
[13,] 2.836849642 -3.483548486
[14,] 2.949888848 2.836849642
[15,] 0.949736193 2.949888848
[16,] 0.327904475 0.949736193
[17,] 1.025199701 0.327904475
[18,] -0.101932610 1.025199701
[19,] 2.819735176 -0.101932610
[20,] 4.822583366 2.819735176
[21,] -2.645561984 4.822583366
[22,] 0.308363676 -2.645561984
[23,] -1.369105002 0.308363676
[24,] 2.152686685 -1.369105002
[25,] -5.962564830 2.152686685
[26,] 1.705945259 -5.962564830
[27,] 0.217138560 1.705945259
[28,] 1.059122732 0.217138560
[29,] -2.322972777 1.059122732
[30,] 1.889678594 -2.322972777
[31,] 0.981295599 1.889678594
[32,] 3.737669280 0.981295599
[33,] 0.223040455 3.737669280
[34,] 0.343337241 0.223040455
[35,] 3.146409590 0.343337241
[36,] -2.677401841 3.146409590
[37,] 1.360928034 -2.677401841
[38,] 3.007409436 1.360928034
[39,] -1.033620436 3.007409436
[40,] 1.151483051 -1.033620436
[41,] 2.195951983 1.151483051
[42,] 2.198800455 2.195951983
[43,] -0.607684976 2.198800455
[44,] 1.843635980 -0.607684976
[45,] -1.916590248 1.843635980
[46,] 1.665021220 -1.916590248
[47,] 0.872490222 1.665021220
[48,] 3.144746680 0.872490222
[49,] -0.950598522 3.144746680
[50,] 2.085514915 -0.950598522
[51,] 0.623459686 2.085514915
[52,] -1.200693142 0.623459686
[53,] -1.451254685 -1.200693142
[54,] 0.051279457 -1.451254685
[55,] 0.839980528 0.051279457
[56,] 2.061895829 0.839980528
[57,] 1.468688810 2.061895829
[58,] -1.958856694 1.468688810
[59,] -2.101987765 -1.958856694
[60,] -3.487096593 -2.101987765
[61,] -1.484069871 -3.487096593
[62,] -3.452523607 -1.484069871
[63,] 1.532666100 -3.452523607
[64,] 2.489167495 1.532666100
[65,] -4.770130861 2.489167495
[66,] -3.078873208 -4.770130861
[67,] -2.430966487 -3.078873208
[68,] 2.474364007 -2.430966487
[69,] 1.092562833 2.474364007
[70,] 1.352757089 1.092562833
[71,] 3.388105217 1.352757089
[72,] 0.398464788 3.388105217
[73,] 0.551992287 0.398464788
[74,] -1.635331816 0.551992287
[75,] -3.030465777 -1.635331816
[76,] 3.359396731 -3.030465777
[77,] -0.823512431 3.359396731
[78,] 1.583821145 -0.823512431
[79,] -0.152481299 1.583821145
[80,] 0.975102953 -0.152481299
[81,] 0.971480625 0.975102953
[82,] 2.066248777 0.971480625
[83,] 1.092707716 2.066248777
[84,] 0.132062693 1.092707716
[85,] 0.989737515 0.132062693
[86,] 0.256595352 0.989737515
[87,] 0.117141035 0.256595352
[88,] -6.258180090 0.117141035
[89,] 3.801194367 -6.258180090
[90,] -0.128906143 3.801194367
[91,] 0.422694525 -0.128906143
[92,] 0.093051969 0.422694525
[93,] -0.691935604 0.093051969
[94,] 1.340172071 -0.691935604
[95,] -2.121580862 1.340172071
[96,] -0.007293572 -2.121580862
[97,] 2.312359895 -0.007293572
[98,] 1.249232456 2.312359895
[99,] 2.409837799 1.249232456
[100,] -1.809827724 2.409837799
[101,] 0.296717991 -1.809827724
[102,] -2.279488254 0.296717991
[103,] 0.392826335 -2.279488254
[104,] -4.002694242 0.392826335
[105,] 1.370276662 -4.002694242
[106,] 0.787628560 1.370276662
[107,] -3.178123712 0.787628560
[108,] -1.674600385 -3.178123712
[109,] 0.340354756 -1.674600385
[110,] -2.957841986 0.340354756
[111,] -2.327470214 -2.957841986
[112,] 3.112839316 -2.327470214
[113,] 4.405285206 3.112839316
[114,] 0.693562409 4.405285206
[115,] 1.298517995 0.693562409
[116,] 1.021926626 1.298517995
[117,] 0.778881889 1.021926626
[118,] -1.223391194 0.778881889
[119,] -0.482888577 -1.223391194
[120,] 0.305977451 -0.482888577
[121,] 0.345410794 0.305977451
[122,] 0.650379587 0.345410794
[123,] 0.904522150 0.650379587
[124,] -0.919349619 0.904522150
[125,] 1.901068798 -0.919349619
[126,] 2.290227559 1.901068798
[127,] 4.490337555 2.290227559
[128,] 2.137027579 4.490337555
[129,] -0.884685521 2.137027579
[130,] -3.164574695 -0.884685521
[131,] 0.254521327 -3.164574695
[132,] 2.893047441 0.254521327
[133,] 1.101579415 2.893047441
[134,] 1.564031341 1.101579415
[135,] -1.175777884 1.564031341
[136,] 1.109734209 -1.175777884
[137,] -0.802109108 1.109734209
[138,] 2.269078706 -0.802109108
[139,] 0.095318777 2.269078706
[140,] 2.536370001 0.095318777
[141,] 1.570905142 2.536370001
[142,] -0.858135051 1.570905142
[143,] 0.716316507 -0.858135051
[144,] 2.322366652 0.716316507
[145,] 1.467710006 2.322366652
[146,] -1.734864671 1.467710006
[147,] -2.262178471 -1.734864671
[148,] -4.117309239 -2.262178471
[149,] 2.174546267 -4.117309239
[150,] -1.519646862 2.174546267
[151,] 1.843133617 -1.519646862
[152,] -1.711537136 1.843133617
[153,] -4.609511532 -1.711537136
[154,] -0.081093018 -4.609511532
[155,] -0.346506199 -0.081093018
[156,] 1.196626211 -0.346506199
[157,] 4.644572132 1.196626211
[158,] -1.676089737 4.644572132
[159,] -2.074865782 -1.676089737
[160,] 0.130517664 -2.074865782
[161,] -2.739120476 0.130517664
[162,] 0.456866467 -2.739120476
[163,] 0.871701503 0.456866467
[164,] -3.468067422 0.871701503
[165,] -0.336298135 -3.468067422
[166,] 0.230444084 -0.336298135
[167,] -0.931273193 0.230444084
[168,] -4.665661953 -0.931273193
[169,] -4.840848124 -4.665661953
[170,] -1.244641436 -4.840848124
[171,] 1.718110762 -1.244641436
[172,] -4.475063386 1.718110762
[173,] 1.403898107 -4.475063386
[174,] 2.799620226 1.403898107
[175,] -1.278365133 2.799620226
[176,] -3.702876759 -1.278365133
[177,] -0.871089685 -3.702876759
[178,] 2.871827699 -0.871089685
[179,] -2.691566816 2.871827699
[180,] 1.372848006 -2.691566816
[181,] 0.250509568 1.372848006
[182,] 0.667365514 0.250509568
[183,] -0.605906964 0.667365514
[184,] 3.443784487 -0.605906964
[185,] -1.207616123 3.443784487
[186,] -0.361887857 -1.207616123
[187,] 0.526508407 -0.361887857
[188,] 1.727919013 0.526508407
[189,] -1.319045407 1.727919013
[190,] -0.446951999 -1.319045407
[191,] -0.564179590 -0.446951999
[192,] 2.421419068 -0.564179590
[193,] -2.485276235 2.421419068
[194,] 1.721070118 -2.485276235
[195,] -2.008859091 1.721070118
[196,] -0.029240493 -2.008859091
[197,] -0.919988674 -0.029240493
[198,] -4.919934392 -0.919988674
[199,] -1.159521810 -4.919934392
[200,] -4.256746110 -1.159521810
[201,] 1.965365513 -4.256746110
[202,] 3.865194562 1.965365513
[203,] 0.717643507 3.865194562
[204,] 1.606404292 0.717643507
[205,] 1.033019270 1.606404292
[206,] -0.814356148 1.033019270
[207,] 2.975353249 -0.814356148
[208,] 0.416257154 2.975353249
[209,] 1.449460109 0.416257154
[210,] -3.677993702 1.449460109
[211,] 1.537336411 -3.677993702
[212,] -3.297368822 1.537336411
[213,] -4.088885009 -3.297368822
[214,] -2.707337030 -4.088885009
[215,] 1.938049748 -2.707337030
[216,] 2.419687412 1.938049748
[217,] -0.492427578 2.419687412
[218,] -4.794086735 -0.492427578
[219,] 0.295415618 -4.794086735
[220,] -2.301878387 0.295415618
[221,] 3.044041754 -2.301878387
[222,] -3.711007164 3.044041754
[223,] 1.738805794 -3.711007164
[224,] -1.991081316 1.738805794
[225,] 3.248487660 -1.991081316
[226,] 6.651035826 3.248487660
[227,] -1.205901777 6.651035826
[228,] -4.266016861 -1.205901777
[229,] -2.125138644 -4.266016861
[230,] 0.713568122 -2.125138644
[231,] -3.684270912 0.713568122
[232,] 2.290951992 -3.684270912
[233,] -1.682803773 2.290951992
[234,] 2.643881753 -1.682803773
[235,] -2.125261543 2.643881753
[236,] 0.419966260 -2.125261543
[237,] 0.877616914 0.419966260
[238,] -3.747172556 0.877616914
[239,] -2.083623751 -3.747172556
[240,] -1.519930790 -2.083623751
[241,] -4.131280465 -1.519930790
[242,] 0.338044667 -4.131280465
[243,] -1.263399271 0.338044667
[244,] 0.873348790 -1.263399271
[245,] -1.873253424 0.873348790
[246,] -0.260239283 -1.873253424
[247,] 2.637722486 -0.260239283
[248,] -1.187773528 2.637722486
[249,] 0.523177870 -1.187773528
[250,] 2.256950362 0.523177870
[251,] -0.308146095 2.256950362
[252,] 0.143014294 -0.308146095
[253,] -0.977621378 0.143014294
[254,] -1.039194257 -0.977621378
[255,] -1.475580558 -1.039194257
[256,] -4.867747221 -1.475580558
[257,] -3.899912078 -4.867747221
[258,] 1.816779072 -3.899912078
[259,] -2.488684639 1.816779072
[260,] 1.358483507 -2.488684639
[261,] 2.175713624 1.358483507
[262,] -5.621720898 2.175713624
[263,] 0.419257467 -5.621720898
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 3.128114976 1.819870786
2 -3.044049663 3.128114976
3 -1.566300338 -3.044049663
4 2.508669346 -1.566300338
5 4.202154142 2.508669346
6 0.422061559 4.202154142
7 -0.479581542 0.422061559
8 1.566588843 -0.479581542
9 0.777248473 1.566588843
10 2.478438482 0.777248473
11 5.831329309 2.478438482
12 -3.483548486 5.831329309
13 2.836849642 -3.483548486
14 2.949888848 2.836849642
15 0.949736193 2.949888848
16 0.327904475 0.949736193
17 1.025199701 0.327904475
18 -0.101932610 1.025199701
19 2.819735176 -0.101932610
20 4.822583366 2.819735176
21 -2.645561984 4.822583366
22 0.308363676 -2.645561984
23 -1.369105002 0.308363676
24 2.152686685 -1.369105002
25 -5.962564830 2.152686685
26 1.705945259 -5.962564830
27 0.217138560 1.705945259
28 1.059122732 0.217138560
29 -2.322972777 1.059122732
30 1.889678594 -2.322972777
31 0.981295599 1.889678594
32 3.737669280 0.981295599
33 0.223040455 3.737669280
34 0.343337241 0.223040455
35 3.146409590 0.343337241
36 -2.677401841 3.146409590
37 1.360928034 -2.677401841
38 3.007409436 1.360928034
39 -1.033620436 3.007409436
40 1.151483051 -1.033620436
41 2.195951983 1.151483051
42 2.198800455 2.195951983
43 -0.607684976 2.198800455
44 1.843635980 -0.607684976
45 -1.916590248 1.843635980
46 1.665021220 -1.916590248
47 0.872490222 1.665021220
48 3.144746680 0.872490222
49 -0.950598522 3.144746680
50 2.085514915 -0.950598522
51 0.623459686 2.085514915
52 -1.200693142 0.623459686
53 -1.451254685 -1.200693142
54 0.051279457 -1.451254685
55 0.839980528 0.051279457
56 2.061895829 0.839980528
57 1.468688810 2.061895829
58 -1.958856694 1.468688810
59 -2.101987765 -1.958856694
60 -3.487096593 -2.101987765
61 -1.484069871 -3.487096593
62 -3.452523607 -1.484069871
63 1.532666100 -3.452523607
64 2.489167495 1.532666100
65 -4.770130861 2.489167495
66 -3.078873208 -4.770130861
67 -2.430966487 -3.078873208
68 2.474364007 -2.430966487
69 1.092562833 2.474364007
70 1.352757089 1.092562833
71 3.388105217 1.352757089
72 0.398464788 3.388105217
73 0.551992287 0.398464788
74 -1.635331816 0.551992287
75 -3.030465777 -1.635331816
76 3.359396731 -3.030465777
77 -0.823512431 3.359396731
78 1.583821145 -0.823512431
79 -0.152481299 1.583821145
80 0.975102953 -0.152481299
81 0.971480625 0.975102953
82 2.066248777 0.971480625
83 1.092707716 2.066248777
84 0.132062693 1.092707716
85 0.989737515 0.132062693
86 0.256595352 0.989737515
87 0.117141035 0.256595352
88 -6.258180090 0.117141035
89 3.801194367 -6.258180090
90 -0.128906143 3.801194367
91 0.422694525 -0.128906143
92 0.093051969 0.422694525
93 -0.691935604 0.093051969
94 1.340172071 -0.691935604
95 -2.121580862 1.340172071
96 -0.007293572 -2.121580862
97 2.312359895 -0.007293572
98 1.249232456 2.312359895
99 2.409837799 1.249232456
100 -1.809827724 2.409837799
101 0.296717991 -1.809827724
102 -2.279488254 0.296717991
103 0.392826335 -2.279488254
104 -4.002694242 0.392826335
105 1.370276662 -4.002694242
106 0.787628560 1.370276662
107 -3.178123712 0.787628560
108 -1.674600385 -3.178123712
109 0.340354756 -1.674600385
110 -2.957841986 0.340354756
111 -2.327470214 -2.957841986
112 3.112839316 -2.327470214
113 4.405285206 3.112839316
114 0.693562409 4.405285206
115 1.298517995 0.693562409
116 1.021926626 1.298517995
117 0.778881889 1.021926626
118 -1.223391194 0.778881889
119 -0.482888577 -1.223391194
120 0.305977451 -0.482888577
121 0.345410794 0.305977451
122 0.650379587 0.345410794
123 0.904522150 0.650379587
124 -0.919349619 0.904522150
125 1.901068798 -0.919349619
126 2.290227559 1.901068798
127 4.490337555 2.290227559
128 2.137027579 4.490337555
129 -0.884685521 2.137027579
130 -3.164574695 -0.884685521
131 0.254521327 -3.164574695
132 2.893047441 0.254521327
133 1.101579415 2.893047441
134 1.564031341 1.101579415
135 -1.175777884 1.564031341
136 1.109734209 -1.175777884
137 -0.802109108 1.109734209
138 2.269078706 -0.802109108
139 0.095318777 2.269078706
140 2.536370001 0.095318777
141 1.570905142 2.536370001
142 -0.858135051 1.570905142
143 0.716316507 -0.858135051
144 2.322366652 0.716316507
145 1.467710006 2.322366652
146 -1.734864671 1.467710006
147 -2.262178471 -1.734864671
148 -4.117309239 -2.262178471
149 2.174546267 -4.117309239
150 -1.519646862 2.174546267
151 1.843133617 -1.519646862
152 -1.711537136 1.843133617
153 -4.609511532 -1.711537136
154 -0.081093018 -4.609511532
155 -0.346506199 -0.081093018
156 1.196626211 -0.346506199
157 4.644572132 1.196626211
158 -1.676089737 4.644572132
159 -2.074865782 -1.676089737
160 0.130517664 -2.074865782
161 -2.739120476 0.130517664
162 0.456866467 -2.739120476
163 0.871701503 0.456866467
164 -3.468067422 0.871701503
165 -0.336298135 -3.468067422
166 0.230444084 -0.336298135
167 -0.931273193 0.230444084
168 -4.665661953 -0.931273193
169 -4.840848124 -4.665661953
170 -1.244641436 -4.840848124
171 1.718110762 -1.244641436
172 -4.475063386 1.718110762
173 1.403898107 -4.475063386
174 2.799620226 1.403898107
175 -1.278365133 2.799620226
176 -3.702876759 -1.278365133
177 -0.871089685 -3.702876759
178 2.871827699 -0.871089685
179 -2.691566816 2.871827699
180 1.372848006 -2.691566816
181 0.250509568 1.372848006
182 0.667365514 0.250509568
183 -0.605906964 0.667365514
184 3.443784487 -0.605906964
185 -1.207616123 3.443784487
186 -0.361887857 -1.207616123
187 0.526508407 -0.361887857
188 1.727919013 0.526508407
189 -1.319045407 1.727919013
190 -0.446951999 -1.319045407
191 -0.564179590 -0.446951999
192 2.421419068 -0.564179590
193 -2.485276235 2.421419068
194 1.721070118 -2.485276235
195 -2.008859091 1.721070118
196 -0.029240493 -2.008859091
197 -0.919988674 -0.029240493
198 -4.919934392 -0.919988674
199 -1.159521810 -4.919934392
200 -4.256746110 -1.159521810
201 1.965365513 -4.256746110
202 3.865194562 1.965365513
203 0.717643507 3.865194562
204 1.606404292 0.717643507
205 1.033019270 1.606404292
206 -0.814356148 1.033019270
207 2.975353249 -0.814356148
208 0.416257154 2.975353249
209 1.449460109 0.416257154
210 -3.677993702 1.449460109
211 1.537336411 -3.677993702
212 -3.297368822 1.537336411
213 -4.088885009 -3.297368822
214 -2.707337030 -4.088885009
215 1.938049748 -2.707337030
216 2.419687412 1.938049748
217 -0.492427578 2.419687412
218 -4.794086735 -0.492427578
219 0.295415618 -4.794086735
220 -2.301878387 0.295415618
221 3.044041754 -2.301878387
222 -3.711007164 3.044041754
223 1.738805794 -3.711007164
224 -1.991081316 1.738805794
225 3.248487660 -1.991081316
226 6.651035826 3.248487660
227 -1.205901777 6.651035826
228 -4.266016861 -1.205901777
229 -2.125138644 -4.266016861
230 0.713568122 -2.125138644
231 -3.684270912 0.713568122
232 2.290951992 -3.684270912
233 -1.682803773 2.290951992
234 2.643881753 -1.682803773
235 -2.125261543 2.643881753
236 0.419966260 -2.125261543
237 0.877616914 0.419966260
238 -3.747172556 0.877616914
239 -2.083623751 -3.747172556
240 -1.519930790 -2.083623751
241 -4.131280465 -1.519930790
242 0.338044667 -4.131280465
243 -1.263399271 0.338044667
244 0.873348790 -1.263399271
245 -1.873253424 0.873348790
246 -0.260239283 -1.873253424
247 2.637722486 -0.260239283
248 -1.187773528 2.637722486
249 0.523177870 -1.187773528
250 2.256950362 0.523177870
251 -0.308146095 2.256950362
252 0.143014294 -0.308146095
253 -0.977621378 0.143014294
254 -1.039194257 -0.977621378
255 -1.475580558 -1.039194257
256 -4.867747221 -1.475580558
257 -3.899912078 -4.867747221
258 1.816779072 -3.899912078
259 -2.488684639 1.816779072
260 1.358483507 -2.488684639
261 2.175713624 1.358483507
262 -5.621720898 2.175713624
263 0.419257467 -5.621720898
> 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/fisher/rcomp/tmp/7m1jr1384982525.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/fisher/rcomp/tmp/8933b1384982525.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/fisher/rcomp/tmp/9csdc1384982525.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/fisher/rcomp/tmp/10bqkj1384982525.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/fisher/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, signif(mysum$coefficients[i,1],6), 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/fisher/rcomp/tmp/11ieqw1384982525.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,signif(mysum$coefficients[i,1],6))
+ a<-table.element(a, signif(mysum$coefficients[i,2],6))
+ a<-table.element(a, signif(mysum$coefficients[i,3],4))
+ a<-table.element(a, signif(mysum$coefficients[i,4],6))
+ a<-table.element(a, signif(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/12cbfn1384982525.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, signif(sqrt(mysum$r.squared),6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, signif(mysum$adj.r.squared,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[1],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[2],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, signif(mysum$fstatistic[3],6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6))
> 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, signif(mysum$sigma,6))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, signif(sum(myerror*myerror),6))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/13zreo1384982526.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,signif(x[i],6))
+ a<-table.element(a,signif(x[i]-mysum$resid[i],6))
+ a<-table.element(a,signif(mysum$resid[i],6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/fisher/rcomp/tmp/1417oa1384982526.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,signif(gqarr[mypoint-kp3+1,1],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,2],6))
+ a<-table.element(a,signif(gqarr[mypoint-kp3+1,3],6))
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/fisher/rcomp/tmp/15zleo1384982526.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,signif(numsignificant1,6))
+ a<-table.element(a,signif(numsignificant1/numgqtests,6))
+ 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,signif(numsignificant5,6))
+ a<-table.element(a,signif(numsignificant5/numgqtests,6))
+ 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,signif(numsignificant10,6))
+ a<-table.element(a,signif(numsignificant10/numgqtests,6))
+ 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/fisher/rcomp/tmp/16z5kx1384982526.tab")
+ }
>
> try(system("convert tmp/1i7uo1384982525.ps tmp/1i7uo1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/2vofp1384982525.ps tmp/2vofp1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/3vflf1384982525.ps tmp/3vflf1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/4v31o1384982525.ps tmp/4v31o1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/5x9nb1384982525.ps tmp/5x9nb1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/6bobt1384982525.ps tmp/6bobt1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/7m1jr1384982525.ps tmp/7m1jr1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/8933b1384982525.ps tmp/8933b1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/9csdc1384982525.ps tmp/9csdc1384982525.png",intern=TRUE))
character(0)
> try(system("convert tmp/10bqkj1384982525.ps tmp/10bqkj1384982525.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
10.772 1.564 12.339