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
+ ,12
+ ,13
+ ,18
+ ,39
+ ,32
+ ,11
+ ,16
+ ,11
+ ,30
+ ,35
+ ,14
+ ,19
+ ,12
+ ,31
+ ,33
+ ,12
+ ,15
+ ,16
+ ,34
+ ,37
+ ,21
+ ,14
+ ,18
+ ,35
+ ,29
+ ,12
+ ,13
+ ,14
+ ,39
+ ,31
+ ,22
+ ,19
+ ,14
+ ,34
+ ,36
+ ,11
+ ,15
+ ,15
+ ,36
+ ,35
+ ,10
+ ,14
+ ,15
+ ,37
+ ,38
+ ,13
+ ,15
+ ,17
+ ,38
+ ,31
+ ,10
+ ,16
+ ,19
+ ,36
+ ,34
+ ,8
+ ,16
+ ,10
+ ,38
+ ,35
+ ,15
+ ,16
+ ,16
+ ,39
+ ,38
+ ,14
+ ,16
+ ,18
+ ,33
+ ,37
+ ,10
+ ,17
+ ,14
+ ,32
+ ,33
+ ,14
+ ,15
+ ,14
+ ,36
+ ,32
+ ,14
+ ,15
+ ,17
+ ,38
+ ,38
+ ,11
+ ,20
+ ,14
+ ,39
+ ,38
+ ,10
+ ,18
+ ,16
+ ,32
+ ,32
+ ,13
+ ,16
+ ,18
+ ,32
+ ,33
+ ,9.5
+ ,16
+ ,11
+ ,31
+ ,31
+ ,14
+ ,16
+ ,14
+ ,39
+ ,38
+ ,12
+ ,19
+ ,12
+ ,37
+ ,39
+ ,14
+ ,16
+ ,17
+ ,39
+ ,32
+ ,11
+ ,17
+ ,9
+ ,41
+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c(5
+ ,264)
+ ,dimnames=list(c('Happiness'
+ ,'Connected'
+ ,'Separate'
+ ,'Depression'
+ ,'Learning')
+ ,1:264))
> y <- array(NA,dim=c(5,264),dimnames=list(c('Happiness','Connected','Separate','Depression','Learning'),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 = 'Linear Trend'
> par2 = 'Include Monthly Dummies'
> par1 = '1'
> 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 Depression Learning M1 M2 M3 M4 M5 M6 M7 M8 M9
1 14 41 38 12.0 13 1 0 0 0 0 0 0 0 0
2 18 39 32 11.0 16 0 1 0 0 0 0 0 0 0
3 11 30 35 14.0 19 0 0 1 0 0 0 0 0 0
4 12 31 33 12.0 15 0 0 0 1 0 0 0 0 0
5 16 34 37 21.0 14 0 0 0 0 1 0 0 0 0
6 18 35 29 12.0 13 0 0 0 0 0 1 0 0 0
7 14 39 31 22.0 19 0 0 0 0 0 0 1 0 0
8 14 34 36 11.0 15 0 0 0 0 0 0 0 1 0
9 15 36 35 10.0 14 0 0 0 0 0 0 0 0 1
10 15 37 38 13.0 15 0 0 0 0 0 0 0 0 0
11 17 38 31 10.0 16 0 0 0 0 0 0 0 0 0
12 19 36 34 8.0 16 0 0 0 0 0 0 0 0 0
13 10 38 35 15.0 16 1 0 0 0 0 0 0 0 0
14 16 39 38 14.0 16 0 1 0 0 0 0 0 0 0
15 18 33 37 10.0 17 0 0 1 0 0 0 0 0 0
16 14 32 33 14.0 15 0 0 0 1 0 0 0 0 0
17 14 36 32 14.0 15 0 0 0 0 1 0 0 0 0
18 17 38 38 11.0 20 0 0 0 0 0 1 0 0 0
19 14 39 38 10.0 18 0 0 0 0 0 0 1 0 0
20 16 32 32 13.0 16 0 0 0 0 0 0 0 1 0
21 18 32 33 9.5 16 0 0 0 0 0 0 0 0 1
22 11 31 31 14.0 16 0 0 0 0 0 0 0 0 0
23 14 39 38 12.0 19 0 0 0 0 0 0 0 0 0
24 12 37 39 14.0 16 0 0 0 0 0 0 0 0 0
25 17 39 32 11.0 17 1 0 0 0 0 0 0 0 0
26 9 41 32 9.0 17 0 1 0 0 0 0 0 0 0
27 16 36 35 11.0 16 0 0 1 0 0 0 0 0 0
28 14 33 37 15.0 15 0 0 0 1 0 0 0 0 0
29 15 33 33 14.0 16 0 0 0 0 1 0 0 0 0
30 11 34 33 13.0 14 0 0 0 0 0 1 0 0 0
31 16 31 31 9.0 15 0 0 0 0 0 0 1 0 0
32 13 27 32 15.0 12 0 0 0 0 0 0 0 1 0
33 17 37 31 10.0 14 0 0 0 0 0 0 0 0 1
34 15 34 37 11.0 16 0 0 0 0 0 0 0 0 0
35 14 34 30 13.0 14 0 0 0 0 0 0 0 0 0
36 16 32 33 8.0 10 0 0 0 0 0 0 0 0 0
37 9 29 31 20.0 10 1 0 0 0 0 0 0 0 0
38 15 36 33 12.0 14 0 1 0 0 0 0 0 0 0
39 17 29 31 10.0 16 0 0 1 0 0 0 0 0 0
40 13 35 33 10.0 16 0 0 0 1 0 0 0 0 0
41 15 37 32 9.0 16 0 0 0 0 1 0 0 0 0
42 16 34 33 14.0 14 0 0 0 0 0 1 0 0 0
43 16 38 32 8.0 20 0 0 0 0 0 0 1 0 0
44 12 35 33 14.0 14 0 0 0 0 0 0 0 1 0
45 15 38 28 11.0 14 0 0 0 0 0 0 0 0 1
46 11 37 35 13.0 11 0 0 0 0 0 0 0 0 0
47 15 38 39 9.0 14 0 0 0 0 0 0 0 0 0
48 15 33 34 11.0 15 0 0 0 0 0 0 0 0 0
49 17 36 38 15.0 16 1 0 0 0 0 0 0 0 0
50 13 38 32 11.0 14 0 1 0 0 0 0 0 0 0
51 16 32 38 10.0 16 0 0 1 0 0 0 0 0 0
52 14 32 30 14.0 14 0 0 0 1 0 0 0 0 0
53 11 32 33 18.0 12 0 0 0 0 1 0 0 0 0
54 12 34 38 14.0 16 0 0 0 0 0 1 0 0 0
55 12 32 32 11.0 9 0 0 0 0 0 0 1 0 0
56 15 37 35 14.5 14 0 0 0 0 0 0 0 1 0
57 16 39 34 13.0 16 0 0 0 0 0 0 0 0 1
58 15 29 34 9.0 16 0 0 0 0 0 0 0 0 0
59 12 37 36 10.0 15 0 0 0 0 0 0 0 0 0
60 12 35 34 15.0 16 0 0 0 0 0 0 0 0 0
61 8 30 28 20.0 12 1 0 0 0 0 0 0 0 0
62 13 38 34 12.0 16 0 1 0 0 0 0 0 0 0
63 11 34 35 12.0 16 0 0 1 0 0 0 0 0 0
64 14 31 35 14.0 14 0 0 0 1 0 0 0 0 0
65 15 34 31 13.0 16 0 0 0 0 1 0 0 0 0
66 10 35 37 11.0 17 0 0 0 0 0 1 0 0 0
67 11 36 35 17.0 18 0 0 0 0 0 0 1 0 0
68 12 30 27 12.0 18 0 0 0 0 0 0 0 1 0
69 15 39 40 13.0 12 0 0 0 0 0 0 0 0 1
70 15 35 37 14.0 16 0 0 0 0 0 0 0 0 0
71 14 38 36 13.0 10 0 0 0 0 0 0 0 0 0
72 16 31 38 15.0 14 0 0 0 0 0 0 0 0 0
73 15 34 39 13.0 18 1 0 0 0 0 0 0 0 0
74 15 38 41 10.0 18 0 1 0 0 0 0 0 0 0
75 13 34 27 11.0 16 0 0 1 0 0 0 0 0 0
76 12 39 30 19.0 17 0 0 0 1 0 0 0 0 0
77 17 37 37 13.0 16 0 0 0 0 1 0 0 0 0
78 13 34 31 17.0 16 0 0 0 0 0 1 0 0 0
79 15 28 31 13.0 13 0 0 0 0 0 0 1 0 0
80 13 37 27 9.0 16 0 0 0 0 0 0 0 1 0
81 15 33 36 11.0 16 0 0 0 0 0 0 0 0 1
82 15 35 37 9.0 16 0 0 0 0 0 0 0 0 0
83 16 37 33 12.0 15 0 0 0 0 0 0 0 0 0
84 15 32 34 12.0 15 0 0 0 0 0 0 0 0 0
85 14 33 31 13.0 16 1 0 0 0 0 0 0 0 0
86 15 38 39 13.0 14 0 1 0 0 0 0 0 0 0
87 14 33 34 12.0 16 0 0 1 0 0 0 0 0 0
88 13 29 32 15.0 16 0 0 0 1 0 0 0 0 0
89 7 33 33 22.0 15 0 0 0 0 1 0 0 0 0
90 17 31 36 13.0 12 0 0 0 0 0 1 0 0 0
91 13 36 32 15.0 17 0 0 0 0 0 0 1 0 0
92 15 35 41 13.0 16 0 0 0 0 0 0 0 1 0
93 14 32 28 15.0 15 0 0 0 0 0 0 0 0 1
94 13 29 30 12.5 13 0 0 0 0 0 0 0 0 0
95 16 39 36 11.0 16 0 0 0 0 0 0 0 0 0
96 12 37 35 16.0 16 0 0 0 0 0 0 0 0 0
97 14 35 31 11.0 16 1 0 0 0 0 0 0 0 0
98 17 37 34 11.0 16 0 1 0 0 0 0 0 0 0
99 15 32 36 10.0 14 0 0 1 0 0 0 0 0 0
100 17 38 36 10.0 16 0 0 0 1 0 0 0 0 0
101 12 37 35 16.0 16 0 0 0 0 1 0 0 0 0
102 16 36 37 12.0 20 0 0 0 0 0 1 0 0 0
103 11 32 28 11.0 15 0 0 0 0 0 0 1 0 0
104 15 33 39 16.0 16 0 0 0 0 0 0 0 1 0
105 9 40 32 19.0 13 0 0 0 0 0 0 0 0 1
106 16 38 35 11.0 17 0 0 0 0 0 0 0 0 0
107 15 41 39 16.0 16 0 0 0 0 0 0 0 0 0
108 10 36 35 15.0 16 0 0 0 0 0 0 0 0 0
109 10 43 42 24.0 12 1 0 0 0 0 0 0 0 0
110 15 30 34 14.0 16 0 1 0 0 0 0 0 0 0
111 11 31 33 15.0 16 0 0 1 0 0 0 0 0 0
112 13 32 41 11.0 17 0 0 0 1 0 0 0 0 0
113 14 32 33 15.0 13 0 0 0 0 1 0 0 0 0
114 18 37 34 12.0 12 0 0 0 0 0 1 0 0 0
115 16 37 32 10.0 18 0 0 0 0 0 0 1 0 0
116 14 33 40 14.0 14 0 0 0 0 0 0 0 1 0
117 14 34 40 13.0 14 0 0 0 0 0 0 0 0 1
118 14 33 35 9.0 13 0 0 0 0 0 0 0 0 0
119 14 38 36 15.0 16 0 0 0 0 0 0 0 0 0
120 12 33 37 15.0 13 0 0 0 0 0 0 0 0 0
121 14 31 27 14.0 16 1 0 0 0 0 0 0 0 0
122 15 38 39 11.0 13 0 1 0 0 0 0 0 0 0
123 15 37 38 8.0 16 0 0 1 0 0 0 0 0 0
124 15 36 31 11.0 15 0 0 0 1 0 0 0 0 0
125 13 31 33 11.0 16 0 0 0 0 1 0 0 0 0
126 17 39 32 8.0 15 0 0 0 0 0 1 0 0 0
127 17 44 39 10.0 17 0 0 0 0 0 0 1 0 0
128 19 33 36 11.0 15 0 0 0 0 0 0 0 1 0
129 15 35 33 13.0 12 0 0 0 0 0 0 0 0 1
130 13 32 33 11.0 16 0 0 0 0 0 0 0 0 0
131 9 28 32 20.0 10 0 0 0 0 0 0 0 0 0
132 15 40 37 10.0 16 0 0 0 0 0 0 0 0 0
133 15 27 30 15.0 12 1 0 0 0 0 0 0 0 0
134 15 37 38 12.0 14 0 1 0 0 0 0 0 0 0
135 16 32 29 14.0 15 0 0 1 0 0 0 0 0 0
136 11 28 22 23.0 13 0 0 0 1 0 0 0 0 0
137 14 34 35 14.0 15 0 0 0 0 1 0 0 0 0
138 11 30 35 16.0 11 0 0 0 0 0 1 0 0 0
139 15 35 34 11.0 12 0 0 0 0 0 0 1 0 0
140 13 31 35 12.0 11 0 0 0 0 0 0 0 1 0
141 15 32 34 10.0 16 0 0 0 0 0 0 0 0 1
142 16 30 37 14.0 15 0 0 0 0 0 0 0 0 0
143 14 30 35 12.0 17 0 0 0 0 0 0 0 0 0
144 15 31 23 12.0 16 0 0 0 0 0 0 0 0 0
145 16 40 31 11.0 10 1 0 0 0 0 0 0 0 0
146 16 32 27 12.0 18 0 1 0 0 0 0 0 0 0
147 11 36 36 13.0 13 0 0 1 0 0 0 0 0 0
148 12 32 31 11.0 16 0 0 0 1 0 0 0 0 0
149 9 35 32 19.0 13 0 0 0 0 1 0 0 0 0
150 16 38 39 12.0 10 0 0 0 0 0 1 0 0 0
151 13 42 37 17.0 15 0 0 0 0 0 0 1 0 0
152 16 34 38 9.0 16 0 0 0 0 0 0 0 1 0
153 12 35 39 12.0 16 0 0 0 0 0 0 0 0 1
154 9 38 34 19.0 14 0 0 0 0 0 0 0 0 0
155 13 33 31 18.0 10 0 0 0 0 0 0 0 0 0
156 13 36 32 15.0 17 0 0 0 0 0 0 0 0 0
157 14 32 37 14.0 13 1 0 0 0 0 0 0 0 0
158 19 33 36 11.0 15 0 1 0 0 0 0 0 0 0
159 13 34 32 9.0 16 0 0 1 0 0 0 0 0 0
160 12 32 38 18.0 12 0 0 0 1 0 0 0 0 0
161 13 34 36 16.0 13 0 0 0 0 1 0 0 0 0
162 10 27 26 24.0 13 0 0 0 0 0 1 0 0 0
163 14 31 26 14.0 12 0 0 0 0 0 0 1 0 0
164 16 38 33 20.0 17 0 0 0 0 0 0 0 1 0
165 10 34 39 18.0 15 0 0 0 0 0 0 0 0 1
166 11 24 30 23.0 10 0 0 0 0 0 0 0 0 0
167 14 30 33 12.0 14 0 0 0 0 0 0 0 0 0
168 12 26 25 14.0 11 0 0 0 0 0 0 0 0 0
169 9 34 38 16.0 13 1 0 0 0 0 0 0 0 0
170 9 27 37 18.0 16 0 1 0 0 0 0 0 0 0
171 11 37 31 20.0 12 0 0 1 0 0 0 0 0 0
172 16 36 37 12.0 16 0 0 0 1 0 0 0 0 0
173 9 41 35 12.0 12 0 0 0 0 1 0 0 0 0
174 13 29 25 17.0 9 0 0 0 0 0 1 0 0 0
175 16 36 28 13.0 12 0 0 0 0 0 0 1 0 0
176 13 32 35 9.0 15 0 0 0 0 0 0 0 1 0
177 9 37 33 16.0 12 0 0 0 0 0 0 0 0 1
178 12 30 30 18.0 12 0 0 0 0 0 0 0 0 0
179 16 31 31 10.0 14 0 0 0 0 0 0 0 0 0
180 11 38 37 14.0 12 0 0 0 0 0 0 0 0 0
181 14 36 36 11.0 16 1 0 0 0 0 0 0 0 0
182 13 35 30 9.0 11 0 1 0 0 0 0 0 0 0
183 15 31 36 11.0 19 0 0 1 0 0 0 0 0 0
184 14 38 32 10.0 15 0 0 0 1 0 0 0 0 0
185 16 22 28 11.0 8 0 0 0 0 1 0 0 0 0
186 13 32 36 19.0 16 0 0 0 0 0 1 0 0 0
187 14 36 34 14.0 17 0 0 0 0 0 0 1 0 0
188 15 39 31 12.0 12 0 0 0 0 0 0 0 1 0
189 13 28 28 14.0 11 0 0 0 0 0 0 0 0 1
190 11 32 36 21.0 11 0 0 0 0 0 0 0 0 0
191 11 32 36 13.0 14 0 0 0 0 0 0 0 0 0
192 14 38 40 10.0 16 0 0 0 0 0 0 0 0 0
193 15 32 33 15.0 12 1 0 0 0 0 0 0 0 0
194 11 35 37 16.0 16 0 1 0 0 0 0 0 0 0
195 15 32 32 14.0 13 0 0 1 0 0 0 0 0 0
196 12 37 38 12.0 15 0 0 0 1 0 0 0 0 0
197 14 34 31 19.0 16 0 0 0 0 1 0 0 0 0
198 14 33 37 15.0 16 0 0 0 0 0 1 0 0 0
199 8 33 33 19.0 14 0 0 0 0 0 0 1 0 0
200 13 26 32 13.0 16 0 0 0 0 0 0 0 1 0
201 9 30 30 17.0 16 0 0 0 0 0 0 0 0 1
202 15 24 30 12.0 14 0 0 0 0 0 0 0 0 0
203 17 34 31 11.0 11 0 0 0 0 0 0 0 0 0
204 13 34 32 14.0 12 0 0 0 0 0 0 0 0 0
205 15 33 34 11.0 15 1 0 0 0 0 0 0 0 0
206 15 34 36 13.0 15 0 1 0 0 0 0 0 0 0
207 14 35 37 12.0 16 0 0 1 0 0 0 0 0 0
208 16 35 36 15.0 16 0 0 0 1 0 0 0 0 0
209 13 36 33 14.0 11 0 0 0 0 1 0 0 0 0
210 16 34 33 12.0 15 0 0 0 0 0 1 0 0 0
211 9 34 33 17.0 12 0 0 0 0 0 0 1 0 0
212 16 41 44 11.0 12 0 0 0 0 0 0 0 1 0
213 11 32 39 18.0 15 0 0 0 0 0 0 0 0 1
214 10 30 32 13.0 15 0 0 0 0 0 0 0 0 0
215 11 35 35 17.0 16 0 0 0 0 0 0 0 0 0
216 15 28 25 13.0 14 0 0 0 0 0 0 0 0 0
217 17 33 35 11.0 17 1 0 0 0 0 0 0 0 0
218 14 39 34 12.0 14 0 1 0 0 0 0 0 0 0
219 8 36 35 22.0 13 0 0 1 0 0 0 0 0 0
220 15 36 39 14.0 15 0 0 0 1 0 0 0 0 0
221 11 35 33 12.0 13 0 0 0 0 1 0 0 0 0
222 16 38 36 12.0 14 0 0 0 0 0 1 0 0 0
223 10 33 32 17.0 15 0 0 0 0 0 0 1 0 0
224 15 31 32 9.0 12 0 0 0 0 0 0 0 1 0
225 9 34 36 21.0 13 0 0 0 0 0 0 0 0 1
226 16 32 36 10.0 8 0 0 0 0 0 0 0 0 0
227 19 31 32 11.0 14 0 0 0 0 0 0 0 0 0
228 12 33 34 12.0 14 0 0 0 0 0 0 0 0 0
229 8 34 33 23.0 11 1 0 0 0 0 0 0 0 0
230 11 34 35 13.0 12 0 1 0 0 0 0 0 0 0
231 14 34 30 12.0 13 0 0 1 0 0 0 0 0 0
232 9 33 38 16.0 10 0 0 0 1 0 0 0 0 0
233 15 32 34 9.0 16 0 0 0 0 1 0 0 0 0
234 13 41 33 17.0 18 0 0 0 0 0 1 0 0 0
235 16 34 32 9.0 13 0 0 0 0 0 0 1 0 0
236 11 36 31 14.0 11 0 0 0 0 0 0 0 1 0
237 12 37 30 17.0 4 0 0 0 0 0 0 0 0 1
238 13 36 27 13.0 13 0 0 0 0 0 0 0 0 0
239 10 29 31 11.0 16 0 0 0 0 0 0 0 0 0
240 11 37 30 12.0 10 0 0 0 0 0 0 0 0 0
241 12 27 32 10.0 12 1 0 0 0 0 0 0 0 0
242 8 35 35 19.0 12 0 1 0 0 0 0 0 0 0
243 12 28 28 16.0 10 0 0 1 0 0 0 0 0 0
244 12 35 33 16.0 13 0 0 0 1 0 0 0 0 0
245 15 37 31 14.0 15 0 0 0 0 1 0 0 0 0
246 11 29 35 20.0 12 0 0 0 0 0 1 0 0 0
247 13 32 35 15.0 14 0 0 0 0 0 0 1 0 0
248 14 36 32 23.0 10 0 0 0 0 0 0 0 1 0
249 10 19 21 20.0 12 0 0 0 0 0 0 0 0 1
250 12 21 20 16.0 12 0 0 0 0 0 0 0 0 0
251 15 31 34 14.0 11 0 0 0 0 0 0 0 0 0
252 13 33 32 17.0 10 0 0 0 0 0 0 0 0 0
253 13 36 34 11.0 12 1 0 0 0 0 0 0 0 0
254 13 33 32 13.0 16 0 1 0 0 0 0 0 0 0
255 12 37 33 17.0 12 0 0 1 0 0 0 0 0 0
256 12 34 33 15.0 14 0 0 0 1 0 0 0 0 0
257 9 35 37 21.0 16 0 0 0 0 1 0 0 0 0
258 9 31 32 18.0 14 0 0 0 0 0 1 0 0 0
259 15 37 34 15.0 13 0 0 0 0 0 0 1 0 0
260 10 35 30 8.0 4 0 0 0 0 0 0 0 1 0
261 14 27 30 12.0 15 0 0 0 0 0 0 0 0 1
262 15 34 38 12.0 11 0 0 0 0 0 0 0 0 0
263 7 40 36 22.0 11 0 0 0 0 0 0 0 0 0
264 14 29 32 12.0 14 0 0 0 0 0 0 0 0 0
M10 M11 t
1 0 0 1
2 0 0 2
3 0 0 3
4 0 0 4
5 0 0 5
6 0 0 6
7 0 0 7
8 0 0 8
9 0 0 9
10 1 0 10
11 0 1 11
12 0 0 12
13 0 0 13
14 0 0 14
15 0 0 15
16 0 0 16
17 0 0 17
18 0 0 18
19 0 0 19
20 0 0 20
21 0 0 21
22 1 0 22
23 0 1 23
24 0 0 24
25 0 0 25
26 0 0 26
27 0 0 27
28 0 0 28
29 0 0 29
30 0 0 30
31 0 0 31
32 0 0 32
33 0 0 33
34 1 0 34
35 0 1 35
36 0 0 36
37 0 0 37
38 0 0 38
39 0 0 39
40 0 0 40
41 0 0 41
42 0 0 42
43 0 0 43
44 0 0 44
45 0 0 45
46 1 0 46
47 0 1 47
48 0 0 48
49 0 0 49
50 0 0 50
51 0 0 51
52 0 0 52
53 0 0 53
54 0 0 54
55 0 0 55
56 0 0 56
57 0 0 57
58 1 0 58
59 0 1 59
60 0 0 60
61 0 0 61
62 0 0 62
63 0 0 63
64 0 0 64
65 0 0 65
66 0 0 66
67 0 0 67
68 0 0 68
69 0 0 69
70 1 0 70
71 0 1 71
72 0 0 72
73 0 0 73
74 0 0 74
75 0 0 75
76 0 0 76
77 0 0 77
78 0 0 78
79 0 0 79
80 0 0 80
81 0 0 81
82 1 0 82
83 0 1 83
84 0 0 84
85 0 0 85
86 0 0 86
87 0 0 87
88 0 0 88
89 0 0 89
90 0 0 90
91 0 0 91
92 0 0 92
93 0 0 93
94 1 0 94
95 0 1 95
96 0 0 96
97 0 0 97
98 0 0 98
99 0 0 99
100 0 0 100
101 0 0 101
102 0 0 102
103 0 0 103
104 0 0 104
105 0 0 105
106 1 0 106
107 0 1 107
108 0 0 108
109 0 0 109
110 0 0 110
111 0 0 111
112 0 0 112
113 0 0 113
114 0 0 114
115 0 0 115
116 0 0 116
117 0 0 117
118 1 0 118
119 0 1 119
120 0 0 120
121 0 0 121
122 0 0 122
123 0 0 123
124 0 0 124
125 0 0 125
126 0 0 126
127 0 0 127
128 0 0 128
129 0 0 129
130 1 0 130
131 0 1 131
132 0 0 132
133 0 0 133
134 0 0 134
135 0 0 135
136 0 0 136
137 0 0 137
138 0 0 138
139 0 0 139
140 0 0 140
141 0 0 141
142 1 0 142
143 0 1 143
144 0 0 144
145 0 0 145
146 0 0 146
147 0 0 147
148 0 0 148
149 0 0 149
150 0 0 150
151 0 0 151
152 0 0 152
153 0 0 153
154 1 0 154
155 0 1 155
156 0 0 156
157 0 0 157
158 0 0 158
159 0 0 159
160 0 0 160
161 0 0 161
162 0 0 162
163 0 0 163
164 0 0 164
165 0 0 165
166 1 0 166
167 0 1 167
168 0 0 168
169 0 0 169
170 0 0 170
171 0 0 171
172 0 0 172
173 0 0 173
174 0 0 174
175 0 0 175
176 0 0 176
177 0 0 177
178 1 0 178
179 0 1 179
180 0 0 180
181 0 0 181
182 0 0 182
183 0 0 183
184 0 0 184
185 0 0 185
186 0 0 186
187 0 0 187
188 0 0 188
189 0 0 189
190 1 0 190
191 0 1 191
192 0 0 192
193 0 0 193
194 0 0 194
195 0 0 195
196 0 0 196
197 0 0 197
198 0 0 198
199 0 0 199
200 0 0 200
201 0 0 201
202 1 0 202
203 0 1 203
204 0 0 204
205 0 0 205
206 0 0 206
207 0 0 207
208 0 0 208
209 0 0 209
210 0 0 210
211 0 0 211
212 0 0 212
213 0 0 213
214 1 0 214
215 0 1 215
216 0 0 216
217 0 0 217
218 0 0 218
219 0 0 219
220 0 0 220
221 0 0 221
222 0 0 222
223 0 0 223
224 0 0 224
225 0 0 225
226 1 0 226
227 0 1 227
228 0 0 228
229 0 0 229
230 0 0 230
231 0 0 231
232 0 0 232
233 0 0 233
234 0 0 234
235 0 0 235
236 0 0 236
237 0 0 237
238 1 0 238
239 0 1 239
240 0 0 240
241 0 0 241
242 0 0 242
243 0 0 243
244 0 0 244
245 0 0 245
246 0 0 246
247 0 0 247
248 0 0 248
249 0 0 249
250 1 0 250
251 0 1 251
252 0 0 252
253 0 0 253
254 0 0 254
255 0 0 255
256 0 0 256
257 0 0 257
258 0 0 258
259 0 0 259
260 0 0 260
261 0 0 261
262 1 0 262
263 0 1 263
264 0 0 264
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) Connected Separate Depression Learning M1
17.433445 0.006459 0.009987 -0.391530 0.077911 0.215428
M2 M3 M4 M5 M6 M7
0.085413 -0.080116 0.088019 0.267281 1.019225 0.187619
M8 M9 M10 M11 t
0.565177 0.072424 0.095628 0.397392 -0.003800
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.8052 -1.4985 0.3173 1.2623 4.8605
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.433445 1.761409 9.897 <2e-16 ***
Connected 0.006459 0.038960 0.166 0.8685
Separate 0.009987 0.039043 0.256 0.7983
Depression -0.391530 0.038575 -10.150 <2e-16 ***
Learning 0.077911 0.058339 1.335 0.1829
M1 0.215428 0.616055 0.350 0.7269
M2 0.085413 0.617054 0.138 0.8900
M3 -0.080116 0.615140 -0.130 0.8965
M4 0.088019 0.615901 0.143 0.8865
M5 0.267281 0.617647 0.433 0.6656
M6 1.019225 0.616472 1.653 0.0995 .
M7 0.187619 0.618744 0.303 0.7620
M8 0.565177 0.613831 0.921 0.3581
M9 0.072424 0.614619 0.118 0.9063
M10 0.095628 0.617917 0.155 0.8771
M11 0.397392 0.613530 0.648 0.5178
t -0.003800 0.001827 -2.080 0.0385 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.031 on 247 degrees of freedom
Multiple R-squared: 0.3796, Adjusted R-squared: 0.3394
F-statistic: 9.444 on 16 and 247 DF, p-value: < 2.2e-16
> 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.80596046 0.3880790815 0.1940395407
[2,] 0.91352390 0.1729522004 0.0864761002
[3,] 0.88815580 0.2236884056 0.1118442028
[4,] 0.86500649 0.2699870111 0.1349935055
[5,] 0.96277716 0.0744456810 0.0372228405
[6,] 0.97350966 0.0529806891 0.0264903446
[7,] 0.99973562 0.0005287546 0.0002643773
[8,] 0.99957767 0.0008446529 0.0004223265
[9,] 0.99937410 0.0012517940 0.0006258970
[10,] 0.99886636 0.0022672885 0.0011336443
[11,] 0.99958361 0.0008327715 0.0004163858
[12,] 0.99944128 0.0011174491 0.0005587246
[13,] 0.99900656 0.0019868712 0.0009934356
[14,] 0.99848447 0.0030310624 0.0015155312
[15,] 0.99812675 0.0037465005 0.0018732503
[16,] 0.99693436 0.0061312772 0.0030656386
[17,] 0.99518305 0.0096339062 0.0048169531
[18,] 0.99305075 0.0138984967 0.0069492484
[19,] 0.99169925 0.0166015044 0.0083007522
[20,] 0.99125495 0.0174901057 0.0087450529
[21,] 0.98837807 0.0232438577 0.0116219289
[22,] 0.98467965 0.0306406932 0.0153203466
[23,] 0.98262451 0.0347509708 0.0173754854
[24,] 0.97615291 0.0476941882 0.0238470941
[25,] 0.97119158 0.0576168467 0.0288084233
[26,] 0.96184693 0.0763061339 0.0381530669
[27,] 0.95821425 0.0835714934 0.0417857467
[28,] 0.94559486 0.1088102807 0.0544051404
[29,] 0.93063022 0.1387395507 0.0693697753
[30,] 0.97315651 0.0536869732 0.0268434866
[31,] 0.96614266 0.0677146792 0.0338573396
[32,] 0.95707721 0.0858455742 0.0429227871
[33,] 0.95128401 0.0974319711 0.0487159856
[34,] 0.94651201 0.1069759743 0.0534879872
[35,] 0.94762485 0.1047503099 0.0523751549
[36,] 0.94195071 0.1160985886 0.0580492943
[37,] 0.93919887 0.1216022586 0.0608011293
[38,] 0.92947001 0.1410599813 0.0705299906
[39,] 0.91790434 0.1641913112 0.0820956556
[40,] 0.92641121 0.1471775726 0.0735887863
[41,] 0.91684205 0.1663158943 0.0831579471
[42,] 0.92142974 0.1571405191 0.0785702595
[43,] 0.90623582 0.1875283616 0.0937641808
[44,] 0.92106980 0.1578603930 0.0789301965
[45,] 0.91516134 0.1696773176 0.0848386588
[46,] 0.90047367 0.1990526656 0.0995263328
[47,] 0.95833082 0.0833383524 0.0416691762
[48,] 0.95093750 0.0981249954 0.0490624977
[49,] 0.95059419 0.0988116283 0.0494058142
[50,] 0.94166781 0.1166643819 0.0583321909
[51,] 0.94825167 0.1034966516 0.0517483258
[52,] 0.94141817 0.1171636501 0.0585818250
[53,] 0.95423999 0.0915200206 0.0457600103
[54,] 0.95081275 0.0983744948 0.0491872474
[55,] 0.94048075 0.1190385025 0.0595192512
[56,] 0.93070297 0.1385940606 0.0692970303
[57,] 0.91949737 0.1610052629 0.0805026314
[58,] 0.92890138 0.1421972399 0.0710986200
[59,] 0.91929916 0.1614016820 0.0807008410
[60,] 0.91865115 0.1626976989 0.0813488494
[61,] 0.92281720 0.1543655934 0.0771827967
[62,] 0.90839903 0.1832019403 0.0916009702
[63,] 0.89431936 0.2113612873 0.1056806437
[64,] 0.89587858 0.2082428445 0.1041214223
[65,] 0.87951846 0.2409630871 0.1204815436
[66,] 0.86418400 0.2716320011 0.1358160006
[67,] 0.85357285 0.2928543027 0.1464271514
[68,] 0.83005386 0.3398922770 0.1699461385
[69,] 0.80496966 0.3900606877 0.1950303438
[70,] 0.87432905 0.2513419078 0.1256709539
[71,] 0.89805417 0.2038916553 0.1019458277
[72,] 0.88070816 0.2385836837 0.1192918418
[73,] 0.86334921 0.2733015895 0.1366507948
[74,] 0.84393283 0.3121343329 0.1560671665
[75,] 0.82495392 0.3500921596 0.1750460798
[76,] 0.80893989 0.3821202299 0.1910601149
[77,] 0.78602820 0.4279436078 0.2139718039
[78,] 0.76404762 0.4719047561 0.2359523780
[79,] 0.78090827 0.4381834652 0.2190917326
[80,] 0.75212944 0.4957411272 0.2478705636
[81,] 0.75122503 0.4975499479 0.2487749739
[82,] 0.72930423 0.5413915401 0.2706957700
[83,] 0.70166538 0.5966692408 0.2983346204
[84,] 0.75678449 0.4864310285 0.2432155143
[85,] 0.74655902 0.5068819602 0.2534409801
[86,] 0.76492644 0.4701471112 0.2350735556
[87,] 0.75530793 0.4893841403 0.2446920702
[88,] 0.74673133 0.5065373320 0.2532686660
[89,] 0.78218652 0.4356269625 0.2178134813
[90,] 0.75414858 0.4917028380 0.2458514190
[91,] 0.73847193 0.5230561478 0.2615280739
[92,] 0.73250546 0.5349890883 0.2674945442
[93,] 0.73463128 0.5307374379 0.2653687190
[94,] 0.71029108 0.5794178347 0.2897089174
[95,] 0.76339377 0.4732124530 0.2366062265
[96,] 0.74323618 0.5135276434 0.2567638217
[97,] 0.71195898 0.5760820478 0.2880410239
[98,] 0.68817884 0.6236423230 0.3118211615
[99,] 0.66551146 0.6689770869 0.3344885434
[100,] 0.63321168 0.7335766347 0.3667883173
[101,] 0.60215845 0.7956830927 0.3978415463
[102,] 0.57994374 0.8401125123 0.4200562561
[103,] 0.54541305 0.9091739060 0.4545869530
[104,] 0.51275096 0.9744980709 0.4872490355
[105,] 0.48223267 0.9644653481 0.5177673259
[106,] 0.47552925 0.9510585013 0.5244707494
[107,] 0.44324136 0.8864827105 0.5567586447
[108,] 0.42605781 0.8521156150 0.5739421925
[109,] 0.52246124 0.9550775127 0.4775387564
[110,] 0.50693896 0.9861220818 0.4930610409
[111,] 0.49616189 0.9923237754 0.5038381123
[112,] 0.48373251 0.9674650244 0.5162674878
[113,] 0.44686513 0.8937302653 0.5531348673
[114,] 0.45679256 0.9135851250 0.5432074375
[115,] 0.42745096 0.8549019202 0.5725490399
[116,] 0.46732643 0.9346528670 0.5326735665
[117,] 0.45431536 0.9086307228 0.5456846386
[118,] 0.42035798 0.8407159691 0.5796420154
[119,] 0.42480381 0.8496076272 0.5751961864
[120,] 0.39090864 0.7818172846 0.6090913577
[121,] 0.37027472 0.7405494341 0.6297252829
[122,] 0.33993245 0.6798649046 0.6600675477
[123,] 0.36237893 0.7247578556 0.6376210722
[124,] 0.33051741 0.6610348234 0.6694825883
[125,] 0.30735479 0.6147095769 0.6926452115
[126,] 0.29625156 0.5925031222 0.7037484389
[127,] 0.28641780 0.5728356038 0.7135821981
[128,] 0.29989371 0.5997874116 0.7001062942
[129,] 0.32558209 0.6511641875 0.6744179062
[130,] 0.33664049 0.6732809729 0.6633595136
[131,] 0.31756569 0.6351313703 0.6824343148
[132,] 0.28832718 0.5766543618 0.7116728191
[133,] 0.25692604 0.5138520878 0.7430739561
[134,] 0.26041050 0.5208210021 0.7395894990
[135,] 0.27114154 0.5422830766 0.7288584617
[136,] 0.25341515 0.5068303085 0.7465848457
[137,] 0.22395045 0.4479009019 0.7760495490
[138,] 0.20077010 0.4015402014 0.7992298993
[139,] 0.33799965 0.6759992969 0.6620003515
[140,] 0.34775747 0.6955149430 0.6522425285
[141,] 0.31479121 0.6295824276 0.6852087862
[142,] 0.28580815 0.5716162972 0.7141918514
[143,] 0.25628382 0.5125676420 0.7437161790
[144,] 0.23095411 0.4619082208 0.7690458896
[145,] 0.34651782 0.6930356338 0.6534821831
[146,] 0.33225742 0.6645148317 0.6677425842
[147,] 0.32112757 0.6422551355 0.6788724322
[148,] 0.28726748 0.5745349508 0.7127325246
[149,] 0.25873678 0.5174735531 0.7412632235
[150,] 0.30726376 0.6145275257 0.6927362372
[151,] 0.31683023 0.6336604639 0.6831697681
[152,] 0.28322776 0.5664555207 0.7167722397
[153,] 0.27481567 0.5496313486 0.7251843257
[154,] 0.44932417 0.8986483488 0.5506758256
[155,] 0.41184782 0.8236956338 0.5881521831
[156,] 0.42814702 0.8562940364 0.5718529818
[157,] 0.44774390 0.8954878087 0.5522560956
[158,] 0.48978182 0.9795636414 0.5102181793
[159,] 0.45159957 0.9031991465 0.5484004268
[160,] 0.41997757 0.8399551375 0.5800224312
[161,] 0.41413927 0.8282785358 0.5858607321
[162,] 0.38108913 0.7621782594 0.6189108703
[163,] 0.36490363 0.7298072697 0.6350963652
[164,] 0.32862945 0.6572589096 0.6713705452
[165,] 0.30350385 0.6070077013 0.6964961493
[166,] 0.29973205 0.5994641082 0.7002679459
[167,] 0.26886663 0.5377332684 0.7311333658
[168,] 0.23761097 0.4752219427 0.7623890286
[169,] 0.20890860 0.4178171913 0.7910914043
[170,] 0.18049975 0.3609995015 0.8195002492
[171,] 0.15793833 0.3158766589 0.8420616705
[172,] 0.17833900 0.3566779909 0.8216610046
[173,] 0.15936490 0.3187297986 0.8406351007
[174,] 0.16606526 0.3321305122 0.8339347439
[175,] 0.14740643 0.2948128629 0.8525935685
[176,] 0.14299867 0.2859973338 0.8570013331
[177,] 0.14946450 0.2989290032 0.8505354984
[178,] 0.17033965 0.3406793093 0.8296603453
[179,] 0.14391398 0.2878279618 0.8560860191
[180,] 0.16297213 0.3259442511 0.8370278744
[181,] 0.14068542 0.2813708384 0.8593145808
[182,] 0.17361295 0.3472259014 0.8263870493
[183,] 0.15183962 0.3036792336 0.8481603832
[184,] 0.16557208 0.3311441577 0.8344279212
[185,] 0.13818882 0.2763776426 0.8618111787
[186,] 0.11556776 0.2311355220 0.8844322390
[187,] 0.11437346 0.2287469126 0.8856265437
[188,] 0.09378652 0.1875730486 0.9062134757
[189,] 0.11238420 0.2247684078 0.8876157961
[190,] 0.09512290 0.1902457965 0.9048771018
[191,] 0.08476269 0.1695253823 0.9152373089
[192,] 0.09120447 0.1824089403 0.9087955298
[193,] 0.07967143 0.1593428651 0.9203285674
[194,] 0.06395475 0.1279095064 0.9360452468
[195,] 0.11400306 0.2280061284 0.8859969358
[196,] 0.10311051 0.2062210234 0.8968894883
[197,] 0.09659757 0.1931951401 0.9034024299
[198,] 0.10881284 0.2176256867 0.8911871566
[199,] 0.09522433 0.1904486502 0.9047756749
[200,] 0.09511939 0.1902387776 0.9048806112
[201,] 0.09389248 0.1877849597 0.9061075202
[202,] 0.09768271 0.1953654103 0.9023172949
[203,] 0.09460551 0.1892110201 0.9053944900
[204,] 0.11778981 0.2355796300 0.8822101850
[205,] 0.09220463 0.1844092607 0.9077953696
[206,] 0.09732929 0.1946585808 0.9026707096
[207,] 0.08210056 0.1642011217 0.9178994392
[208,] 0.34341300 0.6868260076 0.6565869962
[209,] 0.31039900 0.6207979974 0.6896010013
[210,] 0.27099665 0.5419932929 0.7290033535
[211,] 0.22292180 0.4458435987 0.7770782007
[212,] 0.17539657 0.3507931412 0.8246034294
[213,] 0.18224983 0.3644996500 0.8177501750
[214,] 0.14107464 0.2821492768 0.8589253616
[215,] 0.11430522 0.2286104418 0.8856947791
[216,] 0.08629624 0.1725924816 0.9137037592
[217,] 0.07447085 0.1489417062 0.9255291469
[218,] 0.05901913 0.1180382621 0.9409808690
[219,] 0.03878312 0.0775662341 0.9612168830
[220,] 0.15730660 0.3146132058 0.8426933971
[221,] 0.36459350 0.7291869970 0.6354065015
[222,] 0.32341426 0.6468285225 0.6765857387
[223,] 0.29566272 0.5913254368 0.7043372816
[224,] 0.19059564 0.3811912777 0.8094043611
[225,] 0.14595895 0.2919178954 0.8540410523
> postscript(file="/var/wessaorg/rcomp/tmp/1a92j1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/2gwuc1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/3c1me1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/4un1d1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/57xik1384961101.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
-0.603864335 2.977527531 -2.884119206 -2.506354797 4.860543282 2.739975516
7 8 9 10 11 12
2.977409687 -1.409178527 -0.229174548 0.811681637 1.324666947 2.925755068
13 14 15 16 17 18
-3.568065561 2.137800426 2.711836388 0.315851380 0.124542746 0.739413033
19 20 21 22 23 24
-1.667346936 1.394440548 2.510651064 -2.720433958 -1.156769250 -1.735852925
25 26 27 28 29 30
1.857009193 -6.805152610 1.227480196 0.706579224 1.101624851 -3.888686136
31 32 33 34 35 36
0.342038518 -0.432957255 1.895523574 0.071281640 -0.217890031 0.520251653
37 38 39 40 41 42
-1.953663596 0.671081731 1.966712747 -2.256347860 -0.826269483 1.548448427
43 44 45 46 47 48
-0.448640131 -1.996361321 0.356160584 -2.709900038 -0.854124366 0.334445698
49 50 51 52 53 54
3.551703592 -1.677774405 0.923032034 0.560536497 -0.922942648 -2.611704505
55 56 57 58 59 60
-2.332671589 1.212116827 1.962622480 -0.558315992 -3.458481177 -1.144657344
61 62 63 64 65 66
-2.994774636 -1.416436028 -3.231259343 0.562664327 0.860423014 -5.815073562
67 68 69 70 71 72
-1.694881028 -2.907642158 1.259948939 1.376226705 0.144810582 3.042655520
73 74 75 76 77 78
0.706959854 -0.379623483 -1.497289064 0.330452760 2.826729324 -0.275995975
79 80 81 82 83 84
1.265774780 -2.926016776 0.289548352 -0.535820157 1.445749020 0.869247536
85 86 87 88 89 90
-0.005258867 1.172189879 -0.123605044 -0.067540603 -3.460200552 2.484572430
91 92 93 94 95 96
-0.278860711 0.558807414 1.065539511 -0.777465882 0.979033720 -0.639218402
97 98 99 100 101 102
-0.755632265 2.335305335 0.281245521 1.922336823 -0.887497265 0.473077821
103 104 105 106 107 108
-3.577772606 1.811893748 -2.258530162 1.261136075 1.939410913 -2.978685690
109 110 111 112 113 114
0.529983170 1.600710741 -1.834901408 -1.729623058 1.052577198 3.165473147
115 116 117 118 119 120
0.770327059 0.220272713 0.318837222 -1.132382678 0.642821945 -0.699946333
121 122 123 124 125 126
0.575949690 0.603853450 -0.618695609 0.545839148 -1.695214010 0.418280114
127 128 129 130 131 132
1.778722918 4.053323352 1.583714229 -1.511018413 -1.781921792 0.109063230
133 134 135 136 137 138
2.320601954 0.979522592 2.976177545 1.587180669 0.563542178 -2.064062839
139 140 141 142 143 144
0.713475562 -1.174993537 0.152472414 2.760056847 -0.456815170 1.135673980
145 146 147 148 149 150
1.861958331 1.855633023 -2.309669891 -2.415028774 -2.253877724 1.401714518
151 152 153 154 155 156
0.799356666 0.257127787 -2.088173777 -2.180484492 1.503920287 0.155781614
157 158 159 160 161 162
0.840167011 4.647098480 -2.011054380 0.613022324 0.583646418 0.112824661
163 164 165 166 167 168
1.085005612 4.555754279 -1.609018333 1.873253892 -0.111899264 -0.588182476
169 170 171 172 173 174
-3.354072460 -2.615731881 0.643637986 1.981953475 -4.894182482 0.726431375
175 176 177 178 179 180
2.686812532 -2.530874173 -3.072195005 0.766633147 1.164160010 -1.817836994
181 182 183 184 185 186
-0.492795730 -1.686104173 0.608909315 -0.640573734 2.264158906 0.880485558
187 188 189 190 191 192
0.674469607 0.917791799 0.376322650 0.991899864 -2.672038695 -0.679958967
193 194 195 196 197 198
2.486369389 -1.359252697 2.330060239 -1.865372453 2.711252019 0.343523286
199 200 201 202 203 204
-3.059178777 -0.882742826 -2.825928953 1.391589979 2.861256234 0.349141272
205 206 207 208 209 210
0.715673910 1.606117633 0.289559891 3.309802812 0.155869206 1.325937439
211 212 213 214 215 216
-2.647271412 1.474721655 -0.413683784 -3.307912319 -1.179920081 1.956054133
217 218 219 220 221 222
2.595469073 0.325783717 -1.502284777 2.005368274 -2.730950457 1.393657266
223 224 225 226 227 228
-1.818954646 -0.078303969 -1.020622784 2.055613434 4.728120525 -1.512048114
229 230 231 232 233 234
-1.179581913 -2.058953485 0.690869540 -2.747048685 -0.084281204 0.095853702
235 236 237 238 239 240
1.243771293 -2.019443483 1.200606484 -0.049698155 -4.359193015 -2.140685913
241 242 243 244 245 246
-2.246584352 -2.670626359 0.595053815 0.101840305 1.994553330 -0.158955405
247 248 249 250 251 252
0.543602151 4.617857026 0.003651416 0.415196480 2.207679049 1.868430049
253 254 255 256 257 258
-0.887551453 -0.242969415 0.768303504 -0.315538052 -1.344046646 -3.035189869
259 260 261 262 263 264
2.644811450 -4.715593126 0.541728428 1.708862383 -2.692576390 0.670573406
> postscript(file="/var/wessaorg/rcomp/tmp/64t0g1384961101.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 -0.603864335 NA
1 2.977527531 -0.603864335
2 -2.884119206 2.977527531
3 -2.506354797 -2.884119206
4 4.860543282 -2.506354797
5 2.739975516 4.860543282
6 2.977409687 2.739975516
7 -1.409178527 2.977409687
8 -0.229174548 -1.409178527
9 0.811681637 -0.229174548
10 1.324666947 0.811681637
11 2.925755068 1.324666947
12 -3.568065561 2.925755068
13 2.137800426 -3.568065561
14 2.711836388 2.137800426
15 0.315851380 2.711836388
16 0.124542746 0.315851380
17 0.739413033 0.124542746
18 -1.667346936 0.739413033
19 1.394440548 -1.667346936
20 2.510651064 1.394440548
21 -2.720433958 2.510651064
22 -1.156769250 -2.720433958
23 -1.735852925 -1.156769250
24 1.857009193 -1.735852925
25 -6.805152610 1.857009193
26 1.227480196 -6.805152610
27 0.706579224 1.227480196
28 1.101624851 0.706579224
29 -3.888686136 1.101624851
30 0.342038518 -3.888686136
31 -0.432957255 0.342038518
32 1.895523574 -0.432957255
33 0.071281640 1.895523574
34 -0.217890031 0.071281640
35 0.520251653 -0.217890031
36 -1.953663596 0.520251653
37 0.671081731 -1.953663596
38 1.966712747 0.671081731
39 -2.256347860 1.966712747
40 -0.826269483 -2.256347860
41 1.548448427 -0.826269483
42 -0.448640131 1.548448427
43 -1.996361321 -0.448640131
44 0.356160584 -1.996361321
45 -2.709900038 0.356160584
46 -0.854124366 -2.709900038
47 0.334445698 -0.854124366
48 3.551703592 0.334445698
49 -1.677774405 3.551703592
50 0.923032034 -1.677774405
51 0.560536497 0.923032034
52 -0.922942648 0.560536497
53 -2.611704505 -0.922942648
54 -2.332671589 -2.611704505
55 1.212116827 -2.332671589
56 1.962622480 1.212116827
57 -0.558315992 1.962622480
58 -3.458481177 -0.558315992
59 -1.144657344 -3.458481177
60 -2.994774636 -1.144657344
61 -1.416436028 -2.994774636
62 -3.231259343 -1.416436028
63 0.562664327 -3.231259343
64 0.860423014 0.562664327
65 -5.815073562 0.860423014
66 -1.694881028 -5.815073562
67 -2.907642158 -1.694881028
68 1.259948939 -2.907642158
69 1.376226705 1.259948939
70 0.144810582 1.376226705
71 3.042655520 0.144810582
72 0.706959854 3.042655520
73 -0.379623483 0.706959854
74 -1.497289064 -0.379623483
75 0.330452760 -1.497289064
76 2.826729324 0.330452760
77 -0.275995975 2.826729324
78 1.265774780 -0.275995975
79 -2.926016776 1.265774780
80 0.289548352 -2.926016776
81 -0.535820157 0.289548352
82 1.445749020 -0.535820157
83 0.869247536 1.445749020
84 -0.005258867 0.869247536
85 1.172189879 -0.005258867
86 -0.123605044 1.172189879
87 -0.067540603 -0.123605044
88 -3.460200552 -0.067540603
89 2.484572430 -3.460200552
90 -0.278860711 2.484572430
91 0.558807414 -0.278860711
92 1.065539511 0.558807414
93 -0.777465882 1.065539511
94 0.979033720 -0.777465882
95 -0.639218402 0.979033720
96 -0.755632265 -0.639218402
97 2.335305335 -0.755632265
98 0.281245521 2.335305335
99 1.922336823 0.281245521
100 -0.887497265 1.922336823
101 0.473077821 -0.887497265
102 -3.577772606 0.473077821
103 1.811893748 -3.577772606
104 -2.258530162 1.811893748
105 1.261136075 -2.258530162
106 1.939410913 1.261136075
107 -2.978685690 1.939410913
108 0.529983170 -2.978685690
109 1.600710741 0.529983170
110 -1.834901408 1.600710741
111 -1.729623058 -1.834901408
112 1.052577198 -1.729623058
113 3.165473147 1.052577198
114 0.770327059 3.165473147
115 0.220272713 0.770327059
116 0.318837222 0.220272713
117 -1.132382678 0.318837222
118 0.642821945 -1.132382678
119 -0.699946333 0.642821945
120 0.575949690 -0.699946333
121 0.603853450 0.575949690
122 -0.618695609 0.603853450
123 0.545839148 -0.618695609
124 -1.695214010 0.545839148
125 0.418280114 -1.695214010
126 1.778722918 0.418280114
127 4.053323352 1.778722918
128 1.583714229 4.053323352
129 -1.511018413 1.583714229
130 -1.781921792 -1.511018413
131 0.109063230 -1.781921792
132 2.320601954 0.109063230
133 0.979522592 2.320601954
134 2.976177545 0.979522592
135 1.587180669 2.976177545
136 0.563542178 1.587180669
137 -2.064062839 0.563542178
138 0.713475562 -2.064062839
139 -1.174993537 0.713475562
140 0.152472414 -1.174993537
141 2.760056847 0.152472414
142 -0.456815170 2.760056847
143 1.135673980 -0.456815170
144 1.861958331 1.135673980
145 1.855633023 1.861958331
146 -2.309669891 1.855633023
147 -2.415028774 -2.309669891
148 -2.253877724 -2.415028774
149 1.401714518 -2.253877724
150 0.799356666 1.401714518
151 0.257127787 0.799356666
152 -2.088173777 0.257127787
153 -2.180484492 -2.088173777
154 1.503920287 -2.180484492
155 0.155781614 1.503920287
156 0.840167011 0.155781614
157 4.647098480 0.840167011
158 -2.011054380 4.647098480
159 0.613022324 -2.011054380
160 0.583646418 0.613022324
161 0.112824661 0.583646418
162 1.085005612 0.112824661
163 4.555754279 1.085005612
164 -1.609018333 4.555754279
165 1.873253892 -1.609018333
166 -0.111899264 1.873253892
167 -0.588182476 -0.111899264
168 -3.354072460 -0.588182476
169 -2.615731881 -3.354072460
170 0.643637986 -2.615731881
171 1.981953475 0.643637986
172 -4.894182482 1.981953475
173 0.726431375 -4.894182482
174 2.686812532 0.726431375
175 -2.530874173 2.686812532
176 -3.072195005 -2.530874173
177 0.766633147 -3.072195005
178 1.164160010 0.766633147
179 -1.817836994 1.164160010
180 -0.492795730 -1.817836994
181 -1.686104173 -0.492795730
182 0.608909315 -1.686104173
183 -0.640573734 0.608909315
184 2.264158906 -0.640573734
185 0.880485558 2.264158906
186 0.674469607 0.880485558
187 0.917791799 0.674469607
188 0.376322650 0.917791799
189 0.991899864 0.376322650
190 -2.672038695 0.991899864
191 -0.679958967 -2.672038695
192 2.486369389 -0.679958967
193 -1.359252697 2.486369389
194 2.330060239 -1.359252697
195 -1.865372453 2.330060239
196 2.711252019 -1.865372453
197 0.343523286 2.711252019
198 -3.059178777 0.343523286
199 -0.882742826 -3.059178777
200 -2.825928953 -0.882742826
201 1.391589979 -2.825928953
202 2.861256234 1.391589979
203 0.349141272 2.861256234
204 0.715673910 0.349141272
205 1.606117633 0.715673910
206 0.289559891 1.606117633
207 3.309802812 0.289559891
208 0.155869206 3.309802812
209 1.325937439 0.155869206
210 -2.647271412 1.325937439
211 1.474721655 -2.647271412
212 -0.413683784 1.474721655
213 -3.307912319 -0.413683784
214 -1.179920081 -3.307912319
215 1.956054133 -1.179920081
216 2.595469073 1.956054133
217 0.325783717 2.595469073
218 -1.502284777 0.325783717
219 2.005368274 -1.502284777
220 -2.730950457 2.005368274
221 1.393657266 -2.730950457
222 -1.818954646 1.393657266
223 -0.078303969 -1.818954646
224 -1.020622784 -0.078303969
225 2.055613434 -1.020622784
226 4.728120525 2.055613434
227 -1.512048114 4.728120525
228 -1.179581913 -1.512048114
229 -2.058953485 -1.179581913
230 0.690869540 -2.058953485
231 -2.747048685 0.690869540
232 -0.084281204 -2.747048685
233 0.095853702 -0.084281204
234 1.243771293 0.095853702
235 -2.019443483 1.243771293
236 1.200606484 -2.019443483
237 -0.049698155 1.200606484
238 -4.359193015 -0.049698155
239 -2.140685913 -4.359193015
240 -2.246584352 -2.140685913
241 -2.670626359 -2.246584352
242 0.595053815 -2.670626359
243 0.101840305 0.595053815
244 1.994553330 0.101840305
245 -0.158955405 1.994553330
246 0.543602151 -0.158955405
247 4.617857026 0.543602151
248 0.003651416 4.617857026
249 0.415196480 0.003651416
250 2.207679049 0.415196480
251 1.868430049 2.207679049
252 -0.887551453 1.868430049
253 -0.242969415 -0.887551453
254 0.768303504 -0.242969415
255 -0.315538052 0.768303504
256 -1.344046646 -0.315538052
257 -3.035189869 -1.344046646
258 2.644811450 -3.035189869
259 -4.715593126 2.644811450
260 0.541728428 -4.715593126
261 1.708862383 0.541728428
262 -2.692576390 1.708862383
263 0.670573406 -2.692576390
264 NA 0.670573406
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 2.977527531 -0.603864335
[2,] -2.884119206 2.977527531
[3,] -2.506354797 -2.884119206
[4,] 4.860543282 -2.506354797
[5,] 2.739975516 4.860543282
[6,] 2.977409687 2.739975516
[7,] -1.409178527 2.977409687
[8,] -0.229174548 -1.409178527
[9,] 0.811681637 -0.229174548
[10,] 1.324666947 0.811681637
[11,] 2.925755068 1.324666947
[12,] -3.568065561 2.925755068
[13,] 2.137800426 -3.568065561
[14,] 2.711836388 2.137800426
[15,] 0.315851380 2.711836388
[16,] 0.124542746 0.315851380
[17,] 0.739413033 0.124542746
[18,] -1.667346936 0.739413033
[19,] 1.394440548 -1.667346936
[20,] 2.510651064 1.394440548
[21,] -2.720433958 2.510651064
[22,] -1.156769250 -2.720433958
[23,] -1.735852925 -1.156769250
[24,] 1.857009193 -1.735852925
[25,] -6.805152610 1.857009193
[26,] 1.227480196 -6.805152610
[27,] 0.706579224 1.227480196
[28,] 1.101624851 0.706579224
[29,] -3.888686136 1.101624851
[30,] 0.342038518 -3.888686136
[31,] -0.432957255 0.342038518
[32,] 1.895523574 -0.432957255
[33,] 0.071281640 1.895523574
[34,] -0.217890031 0.071281640
[35,] 0.520251653 -0.217890031
[36,] -1.953663596 0.520251653
[37,] 0.671081731 -1.953663596
[38,] 1.966712747 0.671081731
[39,] -2.256347860 1.966712747
[40,] -0.826269483 -2.256347860
[41,] 1.548448427 -0.826269483
[42,] -0.448640131 1.548448427
[43,] -1.996361321 -0.448640131
[44,] 0.356160584 -1.996361321
[45,] -2.709900038 0.356160584
[46,] -0.854124366 -2.709900038
[47,] 0.334445698 -0.854124366
[48,] 3.551703592 0.334445698
[49,] -1.677774405 3.551703592
[50,] 0.923032034 -1.677774405
[51,] 0.560536497 0.923032034
[52,] -0.922942648 0.560536497
[53,] -2.611704505 -0.922942648
[54,] -2.332671589 -2.611704505
[55,] 1.212116827 -2.332671589
[56,] 1.962622480 1.212116827
[57,] -0.558315992 1.962622480
[58,] -3.458481177 -0.558315992
[59,] -1.144657344 -3.458481177
[60,] -2.994774636 -1.144657344
[61,] -1.416436028 -2.994774636
[62,] -3.231259343 -1.416436028
[63,] 0.562664327 -3.231259343
[64,] 0.860423014 0.562664327
[65,] -5.815073562 0.860423014
[66,] -1.694881028 -5.815073562
[67,] -2.907642158 -1.694881028
[68,] 1.259948939 -2.907642158
[69,] 1.376226705 1.259948939
[70,] 0.144810582 1.376226705
[71,] 3.042655520 0.144810582
[72,] 0.706959854 3.042655520
[73,] -0.379623483 0.706959854
[74,] -1.497289064 -0.379623483
[75,] 0.330452760 -1.497289064
[76,] 2.826729324 0.330452760
[77,] -0.275995975 2.826729324
[78,] 1.265774780 -0.275995975
[79,] -2.926016776 1.265774780
[80,] 0.289548352 -2.926016776
[81,] -0.535820157 0.289548352
[82,] 1.445749020 -0.535820157
[83,] 0.869247536 1.445749020
[84,] -0.005258867 0.869247536
[85,] 1.172189879 -0.005258867
[86,] -0.123605044 1.172189879
[87,] -0.067540603 -0.123605044
[88,] -3.460200552 -0.067540603
[89,] 2.484572430 -3.460200552
[90,] -0.278860711 2.484572430
[91,] 0.558807414 -0.278860711
[92,] 1.065539511 0.558807414
[93,] -0.777465882 1.065539511
[94,] 0.979033720 -0.777465882
[95,] -0.639218402 0.979033720
[96,] -0.755632265 -0.639218402
[97,] 2.335305335 -0.755632265
[98,] 0.281245521 2.335305335
[99,] 1.922336823 0.281245521
[100,] -0.887497265 1.922336823
[101,] 0.473077821 -0.887497265
[102,] -3.577772606 0.473077821
[103,] 1.811893748 -3.577772606
[104,] -2.258530162 1.811893748
[105,] 1.261136075 -2.258530162
[106,] 1.939410913 1.261136075
[107,] -2.978685690 1.939410913
[108,] 0.529983170 -2.978685690
[109,] 1.600710741 0.529983170
[110,] -1.834901408 1.600710741
[111,] -1.729623058 -1.834901408
[112,] 1.052577198 -1.729623058
[113,] 3.165473147 1.052577198
[114,] 0.770327059 3.165473147
[115,] 0.220272713 0.770327059
[116,] 0.318837222 0.220272713
[117,] -1.132382678 0.318837222
[118,] 0.642821945 -1.132382678
[119,] -0.699946333 0.642821945
[120,] 0.575949690 -0.699946333
[121,] 0.603853450 0.575949690
[122,] -0.618695609 0.603853450
[123,] 0.545839148 -0.618695609
[124,] -1.695214010 0.545839148
[125,] 0.418280114 -1.695214010
[126,] 1.778722918 0.418280114
[127,] 4.053323352 1.778722918
[128,] 1.583714229 4.053323352
[129,] -1.511018413 1.583714229
[130,] -1.781921792 -1.511018413
[131,] 0.109063230 -1.781921792
[132,] 2.320601954 0.109063230
[133,] 0.979522592 2.320601954
[134,] 2.976177545 0.979522592
[135,] 1.587180669 2.976177545
[136,] 0.563542178 1.587180669
[137,] -2.064062839 0.563542178
[138,] 0.713475562 -2.064062839
[139,] -1.174993537 0.713475562
[140,] 0.152472414 -1.174993537
[141,] 2.760056847 0.152472414
[142,] -0.456815170 2.760056847
[143,] 1.135673980 -0.456815170
[144,] 1.861958331 1.135673980
[145,] 1.855633023 1.861958331
[146,] -2.309669891 1.855633023
[147,] -2.415028774 -2.309669891
[148,] -2.253877724 -2.415028774
[149,] 1.401714518 -2.253877724
[150,] 0.799356666 1.401714518
[151,] 0.257127787 0.799356666
[152,] -2.088173777 0.257127787
[153,] -2.180484492 -2.088173777
[154,] 1.503920287 -2.180484492
[155,] 0.155781614 1.503920287
[156,] 0.840167011 0.155781614
[157,] 4.647098480 0.840167011
[158,] -2.011054380 4.647098480
[159,] 0.613022324 -2.011054380
[160,] 0.583646418 0.613022324
[161,] 0.112824661 0.583646418
[162,] 1.085005612 0.112824661
[163,] 4.555754279 1.085005612
[164,] -1.609018333 4.555754279
[165,] 1.873253892 -1.609018333
[166,] -0.111899264 1.873253892
[167,] -0.588182476 -0.111899264
[168,] -3.354072460 -0.588182476
[169,] -2.615731881 -3.354072460
[170,] 0.643637986 -2.615731881
[171,] 1.981953475 0.643637986
[172,] -4.894182482 1.981953475
[173,] 0.726431375 -4.894182482
[174,] 2.686812532 0.726431375
[175,] -2.530874173 2.686812532
[176,] -3.072195005 -2.530874173
[177,] 0.766633147 -3.072195005
[178,] 1.164160010 0.766633147
[179,] -1.817836994 1.164160010
[180,] -0.492795730 -1.817836994
[181,] -1.686104173 -0.492795730
[182,] 0.608909315 -1.686104173
[183,] -0.640573734 0.608909315
[184,] 2.264158906 -0.640573734
[185,] 0.880485558 2.264158906
[186,] 0.674469607 0.880485558
[187,] 0.917791799 0.674469607
[188,] 0.376322650 0.917791799
[189,] 0.991899864 0.376322650
[190,] -2.672038695 0.991899864
[191,] -0.679958967 -2.672038695
[192,] 2.486369389 -0.679958967
[193,] -1.359252697 2.486369389
[194,] 2.330060239 -1.359252697
[195,] -1.865372453 2.330060239
[196,] 2.711252019 -1.865372453
[197,] 0.343523286 2.711252019
[198,] -3.059178777 0.343523286
[199,] -0.882742826 -3.059178777
[200,] -2.825928953 -0.882742826
[201,] 1.391589979 -2.825928953
[202,] 2.861256234 1.391589979
[203,] 0.349141272 2.861256234
[204,] 0.715673910 0.349141272
[205,] 1.606117633 0.715673910
[206,] 0.289559891 1.606117633
[207,] 3.309802812 0.289559891
[208,] 0.155869206 3.309802812
[209,] 1.325937439 0.155869206
[210,] -2.647271412 1.325937439
[211,] 1.474721655 -2.647271412
[212,] -0.413683784 1.474721655
[213,] -3.307912319 -0.413683784
[214,] -1.179920081 -3.307912319
[215,] 1.956054133 -1.179920081
[216,] 2.595469073 1.956054133
[217,] 0.325783717 2.595469073
[218,] -1.502284777 0.325783717
[219,] 2.005368274 -1.502284777
[220,] -2.730950457 2.005368274
[221,] 1.393657266 -2.730950457
[222,] -1.818954646 1.393657266
[223,] -0.078303969 -1.818954646
[224,] -1.020622784 -0.078303969
[225,] 2.055613434 -1.020622784
[226,] 4.728120525 2.055613434
[227,] -1.512048114 4.728120525
[228,] -1.179581913 -1.512048114
[229,] -2.058953485 -1.179581913
[230,] 0.690869540 -2.058953485
[231,] -2.747048685 0.690869540
[232,] -0.084281204 -2.747048685
[233,] 0.095853702 -0.084281204
[234,] 1.243771293 0.095853702
[235,] -2.019443483 1.243771293
[236,] 1.200606484 -2.019443483
[237,] -0.049698155 1.200606484
[238,] -4.359193015 -0.049698155
[239,] -2.140685913 -4.359193015
[240,] -2.246584352 -2.140685913
[241,] -2.670626359 -2.246584352
[242,] 0.595053815 -2.670626359
[243,] 0.101840305 0.595053815
[244,] 1.994553330 0.101840305
[245,] -0.158955405 1.994553330
[246,] 0.543602151 -0.158955405
[247,] 4.617857026 0.543602151
[248,] 0.003651416 4.617857026
[249,] 0.415196480 0.003651416
[250,] 2.207679049 0.415196480
[251,] 1.868430049 2.207679049
[252,] -0.887551453 1.868430049
[253,] -0.242969415 -0.887551453
[254,] 0.768303504 -0.242969415
[255,] -0.315538052 0.768303504
[256,] -1.344046646 -0.315538052
[257,] -3.035189869 -1.344046646
[258,] 2.644811450 -3.035189869
[259,] -4.715593126 2.644811450
[260,] 0.541728428 -4.715593126
[261,] 1.708862383 0.541728428
[262,] -2.692576390 1.708862383
[263,] 0.670573406 -2.692576390
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 2.977527531 -0.603864335
2 -2.884119206 2.977527531
3 -2.506354797 -2.884119206
4 4.860543282 -2.506354797
5 2.739975516 4.860543282
6 2.977409687 2.739975516
7 -1.409178527 2.977409687
8 -0.229174548 -1.409178527
9 0.811681637 -0.229174548
10 1.324666947 0.811681637
11 2.925755068 1.324666947
12 -3.568065561 2.925755068
13 2.137800426 -3.568065561
14 2.711836388 2.137800426
15 0.315851380 2.711836388
16 0.124542746 0.315851380
17 0.739413033 0.124542746
18 -1.667346936 0.739413033
19 1.394440548 -1.667346936
20 2.510651064 1.394440548
21 -2.720433958 2.510651064
22 -1.156769250 -2.720433958
23 -1.735852925 -1.156769250
24 1.857009193 -1.735852925
25 -6.805152610 1.857009193
26 1.227480196 -6.805152610
27 0.706579224 1.227480196
28 1.101624851 0.706579224
29 -3.888686136 1.101624851
30 0.342038518 -3.888686136
31 -0.432957255 0.342038518
32 1.895523574 -0.432957255
33 0.071281640 1.895523574
34 -0.217890031 0.071281640
35 0.520251653 -0.217890031
36 -1.953663596 0.520251653
37 0.671081731 -1.953663596
38 1.966712747 0.671081731
39 -2.256347860 1.966712747
40 -0.826269483 -2.256347860
41 1.548448427 -0.826269483
42 -0.448640131 1.548448427
43 -1.996361321 -0.448640131
44 0.356160584 -1.996361321
45 -2.709900038 0.356160584
46 -0.854124366 -2.709900038
47 0.334445698 -0.854124366
48 3.551703592 0.334445698
49 -1.677774405 3.551703592
50 0.923032034 -1.677774405
51 0.560536497 0.923032034
52 -0.922942648 0.560536497
53 -2.611704505 -0.922942648
54 -2.332671589 -2.611704505
55 1.212116827 -2.332671589
56 1.962622480 1.212116827
57 -0.558315992 1.962622480
58 -3.458481177 -0.558315992
59 -1.144657344 -3.458481177
60 -2.994774636 -1.144657344
61 -1.416436028 -2.994774636
62 -3.231259343 -1.416436028
63 0.562664327 -3.231259343
64 0.860423014 0.562664327
65 -5.815073562 0.860423014
66 -1.694881028 -5.815073562
67 -2.907642158 -1.694881028
68 1.259948939 -2.907642158
69 1.376226705 1.259948939
70 0.144810582 1.376226705
71 3.042655520 0.144810582
72 0.706959854 3.042655520
73 -0.379623483 0.706959854
74 -1.497289064 -0.379623483
75 0.330452760 -1.497289064
76 2.826729324 0.330452760
77 -0.275995975 2.826729324
78 1.265774780 -0.275995975
79 -2.926016776 1.265774780
80 0.289548352 -2.926016776
81 -0.535820157 0.289548352
82 1.445749020 -0.535820157
83 0.869247536 1.445749020
84 -0.005258867 0.869247536
85 1.172189879 -0.005258867
86 -0.123605044 1.172189879
87 -0.067540603 -0.123605044
88 -3.460200552 -0.067540603
89 2.484572430 -3.460200552
90 -0.278860711 2.484572430
91 0.558807414 -0.278860711
92 1.065539511 0.558807414
93 -0.777465882 1.065539511
94 0.979033720 -0.777465882
95 -0.639218402 0.979033720
96 -0.755632265 -0.639218402
97 2.335305335 -0.755632265
98 0.281245521 2.335305335
99 1.922336823 0.281245521
100 -0.887497265 1.922336823
101 0.473077821 -0.887497265
102 -3.577772606 0.473077821
103 1.811893748 -3.577772606
104 -2.258530162 1.811893748
105 1.261136075 -2.258530162
106 1.939410913 1.261136075
107 -2.978685690 1.939410913
108 0.529983170 -2.978685690
109 1.600710741 0.529983170
110 -1.834901408 1.600710741
111 -1.729623058 -1.834901408
112 1.052577198 -1.729623058
113 3.165473147 1.052577198
114 0.770327059 3.165473147
115 0.220272713 0.770327059
116 0.318837222 0.220272713
117 -1.132382678 0.318837222
118 0.642821945 -1.132382678
119 -0.699946333 0.642821945
120 0.575949690 -0.699946333
121 0.603853450 0.575949690
122 -0.618695609 0.603853450
123 0.545839148 -0.618695609
124 -1.695214010 0.545839148
125 0.418280114 -1.695214010
126 1.778722918 0.418280114
127 4.053323352 1.778722918
128 1.583714229 4.053323352
129 -1.511018413 1.583714229
130 -1.781921792 -1.511018413
131 0.109063230 -1.781921792
132 2.320601954 0.109063230
133 0.979522592 2.320601954
134 2.976177545 0.979522592
135 1.587180669 2.976177545
136 0.563542178 1.587180669
137 -2.064062839 0.563542178
138 0.713475562 -2.064062839
139 -1.174993537 0.713475562
140 0.152472414 -1.174993537
141 2.760056847 0.152472414
142 -0.456815170 2.760056847
143 1.135673980 -0.456815170
144 1.861958331 1.135673980
145 1.855633023 1.861958331
146 -2.309669891 1.855633023
147 -2.415028774 -2.309669891
148 -2.253877724 -2.415028774
149 1.401714518 -2.253877724
150 0.799356666 1.401714518
151 0.257127787 0.799356666
152 -2.088173777 0.257127787
153 -2.180484492 -2.088173777
154 1.503920287 -2.180484492
155 0.155781614 1.503920287
156 0.840167011 0.155781614
157 4.647098480 0.840167011
158 -2.011054380 4.647098480
159 0.613022324 -2.011054380
160 0.583646418 0.613022324
161 0.112824661 0.583646418
162 1.085005612 0.112824661
163 4.555754279 1.085005612
164 -1.609018333 4.555754279
165 1.873253892 -1.609018333
166 -0.111899264 1.873253892
167 -0.588182476 -0.111899264
168 -3.354072460 -0.588182476
169 -2.615731881 -3.354072460
170 0.643637986 -2.615731881
171 1.981953475 0.643637986
172 -4.894182482 1.981953475
173 0.726431375 -4.894182482
174 2.686812532 0.726431375
175 -2.530874173 2.686812532
176 -3.072195005 -2.530874173
177 0.766633147 -3.072195005
178 1.164160010 0.766633147
179 -1.817836994 1.164160010
180 -0.492795730 -1.817836994
181 -1.686104173 -0.492795730
182 0.608909315 -1.686104173
183 -0.640573734 0.608909315
184 2.264158906 -0.640573734
185 0.880485558 2.264158906
186 0.674469607 0.880485558
187 0.917791799 0.674469607
188 0.376322650 0.917791799
189 0.991899864 0.376322650
190 -2.672038695 0.991899864
191 -0.679958967 -2.672038695
192 2.486369389 -0.679958967
193 -1.359252697 2.486369389
194 2.330060239 -1.359252697
195 -1.865372453 2.330060239
196 2.711252019 -1.865372453
197 0.343523286 2.711252019
198 -3.059178777 0.343523286
199 -0.882742826 -3.059178777
200 -2.825928953 -0.882742826
201 1.391589979 -2.825928953
202 2.861256234 1.391589979
203 0.349141272 2.861256234
204 0.715673910 0.349141272
205 1.606117633 0.715673910
206 0.289559891 1.606117633
207 3.309802812 0.289559891
208 0.155869206 3.309802812
209 1.325937439 0.155869206
210 -2.647271412 1.325937439
211 1.474721655 -2.647271412
212 -0.413683784 1.474721655
213 -3.307912319 -0.413683784
214 -1.179920081 -3.307912319
215 1.956054133 -1.179920081
216 2.595469073 1.956054133
217 0.325783717 2.595469073
218 -1.502284777 0.325783717
219 2.005368274 -1.502284777
220 -2.730950457 2.005368274
221 1.393657266 -2.730950457
222 -1.818954646 1.393657266
223 -0.078303969 -1.818954646
224 -1.020622784 -0.078303969
225 2.055613434 -1.020622784
226 4.728120525 2.055613434
227 -1.512048114 4.728120525
228 -1.179581913 -1.512048114
229 -2.058953485 -1.179581913
230 0.690869540 -2.058953485
231 -2.747048685 0.690869540
232 -0.084281204 -2.747048685
233 0.095853702 -0.084281204
234 1.243771293 0.095853702
235 -2.019443483 1.243771293
236 1.200606484 -2.019443483
237 -0.049698155 1.200606484
238 -4.359193015 -0.049698155
239 -2.140685913 -4.359193015
240 -2.246584352 -2.140685913
241 -2.670626359 -2.246584352
242 0.595053815 -2.670626359
243 0.101840305 0.595053815
244 1.994553330 0.101840305
245 -0.158955405 1.994553330
246 0.543602151 -0.158955405
247 4.617857026 0.543602151
248 0.003651416 4.617857026
249 0.415196480 0.003651416
250 2.207679049 0.415196480
251 1.868430049 2.207679049
252 -0.887551453 1.868430049
253 -0.242969415 -0.887551453
254 0.768303504 -0.242969415
255 -0.315538052 0.768303504
256 -1.344046646 -0.315538052
257 -3.035189869 -1.344046646
258 2.644811450 -3.035189869
259 -4.715593126 2.644811450
260 0.541728428 -4.715593126
261 1.708862383 0.541728428
262 -2.692576390 1.708862383
263 0.670573406 -2.692576390
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/7rw9i1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/85ps11384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/wessaorg/rcomp/tmp/9jjdh1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/wessaorg/rcomp/tmp/10jyea1384961101.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/wessaorg/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, 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/wessaorg/rcomp/tmp/11zb5q1384961101.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/wessaorg/rcomp/tmp/12ojs31384961101.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/wessaorg/rcomp/tmp/13l0e51384961101.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/wessaorg/rcomp/tmp/14xjj71384961102.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/wessaorg/rcomp/tmp/154wiw1384961102.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/wessaorg/rcomp/tmp/16az0b1384961102.tab")
+ }
>
> try(system("convert tmp/1a92j1384961101.ps tmp/1a92j1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/2gwuc1384961101.ps tmp/2gwuc1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/3c1me1384961101.ps tmp/3c1me1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/4un1d1384961101.ps tmp/4un1d1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/57xik1384961101.ps tmp/57xik1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/64t0g1384961101.ps tmp/64t0g1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/7rw9i1384961101.ps tmp/7rw9i1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/85ps11384961101.ps tmp/85ps11384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/9jjdh1384961101.ps tmp/9jjdh1384961101.png",intern=TRUE))
character(0)
> try(system("convert tmp/10jyea1384961101.ps tmp/10jyea1384961101.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
17.679 2.591 20.253