R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(9
+ ,13
+ ,38
+ ,14
+ ,9
+ ,16
+ ,32
+ ,18
+ ,9
+ ,19
+ ,35
+ ,11
+ ,9
+ ,15
+ ,33
+ ,12
+ ,9
+ ,14
+ ,37
+ ,16
+ ,9
+ ,13
+ ,29
+ ,18
+ ,9
+ ,19
+ ,31
+ ,14
+ ,9
+ ,15
+ ,36
+ ,14
+ ,9
+ ,14
+ ,35
+ ,15
+ ,9
+ ,15
+ ,38
+ ,15
+ ,9
+ ,16
+ ,31
+ ,17
+ ,9
+ ,16
+ ,34
+ ,19
+ ,9
+ ,16
+ ,35
+ ,10
+ ,9
+ ,16
+ ,38
+ ,16
+ ,9
+ ,17
+ ,37
+ ,18
+ ,9
+ ,15
+ ,33
+ ,14
+ ,9
+ ,15
+ ,32
+ ,14
+ ,9
+ ,20
+ ,38
+ ,17
+ ,9
+ ,18
+ ,38
+ ,14
+ ,9
+ ,16
+ ,32
+ ,16
+ ,9
+ ,16
+ ,33
+ ,18
+ ,9
+ ,16
+ ,31
+ ,11
+ ,9
+ ,19
+ ,38
+ ,14
+ ,9
+ ,16
+ ,39
+ ,12
+ ,9
+ ,17
+ ,32
+ ,17
+ ,9
+ ,17
+ ,32
+ ,9
+ ,9
+ ,16
+ ,35
+ ,16
+ ,9
+ ,15
+ ,37
+ ,14
+ ,9
+ ,16
+ ,33
+ ,15
+ ,9
+ ,14
+ ,33
+ ,11
+ ,9
+ ,15
+ ,31
+ ,16
+ ,9
+ ,12
+ ,32
+ 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
+ ,12
+ ,35
+ ,11
+ ,11
+ ,14
+ ,35
+ ,13
+ ,11
+ ,10
+ ,32
+ ,14
+ ,11
+ ,12
+ ,21
+ ,10
+ ,11
+ ,12
+ ,20
+ ,12
+ ,11
+ ,11
+ ,34
+ ,15
+ ,11
+ ,10
+ ,32
+ ,13
+ ,11
+ ,12
+ ,34
+ ,13
+ ,11
+ ,16
+ ,32
+ ,13
+ ,11
+ ,12
+ ,33
+ ,12
+ ,11
+ ,14
+ ,33
+ ,12
+ ,11
+ ,16
+ ,37
+ ,9
+ ,11
+ ,14
+ ,32
+ ,9
+ ,11
+ ,13
+ ,34
+ ,15
+ ,11
+ ,4
+ ,30
+ ,10
+ ,11
+ ,15
+ ,30
+ ,14
+ ,11
+ ,11
+ ,38
+ ,15
+ ,11
+ ,11
+ ,36
+ ,7
+ ,11
+ ,14
+ ,32
+ ,14)
+ ,dim=c(4
+ ,264)
+ ,dimnames=list(c('month'
+ ,'Doorzettingsvermogen'
+ ,'Zelfstandig'
+ ,'Stressbestendig')
+ ,1:264))
> y <- array(NA,dim=c(4,264),dimnames=list(c('month','Doorzettingsvermogen','Zelfstandig','Stressbestendig'),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 = 'Do not include Seasonal Dummies'
> par1 = '2'
> library(lattice)
> library(lmtest)
Loading required package: zoo
> n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
> par1 <- as.numeric(par1)
> x <- t(y)
> k <- length(x[1,])
> n <- length(x[,1])
> x1 <- cbind(x[,par1], x[,1:k!=par1])
> mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
> colnames(x1) <- mycolnames #colnames(x)[par1]
> x <- x1
> if (par3 == 'First Differences'){
+ x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
+ for (i in 1:n-1) {
+ for (j in 1:k) {
+ x2[i,j] <- x[i+1,j] - x[i,j]
+ }
+ }
+ x <- x2
+ }
> if (par2 == 'Include Monthly Dummies'){
+ x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
+ for (i in 1:11){
+ x2[seq(i,n,12),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> if (par2 == 'Include Quarterly Dummies'){
+ x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
+ for (i in 1:3){
+ x2[seq(i,n,4),i] <- 1
+ }
+ x <- cbind(x, x2)
+ }
> k <- length(x[1,])
> if (par3 == 'Linear Trend'){
+ x <- cbind(x, c(1:n))
+ colnames(x)[k+1] <- 't'
+ }
> x
Doorzettingsvermogen month Zelfstandig Stressbestendig t
1 13 9 38 14 1
2 16 9 32 18 2
3 19 9 35 11 3
4 15 9 33 12 4
5 14 9 37 16 5
6 13 9 29 18 6
7 19 9 31 14 7
8 15 9 36 14 8
9 14 9 35 15 9
10 15 9 38 15 10
11 16 9 31 17 11
12 16 9 34 19 12
13 16 9 35 10 13
14 16 9 38 16 14
15 17 9 37 18 15
16 15 9 33 14 16
17 15 9 32 14 17
18 20 9 38 17 18
19 18 9 38 14 19
20 16 9 32 16 20
21 16 9 33 18 21
22 16 9 31 11 22
23 19 9 38 14 23
24 16 9 39 12 24
25 17 9 32 17 25
26 17 9 32 9 26
27 16 9 35 16 27
28 15 9 37 14 28
29 16 9 33 15 29
30 14 9 33 11 30
31 15 9 31 16 31
32 12 9 32 13 32
33 14 9 31 17 33
34 16 9 37 15 34
35 14 9 30 14 35
36 10 9 33 16 36
37 10 9 31 9 37
38 14 9 33 15 38
39 16 9 31 17 39
40 16 9 33 13 40
41 16 9 32 15 41
42 14 9 33 16 42
43 20 9 32 16 43
44 14 9 33 12 44
45 14 9 28 15 45
46 11 9 35 11 46
47 14 9 39 15 47
48 15 9 34 15 48
49 16 9 38 17 49
50 14 9 32 13 50
51 16 9 38 16 51
52 14 9 30 14 52
53 12 9 33 11 53
54 16 9 38 12 54
55 9 9 32 12 55
56 14 9 35 15 56
57 16 9 34 16 57
58 16 9 34 15 58
59 15 9 36 12 59
60 16 9 34 12 60
61 12 9 28 8 61
62 16 9 34 13 62
63 16 9 35 11 63
64 14 9 35 14 64
65 16 9 31 15 65
66 17 9 34 9 66
67 18 10 37 10 67
68 18 10 35 11 68
69 12 10 27 12 69
70 16 10 40 15 70
71 10 10 37 15 71
72 14 10 36 14 72
73 18 10 38 16 73
74 18 10 39 15 74
75 16 10 41 15 75
76 17 10 27 13 76
77 16 10 30 12 77
78 16 10 37 17 78
79 13 10 31 13 79
80 16 10 31 15 80
81 16 10 27 13 81
82 16 10 36 15 82
83 15 10 37 15 83
84 15 10 33 16 84
85 16 10 34 15 85
86 14 10 31 14 86
87 16 10 39 15 87
88 16 10 34 14 88
89 15 10 32 13 89
90 12 10 33 7 90
91 17 10 36 17 91
92 16 10 32 13 92
93 15 10 41 15 93
94 13 10 28 14 94
95 16 10 30 13 95
96 16 10 36 16 96
97 16 10 35 12 97
98 16 10 31 14 98
99 14 10 34 17 99
100 16 10 36 15 100
101 16 10 36 17 101
102 20 10 35 12 102
103 15 10 37 16 103
104 16 10 28 11 104
105 13 10 39 15 105
106 17 10 32 9 106
107 16 10 35 16 107
108 16 10 39 15 108
109 12 10 35 10 109
110 16 10 42 10 110
111 16 10 34 15 111
112 17 10 33 11 112
113 13 10 41 13 113
114 12 10 33 14 114
115 18 10 34 18 115
116 14 10 32 16 116
117 14 10 40 14 117
118 13 10 40 14 118
119 16 10 35 14 119
120 13 10 36 14 120
121 16 10 37 12 121
122 13 10 27 14 122
123 16 10 39 15 123
124 15 10 38 15 124
125 16 10 31 15 125
126 15 10 33 13 126
127 17 10 32 17 127
128 15 10 39 17 128
129 12 10 36 19 129
130 16 10 33 15 130
131 10 10 33 13 131
132 16 10 32 9 132
133 12 10 37 15 133
134 14 10 30 15 134
135 15 10 38 15 135
136 13 10 29 16 136
137 15 10 22 11 137
138 11 10 35 14 138
139 12 10 35 11 139
140 11 10 34 15 140
141 16 10 35 13 141
142 15 10 34 15 142
143 17 10 37 16 143
144 16 10 35 14 144
145 10 10 23 15 145
146 18 10 31 16 146
147 13 10 27 16 147
148 16 10 36 11 148
149 13 10 31 12 149
150 10 10 32 9 150
151 15 10 39 16 151
152 16 10 37 13 152
153 16 10 38 16 153
154 14 10 39 12 154
155 10 10 31 13 155
156 17 10 32 13 156
157 13 10 37 14 157
158 15 10 36 19 158
159 16 10 32 13 159
160 12 10 38 12 160
161 13 10 36 13 161
162 13 11 26 10 162
163 12 11 26 14 163
164 17 11 33 16 164
165 15 11 39 10 165
166 10 11 30 11 166
167 14 11 33 14 167
168 11 11 25 12 168
169 13 11 38 9 169
170 16 11 37 9 170
171 12 11 31 11 171
172 16 11 37 16 172
173 12 11 35 9 173
174 9 11 25 13 174
175 12 11 28 16 175
176 15 11 35 13 176
177 12 11 33 9 177
178 12 11 30 12 178
179 14 11 31 16 179
180 12 11 37 11 180
181 16 11 36 14 181
182 11 11 30 13 182
183 19 11 36 15 183
184 15 11 32 14 184
185 8 11 28 16 185
186 16 11 36 13 186
187 17 11 34 14 187
188 12 11 31 15 188
189 11 11 28 13 189
190 11 11 36 11 190
191 14 11 36 11 191
192 16 11 40 14 192
193 12 11 33 15 193
194 16 11 37 11 194
195 13 11 32 15 195
196 15 11 38 12 196
197 16 11 31 14 197
198 16 11 37 14 198
199 14 11 33 8 199
200 16 11 32 13 200
201 16 11 30 9 201
202 14 11 30 15 202
203 11 11 31 17 203
204 12 11 32 13 204
205 15 11 34 15 205
206 15 11 36 15 206
207 16 11 37 14 207
208 16 11 36 16 208
209 11 11 33 13 209
210 15 11 33 16 210
211 12 11 33 9 211
212 12 11 44 16 212
213 15 11 39 11 213
214 15 11 32 10 214
215 16 11 35 11 215
216 14 11 25 15 216
217 17 11 35 17 217
218 14 11 34 14 218
219 13 11 35 8 219
220 15 11 39 15 220
221 13 11 33 11 221
222 14 11 36 16 222
223 15 11 32 10 223
224 12 11 32 15 224
225 13 11 36 9 225
226 8 11 36 16 226
227 14 11 32 19 227
228 14 11 34 12 228
229 11 11 33 8 229
230 12 11 35 11 230
231 13 11 30 14 231
232 10 11 38 9 232
233 16 11 34 15 233
234 18 11 33 13 234
235 13 11 32 16 235
236 11 11 31 11 236
237 4 11 30 12 237
238 13 11 27 13 238
239 16 11 31 10 239
240 10 11 30 11 240
241 12 11 32 12 241
242 12 11 35 8 242
243 10 11 28 12 243
244 13 11 33 12 244
245 15 11 31 15 245
246 12 11 35 11 246
247 14 11 35 13 247
248 10 11 32 14 248
249 12 11 21 10 249
250 12 11 20 12 250
251 11 11 34 15 251
252 10 11 32 13 252
253 12 11 34 13 253
254 16 11 32 13 254
255 12 11 33 12 255
256 14 11 33 12 256
257 16 11 37 9 257
258 14 11 32 9 258
259 13 11 34 15 259
260 4 11 30 10 260
261 15 11 30 14 261
262 11 11 38 15 262
263 11 11 36 7 263
264 14 11 32 14 264
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) month Zelfstandig Stressbestendig
1.80788 0.81553 0.14901 0.11992
t
-0.01843
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-8.320 -1.332 0.110 1.480 5.263
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.807883 4.471368 0.404 0.686308
month 0.815532 0.480408 1.698 0.090788 .
Zelfstandig 0.149007 0.036606 4.071 6.23e-05 ***
Stressbestendig 0.119922 0.055807 2.149 0.032572 *
t -0.018432 0.005001 -3.686 0.000278 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.173 on 259 degrees of freedom
Multiple R-squared: 0.2293, Adjusted R-squared: 0.2174
F-statistic: 19.27 on 4 and 259 DF, p-value: 6.876e-14
> 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.8290929503 0.3418140994 0.1709070
[2,] 0.7257933480 0.5484133039 0.2742067
[3,] 0.6333247301 0.7333505397 0.3666753
[4,] 0.5190733308 0.9618533383 0.4809267
[5,] 0.4989273202 0.9978546404 0.5010727
[6,] 0.4499879121 0.8999758242 0.5500121
[7,] 0.3821358173 0.7642716347 0.6178642
[8,] 0.3609036212 0.7218072424 0.6390964
[9,] 0.3370756889 0.6741513779 0.6629243
[10,] 0.2932928097 0.5865856193 0.7067072
[11,] 0.4945916438 0.9891832876 0.5054084
[12,] 0.4285553805 0.8571107609 0.5714446
[13,] 0.3626793861 0.7253587722 0.6373206
[14,] 0.2976662344 0.5953324688 0.7023338
[15,] 0.2495400217 0.4990800433 0.7504600
[16,] 0.2270959786 0.4541919573 0.7729040
[17,] 0.2119638908 0.4239277817 0.7880361
[18,] 0.1660370817 0.3320741634 0.8339629
[19,] 0.1303735965 0.2607471930 0.8696264
[20,] 0.1076853047 0.2153706094 0.8923147
[21,] 0.1137042438 0.2274084876 0.8862958
[22,] 0.0888307329 0.1776614658 0.9111693
[23,] 0.1075855505 0.2151711010 0.8924144
[24,] 0.0883164713 0.1766329426 0.9116835
[25,] 0.1687317803 0.3374635605 0.8312682
[26,] 0.1481549343 0.2963098687 0.8518451
[27,] 0.1166755353 0.2333510705 0.8833245
[28,] 0.0962107964 0.1924215928 0.9037892
[29,] 0.2803818197 0.5607636394 0.7196182
[30,] 0.4236460049 0.8472920099 0.5763540
[31,] 0.3749278197 0.7498556393 0.6250722
[32,] 0.3595328546 0.7190657091 0.6404671
[33,] 0.3354338862 0.6708677723 0.6645661
[34,] 0.3105539496 0.6211078991 0.6894461
[35,] 0.2728578854 0.5457157708 0.7271421
[36,] 0.5001574885 0.9996850230 0.4998425
[37,] 0.4563371432 0.9126742864 0.5436629
[38,] 0.4078509768 0.8157019536 0.5921490
[39,] 0.4992362968 0.9984725937 0.5007637
[40,] 0.4742607242 0.9485214485 0.5257393
[41,] 0.4281285349 0.8562570698 0.5718715
[42,] 0.3845425461 0.7690850923 0.6154575
[43,] 0.3410636914 0.6821273828 0.6589363
[44,] 0.3023032408 0.6046064816 0.6976968
[45,] 0.2632499087 0.5264998174 0.7367501
[46,] 0.2573862433 0.5147724866 0.7426138
[47,] 0.2338317335 0.4676634670 0.7661683
[48,] 0.3930341360 0.7860682721 0.6069659
[49,] 0.3561866061 0.7123732121 0.6438134
[50,] 0.3339488993 0.6678977986 0.6660511
[51,] 0.3147629722 0.6295259444 0.6852370
[52,] 0.2820270212 0.5640540424 0.7179730
[53,] 0.2761024664 0.5522049328 0.7238975
[54,] 0.2464891452 0.4929782904 0.7535109
[55,] 0.2343846931 0.4687693862 0.7656153
[56,] 0.2241055515 0.4482111031 0.7758944
[57,] 0.1981058693 0.3962117385 0.8018941
[58,] 0.1894684459 0.3789368917 0.8105316
[59,] 0.2213598586 0.4427197171 0.7786401
[60,] 0.1993032828 0.3986065656 0.8006967
[61,] 0.1807995944 0.3615991887 0.8192004
[62,] 0.2201395454 0.4402790908 0.7798605
[63,] 0.2062717822 0.4125435644 0.7937282
[64,] 0.4495004177 0.8990008353 0.5504996
[65,] 0.4225155109 0.8450310218 0.5774845
[66,] 0.4244673541 0.8489347082 0.5755326
[67,] 0.4140138662 0.8280277324 0.5859861
[68,] 0.3780474549 0.7560949098 0.6219525
[69,] 0.4169026611 0.8338053221 0.5830973
[70,] 0.3942592423 0.7885184845 0.6057408
[71,] 0.3570270704 0.7140541407 0.6429729
[72,] 0.3455862499 0.6911724999 0.6544138
[73,] 0.3179506894 0.6359013788 0.6820493
[74,] 0.3061529065 0.6123058130 0.6938471
[75,] 0.2729803616 0.5459607233 0.7270196
[76,] 0.2470499991 0.4940999983 0.7529500
[77,] 0.2183305892 0.4366611783 0.7816694
[78,] 0.1926971753 0.3853943507 0.8073028
[79,] 0.1712307844 0.3424615687 0.8287692
[80,] 0.1478427709 0.2956855419 0.8521572
[81,] 0.1291319716 0.2582639431 0.8708680
[82,] 0.1100696161 0.2201392321 0.8899304
[83,] 0.1123576344 0.2247152687 0.8876424
[84,] 0.0999524460 0.1999048920 0.9000476
[85,] 0.0891184542 0.1782369085 0.9108815
[86,] 0.0797560964 0.1595121928 0.9202439
[87,] 0.0711041910 0.1422083820 0.9288958
[88,] 0.0654454698 0.1308909395 0.9345545
[89,] 0.0545364199 0.1090728398 0.9454636
[90,] 0.0468527805 0.0937055611 0.9531472
[91,] 0.0413862108 0.0827724217 0.9586138
[92,] 0.0371624969 0.0743249937 0.9628375
[93,] 0.0305874462 0.0611748924 0.9694126
[94,] 0.0247848629 0.0495697258 0.9752151
[95,] 0.0613247077 0.1226494154 0.9386753
[96,] 0.0521656897 0.1043313794 0.9478343
[97,] 0.0520027144 0.1040054287 0.9479973
[98,] 0.0598892901 0.1197785802 0.9401107
[99,] 0.0680309401 0.1360618802 0.9319691
[100,] 0.0578309662 0.1156619325 0.9421690
[101,] 0.0481119111 0.0962238222 0.9518881
[102,] 0.0536980339 0.1073960678 0.9463020
[103,] 0.0448946489 0.0897892978 0.9551054
[104,] 0.0385552144 0.0771104288 0.9614448
[105,] 0.0422081351 0.0844162701 0.9577919
[106,] 0.0469019400 0.0938038799 0.9530981
[107,] 0.0524073766 0.1048147532 0.9475926
[108,] 0.0588615300 0.1177230600 0.9411385
[109,] 0.0503782063 0.1007564126 0.9496218
[110,] 0.0457647619 0.0915295238 0.9542352
[111,] 0.0483444653 0.0966889305 0.9516555
[112,] 0.0423993519 0.0847987038 0.9576006
[113,] 0.0406704196 0.0813408391 0.9593296
[114,] 0.0356403622 0.0712807244 0.9643596
[115,] 0.0301418564 0.0602837128 0.9698581
[116,] 0.0250238675 0.0500477350 0.9749761
[117,] 0.0202490567 0.0404981134 0.9797509
[118,] 0.0187039328 0.0374078656 0.9812961
[119,] 0.0153655439 0.0307310877 0.9846345
[120,] 0.0161014197 0.0322028395 0.9838986
[121,] 0.0129932208 0.0259864416 0.9870068
[122,] 0.0177744379 0.0355488758 0.9822256
[123,] 0.0159867908 0.0319735816 0.9840132
[124,] 0.0289920289 0.0579840579 0.9710080
[125,] 0.0308131791 0.0616263583 0.9691868
[126,] 0.0358098708 0.0716197417 0.9641901
[127,] 0.0293959373 0.0587918746 0.9706041
[128,] 0.0239834028 0.0479668056 0.9760166
[129,] 0.0201132667 0.0402265333 0.9798867
[130,] 0.0235151946 0.0470303892 0.9764848
[131,] 0.0315035976 0.0630071952 0.9684964
[132,] 0.0305084955 0.0610169909 0.9694915
[133,] 0.0398843916 0.0797687833 0.9601156
[134,] 0.0377090033 0.0754180065 0.9622910
[135,] 0.0317165828 0.0634331656 0.9682834
[136,] 0.0321245619 0.0642491237 0.9678754
[137,] 0.0298175342 0.0596350684 0.9701825
[138,] 0.0335051088 0.0670102175 0.9664949
[139,] 0.0545313281 0.1090626562 0.9454687
[140,] 0.0457356147 0.0914712294 0.9542644
[141,] 0.0450528562 0.0901057124 0.9549471
[142,] 0.0375945605 0.0751891210 0.9624054
[143,] 0.0449230074 0.0898460149 0.9550770
[144,] 0.0372904343 0.0745808687 0.9627096
[145,] 0.0347814145 0.0695628291 0.9652186
[146,] 0.0305489883 0.0610979766 0.9694510
[147,] 0.0249733062 0.0499466123 0.9750267
[148,] 0.0325295139 0.0650590279 0.9674705
[149,] 0.0451004955 0.0902009909 0.9548995
[150,] 0.0393369445 0.0786738891 0.9606631
[151,] 0.0324260495 0.0648520990 0.9675740
[152,] 0.0395681503 0.0791363006 0.9604318
[153,] 0.0359147621 0.0718295243 0.9640852
[154,] 0.0298035289 0.0596070579 0.9701965
[155,] 0.0252601583 0.0505203166 0.9747398
[156,] 0.0226138443 0.0452276887 0.9773862
[157,] 0.0232912481 0.0465824962 0.9767088
[158,] 0.0187689714 0.0375379427 0.9812310
[159,] 0.0259889217 0.0519778433 0.9740111
[160,] 0.0211005037 0.0422010074 0.9788995
[161,] 0.0195061607 0.0390123213 0.9804938
[162,] 0.0170878105 0.0341756210 0.9829122
[163,] 0.0156741607 0.0313483214 0.9843258
[164,] 0.0137902678 0.0275805356 0.9862097
[165,] 0.0113072642 0.0226145285 0.9886927
[166,] 0.0104901736 0.0209803473 0.9895098
[167,] 0.0161024910 0.0322049820 0.9838975
[168,] 0.0144116216 0.0288232431 0.9855884
[169,] 0.0115833323 0.0231666646 0.9884167
[170,] 0.0102256684 0.0204513368 0.9897743
[171,] 0.0088925609 0.0177851217 0.9911074
[172,] 0.0068924025 0.0137848051 0.9931076
[173,] 0.0072750224 0.0145500449 0.9927250
[174,] 0.0061942133 0.0123884265 0.9938058
[175,] 0.0068267913 0.0136535825 0.9931732
[176,] 0.0133292331 0.0266584663 0.9866708
[177,] 0.0109927334 0.0219854668 0.9890073
[178,] 0.0373797168 0.0747594335 0.9626203
[179,] 0.0334014217 0.0668028434 0.9665986
[180,] 0.0368974194 0.0737948389 0.9631026
[181,] 0.0353306370 0.0706612741 0.9646694
[182,] 0.0376194857 0.0752389714 0.9623805
[183,] 0.0479637305 0.0959274610 0.9520363
[184,] 0.0394845154 0.0789690308 0.9605155
[185,] 0.0330965845 0.0661931689 0.9669034
[186,] 0.0343768289 0.0687536578 0.9656232
[187,] 0.0309114812 0.0618229624 0.9690885
[188,] 0.0268782182 0.0537564363 0.9731218
[189,] 0.0215033741 0.0430067482 0.9784966
[190,] 0.0205496016 0.0410992031 0.9794504
[191,] 0.0177417875 0.0354835750 0.9822582
[192,] 0.0140735679 0.0281471358 0.9859264
[193,] 0.0137617650 0.0275235300 0.9862382
[194,] 0.0164397990 0.0328795979 0.9835602
[195,] 0.0127859858 0.0255719716 0.9872140
[196,] 0.0158609674 0.0317219348 0.9841390
[197,] 0.0142813227 0.0285626454 0.9857187
[198,] 0.0112707001 0.0225414001 0.9887293
[199,] 0.0087016173 0.0174032345 0.9912984
[200,] 0.0076732484 0.0153464969 0.9923268
[201,] 0.0066594354 0.0133188708 0.9933406
[202,] 0.0072769718 0.0145539436 0.9927230
[203,] 0.0056660499 0.0113320997 0.9943340
[204,] 0.0044861954 0.0089723908 0.9955138
[205,] 0.0058036919 0.0116073838 0.9941963
[206,] 0.0044372618 0.0088745237 0.9955627
[207,] 0.0039792265 0.0079584530 0.9960208
[208,] 0.0042941905 0.0085883809 0.9957058
[209,] 0.0033665637 0.0067331274 0.9966334
[210,] 0.0040789844 0.0081579688 0.9959210
[211,] 0.0029922629 0.0059845258 0.9970077
[212,] 0.0021445590 0.0042891179 0.9978554
[213,] 0.0016481274 0.0032962548 0.9983519
[214,] 0.0011488861 0.0022977722 0.9988511
[215,] 0.0007994352 0.0015988705 0.9992006
[216,] 0.0009372616 0.0018745233 0.9990627
[217,] 0.0006580305 0.0013160610 0.9993420
[218,] 0.0004688125 0.0009376251 0.9995312
[219,] 0.0026494804 0.0052989607 0.9973505
[220,] 0.0018181763 0.0036363526 0.9981818
[221,] 0.0013476086 0.0026952171 0.9986524
[222,] 0.0009341238 0.0018682476 0.9990659
[223,] 0.0006261752 0.0012523504 0.9993738
[224,] 0.0003993719 0.0007987439 0.9996006
[225,] 0.0004512020 0.0009024040 0.9995488
[226,] 0.0004602235 0.0009204470 0.9995398
[227,] 0.0026781916 0.0053563831 0.9973218
[228,] 0.0018357267 0.0036714533 0.9981643
[229,] 0.0012151174 0.0024302347 0.9987849
[230,] 0.0513040825 0.1026081650 0.9486959
[231,] 0.0382727531 0.0765455061 0.9617272
[232,] 0.0655073667 0.1310147333 0.9344926
[233,] 0.0582908702 0.1165817404 0.9417091
[234,] 0.0421592745 0.0843185491 0.9578407
[235,] 0.0294246763 0.0588493527 0.9705753
[236,] 0.0273870810 0.0547741619 0.9726129
[237,] 0.0182615316 0.0365230632 0.9817385
[238,] 0.0165811215 0.0331622429 0.9834189
[239,] 0.0106544002 0.0213088005 0.9893456
[240,] 0.0076395469 0.0152790938 0.9923605
[241,] 0.0072258986 0.0144517972 0.9927741
[242,] 0.0043028800 0.0086057600 0.9956971
[243,] 0.0026917229 0.0053834458 0.9973083
[244,] 0.0022891578 0.0045783156 0.9977108
[245,] 0.0030943310 0.0061886620 0.9969057
[246,] 0.0028898885 0.0057797769 0.9971101
[247,] 0.0019148443 0.0038296885 0.9980852
[248,] 0.0010594258 0.0021188516 0.9989406
[249,] 0.0003751651 0.0007503303 0.9996248
> postscript(file="/var/www/rcomp/tmp/1jlac1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
> points(x[,1]-mysum$resid)
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/2w1hd1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/3j8fj1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/4rtmx1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/5cnkv1321984621.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
-3.47042665 -0.03764062 3.37322600 -0.43024993 -2.48753643 -2.51689119
7 8 9 10 11 12
3.68321563 -1.04338872 -1.99587190 -1.42446174 0.39717625 -0.27125830
13 14 15 16 17 18
0.67746753 -0.47065642 0.45693805 -0.44891161 -0.28147244 3.48314890
19 20 21 22 23 24
1.86134788 0.53397861 0.16355857 1.31946146 2.93507555 0.04434492
25 26 27 28 29 30
1.50621585 2.48402658 0.21598028 -0.82375761 0.67078098 -0.83109770
31 32 33 34 35 36
-0.11426303 -2.88507131 -1.19732155 0.16691155 -0.65168340 -5.32011795
37 38 39 40 41 42
-4.16421506 -1.16333176 0.91326996 1.11337678 1.04097125 -1.20952644
43 44 45 46 47 48
4.95791273 -0.69297320 -0.28927206 -3.83420151 -1.89148802 -0.12801983
49 50 51 52 53 54
0.05453837 -0.55329678 0.21132456 -0.33834079 -2.40716358 0.74630972
55 56 57 58 59 60
-5.34121484 -1.12957174 0.91794508 1.05629935 0.13648382 1.45293024
61 62 63 64 65 66
-1.15490491 1.36987173 1.47914110 -0.86219404 1.63234454 2.92328881
67 68 69 70 71 72
2.55924467 2.75576875 -2.15366366 -0.43209309 -5.96663941 -1.67927789
73 74 75 76 77 78
1.80129482 1.79064184 -0.48894075 2.85543742 1.54676993 -0.07746068
79 80 81 82 83 84
-1.68529584 1.09329138 1.94759701 0.38511895 -0.74545639 -0.25091781
85 86 87 88 89 90
0.73842921 -0.67619476 0.03025678 0.91364731 0.35001609 -2.06102514
91 92 93 94 95 96
1.31116151 1.40531185 -1.15716622 -1.08171766 1.75862211 0.52324345
97 98 99 100 101 102
1.17037203 1.54498826 -1.24336864 0.71689348 0.49548069 5.26253162
103 104 105 106 107 108
-0.49674037 2.46236858 -2.63796869 3.14304811 0.87500181 0.41732706
109 110 111 112 113 114
-2.36860025 0.60678090 1.21765908 2.86478766 -2.54868315 -2.45811556
115 116 117 118 119 120
2.93161970 -0.51208917 -1.44587058 -2.42743866 1.33602953 -1.79454581
121 122 123 124 125 126
1.31472356 -0.41661669 0.69380584 -0.13875499 1.92272770 0.88298982
127 128 129 130 131 132
2.57073958 -0.45387927 -3.22827030 1.71687279 -4.02485059 2.62227799
133 134 135 136 137 138
-2.82386047 0.23762222 0.06399611 -0.69642904 2.96466541 -3.31376402
139 140 141 142 143 144
-1.93556505 -3.24781528 1.86145408 0.78904855 2.24053636 1.79682749
145 146 147 148 149 150
-2.51657590 4.18987563 -0.19566343 2.08131496 -0.27513920 -3.04594748
151 152 153 154 155 156
0.08997720 1.76619068 1.27584829 -0.37503764 -3.28447005 3.58495462
157 158 159 160 161 162
-1.26157208 0.30625533 2.64025037 -2.11543888 -0.91891480 0.13382476
163 164 165 166 167 168
-1.32743273 2.40810372 0.25202622 -3.50839893 -0.29675583 -1.84642118
169 170 171 172 173 174
-1.40531650 1.76212267 -1.56524659 0.95953005 -1.88456706 -3.85575202
175 176 177 178 179 180
-1.64410892 0.69103928 -1.51282488 -1.40713826 -0.01740300 -2.29340285
181 182 183 184 185 186
1.51426927 -2.45333294 4.43121076 1.16559404 -5.45978973 1.72635121
187 188 189 190 191 192
2.92287529 -1.73159339 -2.02629500 -2.96007641 0.05835551 1.12099136
193 194 195 196 197 198
-1.93744830 1.96464401 -0.75157721 0.73257824 2.55421623 1.67860463
199 200 201 202 203 204
1.01259967 2.58042708 3.37656292 0.67546072 -2.69495931 -1.34584524
205 206 207 208 209 210
1.13472747 0.85514488 1.84449189 1.77208636 -2.40269290 1.25597196
211 212 213 214 215 216
-0.88613966 -3.34624399 1.01683595 2.19824100 2.64972880 1.67854385
217 218 219 220 221 222
2.96705853 0.49426476 0.08322353 0.66616997 0.05833482 0.03013322
223 224 225 226 227 228
2.36412826 -1.21705158 -0.07511456 -5.89613911 0.35855477 0.91842864
229 230 231 232 233 234
-1.43444278 -1.07379242 0.32990871 -3.24410564 2.65082118 5.05810505
235 236 237 238 239 240
-0.13422283 -1.36717190 -8.31965508 1.02587625 3.80804621 -2.14443697
241 242 243 244 245 246
-0.54394191 -0.49284235 -1.91104906 0.36234659 2.31902596 -0.77888173
247 248 249 250 251 252
0.99970549 -2.65476319 1.48243793 1.41003239 -2.01740429 -2.46111316
253 254 255 256 257 258
-0.74069575 3.57575067 -0.43490231 1.58352961 3.36569957 2.12916775
259 260 261 262 263 264
0.13005106 -7.65587625 2.88286626 -2.41068220 -1.13485696 1.64014751
> postscript(file="/var/www/rcomp/tmp/6xu5f1321984621.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 -3.47042665 NA
1 -0.03764062 -3.47042665
2 3.37322600 -0.03764062
3 -0.43024993 3.37322600
4 -2.48753643 -0.43024993
5 -2.51689119 -2.48753643
6 3.68321563 -2.51689119
7 -1.04338872 3.68321563
8 -1.99587190 -1.04338872
9 -1.42446174 -1.99587190
10 0.39717625 -1.42446174
11 -0.27125830 0.39717625
12 0.67746753 -0.27125830
13 -0.47065642 0.67746753
14 0.45693805 -0.47065642
15 -0.44891161 0.45693805
16 -0.28147244 -0.44891161
17 3.48314890 -0.28147244
18 1.86134788 3.48314890
19 0.53397861 1.86134788
20 0.16355857 0.53397861
21 1.31946146 0.16355857
22 2.93507555 1.31946146
23 0.04434492 2.93507555
24 1.50621585 0.04434492
25 2.48402658 1.50621585
26 0.21598028 2.48402658
27 -0.82375761 0.21598028
28 0.67078098 -0.82375761
29 -0.83109770 0.67078098
30 -0.11426303 -0.83109770
31 -2.88507131 -0.11426303
32 -1.19732155 -2.88507131
33 0.16691155 -1.19732155
34 -0.65168340 0.16691155
35 -5.32011795 -0.65168340
36 -4.16421506 -5.32011795
37 -1.16333176 -4.16421506
38 0.91326996 -1.16333176
39 1.11337678 0.91326996
40 1.04097125 1.11337678
41 -1.20952644 1.04097125
42 4.95791273 -1.20952644
43 -0.69297320 4.95791273
44 -0.28927206 -0.69297320
45 -3.83420151 -0.28927206
46 -1.89148802 -3.83420151
47 -0.12801983 -1.89148802
48 0.05453837 -0.12801983
49 -0.55329678 0.05453837
50 0.21132456 -0.55329678
51 -0.33834079 0.21132456
52 -2.40716358 -0.33834079
53 0.74630972 -2.40716358
54 -5.34121484 0.74630972
55 -1.12957174 -5.34121484
56 0.91794508 -1.12957174
57 1.05629935 0.91794508
58 0.13648382 1.05629935
59 1.45293024 0.13648382
60 -1.15490491 1.45293024
61 1.36987173 -1.15490491
62 1.47914110 1.36987173
63 -0.86219404 1.47914110
64 1.63234454 -0.86219404
65 2.92328881 1.63234454
66 2.55924467 2.92328881
67 2.75576875 2.55924467
68 -2.15366366 2.75576875
69 -0.43209309 -2.15366366
70 -5.96663941 -0.43209309
71 -1.67927789 -5.96663941
72 1.80129482 -1.67927789
73 1.79064184 1.80129482
74 -0.48894075 1.79064184
75 2.85543742 -0.48894075
76 1.54676993 2.85543742
77 -0.07746068 1.54676993
78 -1.68529584 -0.07746068
79 1.09329138 -1.68529584
80 1.94759701 1.09329138
81 0.38511895 1.94759701
82 -0.74545639 0.38511895
83 -0.25091781 -0.74545639
84 0.73842921 -0.25091781
85 -0.67619476 0.73842921
86 0.03025678 -0.67619476
87 0.91364731 0.03025678
88 0.35001609 0.91364731
89 -2.06102514 0.35001609
90 1.31116151 -2.06102514
91 1.40531185 1.31116151
92 -1.15716622 1.40531185
93 -1.08171766 -1.15716622
94 1.75862211 -1.08171766
95 0.52324345 1.75862211
96 1.17037203 0.52324345
97 1.54498826 1.17037203
98 -1.24336864 1.54498826
99 0.71689348 -1.24336864
100 0.49548069 0.71689348
101 5.26253162 0.49548069
102 -0.49674037 5.26253162
103 2.46236858 -0.49674037
104 -2.63796869 2.46236858
105 3.14304811 -2.63796869
106 0.87500181 3.14304811
107 0.41732706 0.87500181
108 -2.36860025 0.41732706
109 0.60678090 -2.36860025
110 1.21765908 0.60678090
111 2.86478766 1.21765908
112 -2.54868315 2.86478766
113 -2.45811556 -2.54868315
114 2.93161970 -2.45811556
115 -0.51208917 2.93161970
116 -1.44587058 -0.51208917
117 -2.42743866 -1.44587058
118 1.33602953 -2.42743866
119 -1.79454581 1.33602953
120 1.31472356 -1.79454581
121 -0.41661669 1.31472356
122 0.69380584 -0.41661669
123 -0.13875499 0.69380584
124 1.92272770 -0.13875499
125 0.88298982 1.92272770
126 2.57073958 0.88298982
127 -0.45387927 2.57073958
128 -3.22827030 -0.45387927
129 1.71687279 -3.22827030
130 -4.02485059 1.71687279
131 2.62227799 -4.02485059
132 -2.82386047 2.62227799
133 0.23762222 -2.82386047
134 0.06399611 0.23762222
135 -0.69642904 0.06399611
136 2.96466541 -0.69642904
137 -3.31376402 2.96466541
138 -1.93556505 -3.31376402
139 -3.24781528 -1.93556505
140 1.86145408 -3.24781528
141 0.78904855 1.86145408
142 2.24053636 0.78904855
143 1.79682749 2.24053636
144 -2.51657590 1.79682749
145 4.18987563 -2.51657590
146 -0.19566343 4.18987563
147 2.08131496 -0.19566343
148 -0.27513920 2.08131496
149 -3.04594748 -0.27513920
150 0.08997720 -3.04594748
151 1.76619068 0.08997720
152 1.27584829 1.76619068
153 -0.37503764 1.27584829
154 -3.28447005 -0.37503764
155 3.58495462 -3.28447005
156 -1.26157208 3.58495462
157 0.30625533 -1.26157208
158 2.64025037 0.30625533
159 -2.11543888 2.64025037
160 -0.91891480 -2.11543888
161 0.13382476 -0.91891480
162 -1.32743273 0.13382476
163 2.40810372 -1.32743273
164 0.25202622 2.40810372
165 -3.50839893 0.25202622
166 -0.29675583 -3.50839893
167 -1.84642118 -0.29675583
168 -1.40531650 -1.84642118
169 1.76212267 -1.40531650
170 -1.56524659 1.76212267
171 0.95953005 -1.56524659
172 -1.88456706 0.95953005
173 -3.85575202 -1.88456706
174 -1.64410892 -3.85575202
175 0.69103928 -1.64410892
176 -1.51282488 0.69103928
177 -1.40713826 -1.51282488
178 -0.01740300 -1.40713826
179 -2.29340285 -0.01740300
180 1.51426927 -2.29340285
181 -2.45333294 1.51426927
182 4.43121076 -2.45333294
183 1.16559404 4.43121076
184 -5.45978973 1.16559404
185 1.72635121 -5.45978973
186 2.92287529 1.72635121
187 -1.73159339 2.92287529
188 -2.02629500 -1.73159339
189 -2.96007641 -2.02629500
190 0.05835551 -2.96007641
191 1.12099136 0.05835551
192 -1.93744830 1.12099136
193 1.96464401 -1.93744830
194 -0.75157721 1.96464401
195 0.73257824 -0.75157721
196 2.55421623 0.73257824
197 1.67860463 2.55421623
198 1.01259967 1.67860463
199 2.58042708 1.01259967
200 3.37656292 2.58042708
201 0.67546072 3.37656292
202 -2.69495931 0.67546072
203 -1.34584524 -2.69495931
204 1.13472747 -1.34584524
205 0.85514488 1.13472747
206 1.84449189 0.85514488
207 1.77208636 1.84449189
208 -2.40269290 1.77208636
209 1.25597196 -2.40269290
210 -0.88613966 1.25597196
211 -3.34624399 -0.88613966
212 1.01683595 -3.34624399
213 2.19824100 1.01683595
214 2.64972880 2.19824100
215 1.67854385 2.64972880
216 2.96705853 1.67854385
217 0.49426476 2.96705853
218 0.08322353 0.49426476
219 0.66616997 0.08322353
220 0.05833482 0.66616997
221 0.03013322 0.05833482
222 2.36412826 0.03013322
223 -1.21705158 2.36412826
224 -0.07511456 -1.21705158
225 -5.89613911 -0.07511456
226 0.35855477 -5.89613911
227 0.91842864 0.35855477
228 -1.43444278 0.91842864
229 -1.07379242 -1.43444278
230 0.32990871 -1.07379242
231 -3.24410564 0.32990871
232 2.65082118 -3.24410564
233 5.05810505 2.65082118
234 -0.13422283 5.05810505
235 -1.36717190 -0.13422283
236 -8.31965508 -1.36717190
237 1.02587625 -8.31965508
238 3.80804621 1.02587625
239 -2.14443697 3.80804621
240 -0.54394191 -2.14443697
241 -0.49284235 -0.54394191
242 -1.91104906 -0.49284235
243 0.36234659 -1.91104906
244 2.31902596 0.36234659
245 -0.77888173 2.31902596
246 0.99970549 -0.77888173
247 -2.65476319 0.99970549
248 1.48243793 -2.65476319
249 1.41003239 1.48243793
250 -2.01740429 1.41003239
251 -2.46111316 -2.01740429
252 -0.74069575 -2.46111316
253 3.57575067 -0.74069575
254 -0.43490231 3.57575067
255 1.58352961 -0.43490231
256 3.36569957 1.58352961
257 2.12916775 3.36569957
258 0.13005106 2.12916775
259 -7.65587625 0.13005106
260 2.88286626 -7.65587625
261 -2.41068220 2.88286626
262 -1.13485696 -2.41068220
263 1.64014751 -1.13485696
264 NA 1.64014751
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -0.03764062 -3.47042665
[2,] 3.37322600 -0.03764062
[3,] -0.43024993 3.37322600
[4,] -2.48753643 -0.43024993
[5,] -2.51689119 -2.48753643
[6,] 3.68321563 -2.51689119
[7,] -1.04338872 3.68321563
[8,] -1.99587190 -1.04338872
[9,] -1.42446174 -1.99587190
[10,] 0.39717625 -1.42446174
[11,] -0.27125830 0.39717625
[12,] 0.67746753 -0.27125830
[13,] -0.47065642 0.67746753
[14,] 0.45693805 -0.47065642
[15,] -0.44891161 0.45693805
[16,] -0.28147244 -0.44891161
[17,] 3.48314890 -0.28147244
[18,] 1.86134788 3.48314890
[19,] 0.53397861 1.86134788
[20,] 0.16355857 0.53397861
[21,] 1.31946146 0.16355857
[22,] 2.93507555 1.31946146
[23,] 0.04434492 2.93507555
[24,] 1.50621585 0.04434492
[25,] 2.48402658 1.50621585
[26,] 0.21598028 2.48402658
[27,] -0.82375761 0.21598028
[28,] 0.67078098 -0.82375761
[29,] -0.83109770 0.67078098
[30,] -0.11426303 -0.83109770
[31,] -2.88507131 -0.11426303
[32,] -1.19732155 -2.88507131
[33,] 0.16691155 -1.19732155
[34,] -0.65168340 0.16691155
[35,] -5.32011795 -0.65168340
[36,] -4.16421506 -5.32011795
[37,] -1.16333176 -4.16421506
[38,] 0.91326996 -1.16333176
[39,] 1.11337678 0.91326996
[40,] 1.04097125 1.11337678
[41,] -1.20952644 1.04097125
[42,] 4.95791273 -1.20952644
[43,] -0.69297320 4.95791273
[44,] -0.28927206 -0.69297320
[45,] -3.83420151 -0.28927206
[46,] -1.89148802 -3.83420151
[47,] -0.12801983 -1.89148802
[48,] 0.05453837 -0.12801983
[49,] -0.55329678 0.05453837
[50,] 0.21132456 -0.55329678
[51,] -0.33834079 0.21132456
[52,] -2.40716358 -0.33834079
[53,] 0.74630972 -2.40716358
[54,] -5.34121484 0.74630972
[55,] -1.12957174 -5.34121484
[56,] 0.91794508 -1.12957174
[57,] 1.05629935 0.91794508
[58,] 0.13648382 1.05629935
[59,] 1.45293024 0.13648382
[60,] -1.15490491 1.45293024
[61,] 1.36987173 -1.15490491
[62,] 1.47914110 1.36987173
[63,] -0.86219404 1.47914110
[64,] 1.63234454 -0.86219404
[65,] 2.92328881 1.63234454
[66,] 2.55924467 2.92328881
[67,] 2.75576875 2.55924467
[68,] -2.15366366 2.75576875
[69,] -0.43209309 -2.15366366
[70,] -5.96663941 -0.43209309
[71,] -1.67927789 -5.96663941
[72,] 1.80129482 -1.67927789
[73,] 1.79064184 1.80129482
[74,] -0.48894075 1.79064184
[75,] 2.85543742 -0.48894075
[76,] 1.54676993 2.85543742
[77,] -0.07746068 1.54676993
[78,] -1.68529584 -0.07746068
[79,] 1.09329138 -1.68529584
[80,] 1.94759701 1.09329138
[81,] 0.38511895 1.94759701
[82,] -0.74545639 0.38511895
[83,] -0.25091781 -0.74545639
[84,] 0.73842921 -0.25091781
[85,] -0.67619476 0.73842921
[86,] 0.03025678 -0.67619476
[87,] 0.91364731 0.03025678
[88,] 0.35001609 0.91364731
[89,] -2.06102514 0.35001609
[90,] 1.31116151 -2.06102514
[91,] 1.40531185 1.31116151
[92,] -1.15716622 1.40531185
[93,] -1.08171766 -1.15716622
[94,] 1.75862211 -1.08171766
[95,] 0.52324345 1.75862211
[96,] 1.17037203 0.52324345
[97,] 1.54498826 1.17037203
[98,] -1.24336864 1.54498826
[99,] 0.71689348 -1.24336864
[100,] 0.49548069 0.71689348
[101,] 5.26253162 0.49548069
[102,] -0.49674037 5.26253162
[103,] 2.46236858 -0.49674037
[104,] -2.63796869 2.46236858
[105,] 3.14304811 -2.63796869
[106,] 0.87500181 3.14304811
[107,] 0.41732706 0.87500181
[108,] -2.36860025 0.41732706
[109,] 0.60678090 -2.36860025
[110,] 1.21765908 0.60678090
[111,] 2.86478766 1.21765908
[112,] -2.54868315 2.86478766
[113,] -2.45811556 -2.54868315
[114,] 2.93161970 -2.45811556
[115,] -0.51208917 2.93161970
[116,] -1.44587058 -0.51208917
[117,] -2.42743866 -1.44587058
[118,] 1.33602953 -2.42743866
[119,] -1.79454581 1.33602953
[120,] 1.31472356 -1.79454581
[121,] -0.41661669 1.31472356
[122,] 0.69380584 -0.41661669
[123,] -0.13875499 0.69380584
[124,] 1.92272770 -0.13875499
[125,] 0.88298982 1.92272770
[126,] 2.57073958 0.88298982
[127,] -0.45387927 2.57073958
[128,] -3.22827030 -0.45387927
[129,] 1.71687279 -3.22827030
[130,] -4.02485059 1.71687279
[131,] 2.62227799 -4.02485059
[132,] -2.82386047 2.62227799
[133,] 0.23762222 -2.82386047
[134,] 0.06399611 0.23762222
[135,] -0.69642904 0.06399611
[136,] 2.96466541 -0.69642904
[137,] -3.31376402 2.96466541
[138,] -1.93556505 -3.31376402
[139,] -3.24781528 -1.93556505
[140,] 1.86145408 -3.24781528
[141,] 0.78904855 1.86145408
[142,] 2.24053636 0.78904855
[143,] 1.79682749 2.24053636
[144,] -2.51657590 1.79682749
[145,] 4.18987563 -2.51657590
[146,] -0.19566343 4.18987563
[147,] 2.08131496 -0.19566343
[148,] -0.27513920 2.08131496
[149,] -3.04594748 -0.27513920
[150,] 0.08997720 -3.04594748
[151,] 1.76619068 0.08997720
[152,] 1.27584829 1.76619068
[153,] -0.37503764 1.27584829
[154,] -3.28447005 -0.37503764
[155,] 3.58495462 -3.28447005
[156,] -1.26157208 3.58495462
[157,] 0.30625533 -1.26157208
[158,] 2.64025037 0.30625533
[159,] -2.11543888 2.64025037
[160,] -0.91891480 -2.11543888
[161,] 0.13382476 -0.91891480
[162,] -1.32743273 0.13382476
[163,] 2.40810372 -1.32743273
[164,] 0.25202622 2.40810372
[165,] -3.50839893 0.25202622
[166,] -0.29675583 -3.50839893
[167,] -1.84642118 -0.29675583
[168,] -1.40531650 -1.84642118
[169,] 1.76212267 -1.40531650
[170,] -1.56524659 1.76212267
[171,] 0.95953005 -1.56524659
[172,] -1.88456706 0.95953005
[173,] -3.85575202 -1.88456706
[174,] -1.64410892 -3.85575202
[175,] 0.69103928 -1.64410892
[176,] -1.51282488 0.69103928
[177,] -1.40713826 -1.51282488
[178,] -0.01740300 -1.40713826
[179,] -2.29340285 -0.01740300
[180,] 1.51426927 -2.29340285
[181,] -2.45333294 1.51426927
[182,] 4.43121076 -2.45333294
[183,] 1.16559404 4.43121076
[184,] -5.45978973 1.16559404
[185,] 1.72635121 -5.45978973
[186,] 2.92287529 1.72635121
[187,] -1.73159339 2.92287529
[188,] -2.02629500 -1.73159339
[189,] -2.96007641 -2.02629500
[190,] 0.05835551 -2.96007641
[191,] 1.12099136 0.05835551
[192,] -1.93744830 1.12099136
[193,] 1.96464401 -1.93744830
[194,] -0.75157721 1.96464401
[195,] 0.73257824 -0.75157721
[196,] 2.55421623 0.73257824
[197,] 1.67860463 2.55421623
[198,] 1.01259967 1.67860463
[199,] 2.58042708 1.01259967
[200,] 3.37656292 2.58042708
[201,] 0.67546072 3.37656292
[202,] -2.69495931 0.67546072
[203,] -1.34584524 -2.69495931
[204,] 1.13472747 -1.34584524
[205,] 0.85514488 1.13472747
[206,] 1.84449189 0.85514488
[207,] 1.77208636 1.84449189
[208,] -2.40269290 1.77208636
[209,] 1.25597196 -2.40269290
[210,] -0.88613966 1.25597196
[211,] -3.34624399 -0.88613966
[212,] 1.01683595 -3.34624399
[213,] 2.19824100 1.01683595
[214,] 2.64972880 2.19824100
[215,] 1.67854385 2.64972880
[216,] 2.96705853 1.67854385
[217,] 0.49426476 2.96705853
[218,] 0.08322353 0.49426476
[219,] 0.66616997 0.08322353
[220,] 0.05833482 0.66616997
[221,] 0.03013322 0.05833482
[222,] 2.36412826 0.03013322
[223,] -1.21705158 2.36412826
[224,] -0.07511456 -1.21705158
[225,] -5.89613911 -0.07511456
[226,] 0.35855477 -5.89613911
[227,] 0.91842864 0.35855477
[228,] -1.43444278 0.91842864
[229,] -1.07379242 -1.43444278
[230,] 0.32990871 -1.07379242
[231,] -3.24410564 0.32990871
[232,] 2.65082118 -3.24410564
[233,] 5.05810505 2.65082118
[234,] -0.13422283 5.05810505
[235,] -1.36717190 -0.13422283
[236,] -8.31965508 -1.36717190
[237,] 1.02587625 -8.31965508
[238,] 3.80804621 1.02587625
[239,] -2.14443697 3.80804621
[240,] -0.54394191 -2.14443697
[241,] -0.49284235 -0.54394191
[242,] -1.91104906 -0.49284235
[243,] 0.36234659 -1.91104906
[244,] 2.31902596 0.36234659
[245,] -0.77888173 2.31902596
[246,] 0.99970549 -0.77888173
[247,] -2.65476319 0.99970549
[248,] 1.48243793 -2.65476319
[249,] 1.41003239 1.48243793
[250,] -2.01740429 1.41003239
[251,] -2.46111316 -2.01740429
[252,] -0.74069575 -2.46111316
[253,] 3.57575067 -0.74069575
[254,] -0.43490231 3.57575067
[255,] 1.58352961 -0.43490231
[256,] 3.36569957 1.58352961
[257,] 2.12916775 3.36569957
[258,] 0.13005106 2.12916775
[259,] -7.65587625 0.13005106
[260,] 2.88286626 -7.65587625
[261,] -2.41068220 2.88286626
[262,] -1.13485696 -2.41068220
[263,] 1.64014751 -1.13485696
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -0.03764062 -3.47042665
2 3.37322600 -0.03764062
3 -0.43024993 3.37322600
4 -2.48753643 -0.43024993
5 -2.51689119 -2.48753643
6 3.68321563 -2.51689119
7 -1.04338872 3.68321563
8 -1.99587190 -1.04338872
9 -1.42446174 -1.99587190
10 0.39717625 -1.42446174
11 -0.27125830 0.39717625
12 0.67746753 -0.27125830
13 -0.47065642 0.67746753
14 0.45693805 -0.47065642
15 -0.44891161 0.45693805
16 -0.28147244 -0.44891161
17 3.48314890 -0.28147244
18 1.86134788 3.48314890
19 0.53397861 1.86134788
20 0.16355857 0.53397861
21 1.31946146 0.16355857
22 2.93507555 1.31946146
23 0.04434492 2.93507555
24 1.50621585 0.04434492
25 2.48402658 1.50621585
26 0.21598028 2.48402658
27 -0.82375761 0.21598028
28 0.67078098 -0.82375761
29 -0.83109770 0.67078098
30 -0.11426303 -0.83109770
31 -2.88507131 -0.11426303
32 -1.19732155 -2.88507131
33 0.16691155 -1.19732155
34 -0.65168340 0.16691155
35 -5.32011795 -0.65168340
36 -4.16421506 -5.32011795
37 -1.16333176 -4.16421506
38 0.91326996 -1.16333176
39 1.11337678 0.91326996
40 1.04097125 1.11337678
41 -1.20952644 1.04097125
42 4.95791273 -1.20952644
43 -0.69297320 4.95791273
44 -0.28927206 -0.69297320
45 -3.83420151 -0.28927206
46 -1.89148802 -3.83420151
47 -0.12801983 -1.89148802
48 0.05453837 -0.12801983
49 -0.55329678 0.05453837
50 0.21132456 -0.55329678
51 -0.33834079 0.21132456
52 -2.40716358 -0.33834079
53 0.74630972 -2.40716358
54 -5.34121484 0.74630972
55 -1.12957174 -5.34121484
56 0.91794508 -1.12957174
57 1.05629935 0.91794508
58 0.13648382 1.05629935
59 1.45293024 0.13648382
60 -1.15490491 1.45293024
61 1.36987173 -1.15490491
62 1.47914110 1.36987173
63 -0.86219404 1.47914110
64 1.63234454 -0.86219404
65 2.92328881 1.63234454
66 2.55924467 2.92328881
67 2.75576875 2.55924467
68 -2.15366366 2.75576875
69 -0.43209309 -2.15366366
70 -5.96663941 -0.43209309
71 -1.67927789 -5.96663941
72 1.80129482 -1.67927789
73 1.79064184 1.80129482
74 -0.48894075 1.79064184
75 2.85543742 -0.48894075
76 1.54676993 2.85543742
77 -0.07746068 1.54676993
78 -1.68529584 -0.07746068
79 1.09329138 -1.68529584
80 1.94759701 1.09329138
81 0.38511895 1.94759701
82 -0.74545639 0.38511895
83 -0.25091781 -0.74545639
84 0.73842921 -0.25091781
85 -0.67619476 0.73842921
86 0.03025678 -0.67619476
87 0.91364731 0.03025678
88 0.35001609 0.91364731
89 -2.06102514 0.35001609
90 1.31116151 -2.06102514
91 1.40531185 1.31116151
92 -1.15716622 1.40531185
93 -1.08171766 -1.15716622
94 1.75862211 -1.08171766
95 0.52324345 1.75862211
96 1.17037203 0.52324345
97 1.54498826 1.17037203
98 -1.24336864 1.54498826
99 0.71689348 -1.24336864
100 0.49548069 0.71689348
101 5.26253162 0.49548069
102 -0.49674037 5.26253162
103 2.46236858 -0.49674037
104 -2.63796869 2.46236858
105 3.14304811 -2.63796869
106 0.87500181 3.14304811
107 0.41732706 0.87500181
108 -2.36860025 0.41732706
109 0.60678090 -2.36860025
110 1.21765908 0.60678090
111 2.86478766 1.21765908
112 -2.54868315 2.86478766
113 -2.45811556 -2.54868315
114 2.93161970 -2.45811556
115 -0.51208917 2.93161970
116 -1.44587058 -0.51208917
117 -2.42743866 -1.44587058
118 1.33602953 -2.42743866
119 -1.79454581 1.33602953
120 1.31472356 -1.79454581
121 -0.41661669 1.31472356
122 0.69380584 -0.41661669
123 -0.13875499 0.69380584
124 1.92272770 -0.13875499
125 0.88298982 1.92272770
126 2.57073958 0.88298982
127 -0.45387927 2.57073958
128 -3.22827030 -0.45387927
129 1.71687279 -3.22827030
130 -4.02485059 1.71687279
131 2.62227799 -4.02485059
132 -2.82386047 2.62227799
133 0.23762222 -2.82386047
134 0.06399611 0.23762222
135 -0.69642904 0.06399611
136 2.96466541 -0.69642904
137 -3.31376402 2.96466541
138 -1.93556505 -3.31376402
139 -3.24781528 -1.93556505
140 1.86145408 -3.24781528
141 0.78904855 1.86145408
142 2.24053636 0.78904855
143 1.79682749 2.24053636
144 -2.51657590 1.79682749
145 4.18987563 -2.51657590
146 -0.19566343 4.18987563
147 2.08131496 -0.19566343
148 -0.27513920 2.08131496
149 -3.04594748 -0.27513920
150 0.08997720 -3.04594748
151 1.76619068 0.08997720
152 1.27584829 1.76619068
153 -0.37503764 1.27584829
154 -3.28447005 -0.37503764
155 3.58495462 -3.28447005
156 -1.26157208 3.58495462
157 0.30625533 -1.26157208
158 2.64025037 0.30625533
159 -2.11543888 2.64025037
160 -0.91891480 -2.11543888
161 0.13382476 -0.91891480
162 -1.32743273 0.13382476
163 2.40810372 -1.32743273
164 0.25202622 2.40810372
165 -3.50839893 0.25202622
166 -0.29675583 -3.50839893
167 -1.84642118 -0.29675583
168 -1.40531650 -1.84642118
169 1.76212267 -1.40531650
170 -1.56524659 1.76212267
171 0.95953005 -1.56524659
172 -1.88456706 0.95953005
173 -3.85575202 -1.88456706
174 -1.64410892 -3.85575202
175 0.69103928 -1.64410892
176 -1.51282488 0.69103928
177 -1.40713826 -1.51282488
178 -0.01740300 -1.40713826
179 -2.29340285 -0.01740300
180 1.51426927 -2.29340285
181 -2.45333294 1.51426927
182 4.43121076 -2.45333294
183 1.16559404 4.43121076
184 -5.45978973 1.16559404
185 1.72635121 -5.45978973
186 2.92287529 1.72635121
187 -1.73159339 2.92287529
188 -2.02629500 -1.73159339
189 -2.96007641 -2.02629500
190 0.05835551 -2.96007641
191 1.12099136 0.05835551
192 -1.93744830 1.12099136
193 1.96464401 -1.93744830
194 -0.75157721 1.96464401
195 0.73257824 -0.75157721
196 2.55421623 0.73257824
197 1.67860463 2.55421623
198 1.01259967 1.67860463
199 2.58042708 1.01259967
200 3.37656292 2.58042708
201 0.67546072 3.37656292
202 -2.69495931 0.67546072
203 -1.34584524 -2.69495931
204 1.13472747 -1.34584524
205 0.85514488 1.13472747
206 1.84449189 0.85514488
207 1.77208636 1.84449189
208 -2.40269290 1.77208636
209 1.25597196 -2.40269290
210 -0.88613966 1.25597196
211 -3.34624399 -0.88613966
212 1.01683595 -3.34624399
213 2.19824100 1.01683595
214 2.64972880 2.19824100
215 1.67854385 2.64972880
216 2.96705853 1.67854385
217 0.49426476 2.96705853
218 0.08322353 0.49426476
219 0.66616997 0.08322353
220 0.05833482 0.66616997
221 0.03013322 0.05833482
222 2.36412826 0.03013322
223 -1.21705158 2.36412826
224 -0.07511456 -1.21705158
225 -5.89613911 -0.07511456
226 0.35855477 -5.89613911
227 0.91842864 0.35855477
228 -1.43444278 0.91842864
229 -1.07379242 -1.43444278
230 0.32990871 -1.07379242
231 -3.24410564 0.32990871
232 2.65082118 -3.24410564
233 5.05810505 2.65082118
234 -0.13422283 5.05810505
235 -1.36717190 -0.13422283
236 -8.31965508 -1.36717190
237 1.02587625 -8.31965508
238 3.80804621 1.02587625
239 -2.14443697 3.80804621
240 -0.54394191 -2.14443697
241 -0.49284235 -0.54394191
242 -1.91104906 -0.49284235
243 0.36234659 -1.91104906
244 2.31902596 0.36234659
245 -0.77888173 2.31902596
246 0.99970549 -0.77888173
247 -2.65476319 0.99970549
248 1.48243793 -2.65476319
249 1.41003239 1.48243793
250 -2.01740429 1.41003239
251 -2.46111316 -2.01740429
252 -0.74069575 -2.46111316
253 3.57575067 -0.74069575
254 -0.43490231 3.57575067
255 1.58352961 -0.43490231
256 3.36569957 1.58352961
257 2.12916775 3.36569957
258 0.13005106 2.12916775
259 -7.65587625 0.13005106
260 2.88286626 -7.65587625
261 -2.41068220 2.88286626
262 -1.13485696 -2.41068220
263 1.64014751 -1.13485696
> plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
> lines(lowess(z))
> abline(lm(z))
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/7greb1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/8jci31321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/rcomp/tmp/9xsgu1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/rcomp/tmp/10ux8d1321984621.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/rcomp/createtable")
>
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
> a<-table.row.end(a)
> myeq <- colnames(x)[1]
> myeq <- paste(myeq, '[t] = ', sep='')
> for (i in 1:k){
+ if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
+ myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
+ if (rownames(mysum$coefficients)[i] != '(Intercept)') {
+ myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
+ if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
+ }
+ }
> myeq <- paste(myeq, ' + e[t]')
> a<-table.row.start(a)
> a<-table.element(a, myeq)
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/116nwx1321984621.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a,'Variable',header=TRUE)
> a<-table.element(a,'Parameter',header=TRUE)
> a<-table.element(a,'S.D.',header=TRUE)
> a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE)
> a<-table.element(a,'2-tail p-value',header=TRUE)
> a<-table.element(a,'1-tail p-value',header=TRUE)
> a<-table.row.end(a)
> for (i in 1:k){
+ a<-table.row.start(a)
+ a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
+ a<-table.element(a,mysum$coefficients[i,1])
+ a<-table.element(a, round(mysum$coefficients[i,2],6))
+ a<-table.element(a, round(mysum$coefficients[i,3],4))
+ a<-table.element(a, round(mysum$coefficients[i,4],6))
+ a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/12hiuu1321984621.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple R',1,TRUE)
> a<-table.element(a, sqrt(mysum$r.squared))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'R-squared',1,TRUE)
> a<-table.element(a, mysum$r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Adjusted R-squared',1,TRUE)
> a<-table.element(a, mysum$adj.r.squared)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (value)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[1])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[2])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
> a<-table.element(a, mysum$fstatistic[3])
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'p-value',1,TRUE)
> a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
> a<-table.element(a, mysum$sigma)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
> a<-table.element(a, sum(myerror*myerror))
> a<-table.row.end(a)
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/136fp31321984621.tab")
> a<-table.start()
> a<-table.row.start(a)
> a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
> a<-table.row.end(a)
> a<-table.row.start(a)
> a<-table.element(a, 'Time or Index', 1, TRUE)
> a<-table.element(a, 'Actuals', 1, TRUE)
> a<-table.element(a, 'Interpolation
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE)
> a<-table.row.end(a)
> for (i in 1:n) {
+ a<-table.row.start(a)
+ a<-table.element(a,i, 1, TRUE)
+ a<-table.element(a,x[i])
+ a<-table.element(a,x[i]-mysum$resid[i])
+ a<-table.element(a,mysum$resid[i])
+ a<-table.row.end(a)
+ }
> a<-table.end(a)
> table.save(a,file="/var/www/rcomp/tmp/14avjq1321984621.tab")
> if (n > n25) {
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'p-values',header=TRUE)
+ a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'breakpoint index',header=TRUE)
+ a<-table.element(a,'greater',header=TRUE)
+ a<-table.element(a,'2-sided',header=TRUE)
+ a<-table.element(a,'less',header=TRUE)
+ a<-table.row.end(a)
+ for (mypoint in kp3:nmkm3) {
+ a<-table.row.start(a)
+ a<-table.element(a,mypoint,header=TRUE)
+ a<-table.element(a,gqarr[mypoint-kp3+1,1])
+ a<-table.element(a,gqarr[mypoint-kp3+1,2])
+ a<-table.element(a,gqarr[mypoint-kp3+1,3])
+ a<-table.row.end(a)
+ }
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/15my161321984621.tab")
+ a<-table.start()
+ a<-table.row.start(a)
+ a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'Description',header=TRUE)
+ a<-table.element(a,'# significant tests',header=TRUE)
+ a<-table.element(a,'% significant tests',header=TRUE)
+ a<-table.element(a,'OK/NOK',header=TRUE)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'1% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant1)
+ a<-table.element(a,numsignificant1/numgqtests)
+ if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'5% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant5)
+ a<-table.element(a,numsignificant5/numgqtests)
+ if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.row.start(a)
+ a<-table.element(a,'10% type I error level',header=TRUE)
+ a<-table.element(a,numsignificant10)
+ a<-table.element(a,numsignificant10/numgqtests)
+ if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
+ a<-table.element(a,dum)
+ a<-table.row.end(a)
+ a<-table.end(a)
+ table.save(a,file="/var/www/rcomp/tmp/16ak981321984621.tab")
+ }
>
> try(system("convert tmp/1jlac1321984621.ps tmp/1jlac1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/2w1hd1321984621.ps tmp/2w1hd1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/3j8fj1321984621.ps tmp/3j8fj1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/4rtmx1321984621.ps tmp/4rtmx1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/5cnkv1321984621.ps tmp/5cnkv1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/6xu5f1321984621.ps tmp/6xu5f1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/7greb1321984621.ps tmp/7greb1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/8jci31321984621.ps tmp/8jci31321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/9xsgu1321984621.ps tmp/9xsgu1321984621.png",intern=TRUE))
character(0)
> try(system("convert tmp/10ux8d1321984621.ps tmp/10ux8d1321984621.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
9.156 0.628 9.787