R version 2.8.0 (2008-10-20)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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(70.5
+ ,0
+ ,71.3
+ ,0
+ ,71.4
+ ,0
+ ,70.1
+ ,0
+ ,69.4
+ ,0
+ ,69.8
+ ,0
+ ,69.8
+ ,0
+ ,70.7
+ ,0
+ ,69.4
+ ,0
+ ,69.8
+ ,0
+ ,69.3
+ ,0
+ ,72.9
+ ,0
+ ,70.0
+ ,0
+ ,64.4
+ ,0
+ ,63.5
+ ,0
+ ,69.8
+ ,0
+ ,69.9
+ ,0
+ ,69.3
+ ,0
+ ,69.7
+ ,0
+ ,69.8
+ ,0
+ ,70.2
+ ,0
+ ,69.8
+ ,0
+ ,70.7
+ ,0
+ ,71.4
+ ,0
+ ,70.3
+ ,0
+ ,70.9
+ ,0
+ ,70.6
+ ,0
+ ,69.0
+ ,0
+ ,71.0
+ ,0
+ ,74.7
+ ,0
+ ,77.5
+ ,0
+ ,78.6
+ ,0
+ ,75.3
+ ,0
+ ,72.1
+ ,0
+ ,73.8
+ ,0
+ ,73.7
+ ,0
+ ,75.2
+ ,0
+ ,75.2
+ ,0
+ ,74.5
+ ,0
+ ,74.4
+ ,0
+ ,75.4
+ ,0
+ ,73.7
+ ,0
+ ,74.3
+ ,0
+ ,75.0
+ ,0
+ ,75.8
+ ,0
+ ,76.7
+ ,0
+ ,76.8
+ ,0
+ ,76.8
+ ,0
+ ,76.4
+ ,0
+ ,76.4
+ ,0
+ ,77.2
+ ,0
+ ,77.2
+ ,0
+ ,77.4
+ ,0
+ ,78.1
+ ,0
+ ,78.5
+ ,0
+ ,77.9
+ ,0
+ ,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+ ,1
+ ,114.2
+ ,1
+ ,114.0
+ ,1
+ ,111.7
+ ,1
+ ,114.2
+ ,1
+ ,114.7
+ ,1
+ ,116.5
+ ,1
+ ,116.2
+ ,1
+ ,116.2
+ ,1
+ ,117.4
+ ,1
+ ,117.4
+ ,1
+ ,118.2
+ ,1
+ ,116.4
+ ,1
+ ,117.3
+ ,1
+ ,117.1
+ ,1
+ ,116.5
+ ,1
+ ,117.4
+ ,1
+ ,118.2
+ ,1
+ ,118.4
+ ,1
+ ,116.9
+ ,1
+ ,116.3
+ ,1
+ ,116.8
+ ,1
+ ,114.9
+ ,1)
+ ,dim=c(2
+ ,225)
+ ,dimnames=list(c('Y'
+ ,'D')
+ ,1:225))
> y <- array(NA,dim=c(2,225),dimnames=list(c('Y','D'),1:225))
> 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'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from package:base :
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
Y D M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 70.5 0 1 0 0 0 0 0 0 0 0 0 0 1
2 71.3 0 0 1 0 0 0 0 0 0 0 0 0 2
3 71.4 0 0 0 1 0 0 0 0 0 0 0 0 3
4 70.1 0 0 0 0 1 0 0 0 0 0 0 0 4
5 69.4 0 0 0 0 0 1 0 0 0 0 0 0 5
6 69.8 0 0 0 0 0 0 1 0 0 0 0 0 6
7 69.8 0 0 0 0 0 0 0 1 0 0 0 0 7
8 70.7 0 0 0 0 0 0 0 0 1 0 0 0 8
9 69.4 0 0 0 0 0 0 0 0 0 1 0 0 9
10 69.8 0 0 0 0 0 0 0 0 0 0 1 0 10
11 69.3 0 0 0 0 0 0 0 0 0 0 0 1 11
12 72.9 0 0 0 0 0 0 0 0 0 0 0 0 12
13 70.0 0 1 0 0 0 0 0 0 0 0 0 0 13
14 64.4 0 0 1 0 0 0 0 0 0 0 0 0 14
15 63.5 0 0 0 1 0 0 0 0 0 0 0 0 15
16 69.8 0 0 0 0 1 0 0 0 0 0 0 0 16
17 69.9 0 0 0 0 0 1 0 0 0 0 0 0 17
18 69.3 0 0 0 0 0 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0 0 0 0 0 1 0 82
83 85.2 0 0 0 0 0 0 0 0 0 0 0 1 83
84 86.4 0 0 0 0 0 0 0 0 0 0 0 0 84
85 88.2 0 1 0 0 0 0 0 0 0 0 0 0 85
86 88.3 0 0 1 0 0 0 0 0 0 0 0 0 86
87 88.0 0 0 0 1 0 0 0 0 0 0 0 0 87
88 87.8 0 0 0 0 1 0 0 0 0 0 0 0 88
89 87.4 0 0 0 0 0 1 0 0 0 0 0 0 89
90 87.4 0 0 0 0 0 0 1 0 0 0 0 0 90
91 88.0 0 0 0 0 0 0 0 1 0 0 0 0 91
92 88.0 0 0 0 0 0 0 0 0 1 0 0 0 92
93 89.9 0 0 0 0 0 0 0 0 0 1 0 0 93
94 88.4 0 0 0 0 0 0 0 0 0 0 1 0 94
95 89.7 0 0 0 0 0 0 0 0 0 0 0 1 95
96 89.9 0 0 0 0 0 0 0 0 0 0 0 0 96
97 90.5 0 1 0 0 0 0 0 0 0 0 0 0 97
98 90.7 0 0 1 0 0 0 0 0 0 0 0 0 98
99 89.5 0 0 0 1 0 0 0 0 0 0 0 0 99
100 91.2 0 0 0 0 1 0 0 0 0 0 0 0 100
101 91.2 0 0 0 0 0 1 0 0 0 0 0 0 101
102 89.8 0 0 0 0 0 0 1 0 0 0 0 0 102
103 89.6 0 0 0 0 0 0 0 1 0 0 0 0 103
104 92.3 0 0 0 0 0 0 0 0 1 0 0 0 104
105 90.1 0 0 0 0 0 0 0 0 0 1 0 0 105
106 92.9 0 0 0 0 0 0 0 0 0 0 1 0 106
107 93.3 0 0 0 0 0 0 0 0 0 0 0 1 107
108 93.5 0 0 0 0 0 0 0 0 0 0 0 0 108
109 93.4 0 1 0 0 0 0 0 0 0 0 0 0 109
110 93.6 0 0 1 0 0 0 0 0 0 0 0 0 110
111 93.7 0 0 0 1 0 0 0 0 0 0 0 0 111
112 93.6 0 0 0 0 1 0 0 0 0 0 0 0 112
113 93.0 0 0 0 0 0 1 0 0 0 0 0 0 113
114 94.1 0 0 0 0 0 0 1 0 0 0 0 0 114
115 95.7 0 0 0 0 0 0 0 1 0 0 0 0 115
116 95.6 0 0 0 0 0 0 0 0 1 0 0 0 116
117 97.2 0 0 0 0 0 0 0 0 0 1 0 0 117
118 98.1 0 0 0 0 0 0 0 0 0 0 1 0 118
119 98.8 0 0 0 0 0 0 0 0 0 0 0 1 119
120 95.3 0 0 0 0 0 0 0 0 0 0 0 0 120
121 95.3 0 1 0 0 0 0 0 0 0 0 0 0 121
122 96.7 0 0 1 0 0 0 0 0 0 0 0 0 122
123 99.2 0 0 0 1 0 0 0 0 0 0 0 0 123
124 99.0 0 0 0 0 1 0 0 0 0 0 0 0 124
125 100.9 0 0 0 0 0 1 0 0 0 0 0 0 125
126 100.1 0 0 0 0 0 0 1 0 0 0 0 0 126
127 100.4 0 0 0 0 0 0 0 1 0 0 0 0 127
128 100.5 0 0 0 0 0 0 0 0 1 0 0 0 128
129 102.6 0 0 0 0 0 0 0 0 0 1 0 0 129
130 101.8 0 0 0 0 0 0 0 0 0 0 1 0 130
131 102.6 0 0 0 0 0 0 0 0 0 0 0 1 131
132 101.0 0 0 0 0 0 0 0 0 0 0 0 0 132
133 101.6 0 1 0 0 0 0 0 0 0 0 0 0 133
134 100.6 0 0 1 0 0 0 0 0 0 0 0 0 134
135 100.4 0 0 0 1 0 0 0 0 0 0 0 0 135
136 100.7 0 0 0 0 1 0 0 0 0 0 0 0 136
137 100.6 0 0 0 0 0 1 0 0 0 0 0 0 137
138 100.3 0 0 0 0 0 0 1 0 0 0 0 0 138
139 101.4 0 0 0 0 0 0 0 1 0 0 0 0 139
140 103.2 0 0 0 0 0 0 0 0 1 0 0 0 140
141 79.2 1 0 0 0 0 0 0 0 0 1 0 0 141
142 83.4 1 0 0 0 0 0 0 0 0 0 1 0 142
143 86.5 1 0 0 0 0 0 0 0 0 0 0 1 143
144 91.3 1 0 0 0 0 0 0 0 0 0 0 0 144
145 91.5 1 1 0 0 0 0 0 0 0 0 0 0 145
146 93.1 1 0 1 0 0 0 0 0 0 0 0 0 146
147 93.1 1 0 0 1 0 0 0 0 0 0 0 0 147
148 93.3 1 0 0 0 1 0 0 0 0 0 0 0 148
149 94.4 1 0 0 0 0 1 0 0 0 0 0 0 149
150 94.4 1 0 0 0 0 0 1 0 0 0 0 0 150
151 94.1 1 0 0 0 0 0 0 1 0 0 0 0 151
152 95.3 1 0 0 0 0 0 0 0 1 0 0 0 152
153 93.8 1 0 0 0 0 0 0 0 0 1 0 0 153
154 96.3 1 0 0 0 0 0 0 0 0 0 1 0 154
155 96.0 1 0 0 0 0 0 0 0 0 0 0 1 155
156 97.6 1 0 0 0 0 0 0 0 0 0 0 0 156
157 96.8 1 1 0 0 0 0 0 0 0 0 0 0 157
158 95.0 1 0 1 0 0 0 0 0 0 0 0 0 158
159 93.7 1 0 0 1 0 0 0 0 0 0 0 0 159
160 91.0 1 0 0 0 1 0 0 0 0 0 0 0 160
161 92.2 1 0 0 0 0 1 0 0 0 0 0 0 161
162 93.6 1 0 0 0 0 0 1 0 0 0 0 0 162
163 97.2 1 0 0 0 0 0 0 1 0 0 0 0 163
164 97.1 1 0 0 0 0 0 0 0 1 0 0 0 164
165 98.2 1 0 0 0 0 0 0 0 0 1 0 0 165
166 98.3 1 0 0 0 0 0 0 0 0 0 1 0 166
167 99.8 1 0 0 0 0 0 0 0 0 0 0 1 167
168 100.5 1 0 0 0 0 0 0 0 0 0 0 0 168
169 99.2 1 1 0 0 0 0 0 0 0 0 0 0 169
170 101.0 1 0 1 0 0 0 0 0 0 0 0 0 170
171 102.1 1 0 0 1 0 0 0 0 0 0 0 0 171
172 102.8 1 0 0 0 1 0 0 0 0 0 0 0 172
173 102.5 1 0 0 0 0 1 0 0 0 0 0 0 173
174 104.2 1 0 0 0 0 0 1 0 0 0 0 0 174
175 104.3 1 0 0 0 0 0 0 1 0 0 0 0 175
176 105.3 1 0 0 0 0 0 0 0 1 0 0 0 176
177 105.1 1 0 0 0 0 0 0 0 0 1 0 0 177
178 107.4 1 0 0 0 0 0 0 0 0 0 1 0 178
179 106.4 1 0 0 0 0 0 0 0 0 0 0 1 179
180 106.4 1 0 0 0 0 0 0 0 0 0 0 0 180
181 107.9 1 1 0 0 0 0 0 0 0 0 0 0 181
182 107.8 1 0 1 0 0 0 0 0 0 0 0 0 182
183 108.3 1 0 0 1 0 0 0 0 0 0 0 0 183
184 108.3 1 0 0 0 1 0 0 0 0 0 0 0 184
185 109.2 1 0 0 0 0 1 0 0 0 0 0 0 185
186 109.3 1 0 0 0 0 0 1 0 0 0 0 0 186
187 109.3 1 0 0 0 0 0 0 1 0 0 0 0 187
188 109.6 1 0 0 0 0 0 0 0 1 0 0 0 188
189 111.1 1 0 0 0 0 0 0 0 0 1 0 0 189
190 109.0 1 0 0 0 0 0 0 0 0 0 1 0 190
191 109.8 1 0 0 0 0 0 0 0 0 0 0 1 191
192 108.8 1 0 0 0 0 0 0 0 0 0 0 0 192
193 110.9 1 1 0 0 0 0 0 0 0 0 0 0 193
194 110.2 1 0 1 0 0 0 0 0 0 0 0 0 194
195 111.3 1 0 0 1 0 0 0 0 0 0 0 0 195
196 111.6 1 0 0 0 1 0 0 0 0 0 0 0 196
197 112.3 1 0 0 0 0 1 0 0 0 0 0 0 197
198 111.2 1 0 0 0 0 0 1 0 0 0 0 0 198
199 111.7 1 0 0 0 0 0 0 1 0 0 0 0 199
200 111.7 1 0 0 0 0 0 0 0 1 0 0 0 200
201 112.7 1 0 0 0 0 0 0 0 0 1 0 0 201
202 113.2 1 0 0 0 0 0 0 0 0 0 1 0 202
203 113.0 1 0 0 0 0 0 0 0 0 0 0 1 203
204 114.2 1 0 0 0 0 0 0 0 0 0 0 0 204
205 114.0 1 1 0 0 0 0 0 0 0 0 0 0 205
206 111.7 1 0 1 0 0 0 0 0 0 0 0 0 206
207 114.2 1 0 0 1 0 0 0 0 0 0 0 0 207
208 114.7 1 0 0 0 1 0 0 0 0 0 0 0 208
209 116.5 1 0 0 0 0 1 0 0 0 0 0 0 209
210 116.2 1 0 0 0 0 0 1 0 0 0 0 0 210
211 116.2 1 0 0 0 0 0 0 1 0 0 0 0 211
212 117.4 1 0 0 0 0 0 0 0 1 0 0 0 212
213 117.4 1 0 0 0 0 0 0 0 0 1 0 0 213
214 118.2 1 0 0 0 0 0 0 0 0 0 1 0 214
215 116.4 1 0 0 0 0 0 0 0 0 0 0 1 215
216 117.3 1 0 0 0 0 0 0 0 0 0 0 0 216
217 117.1 1 1 0 0 0 0 0 0 0 0 0 0 217
218 116.5 1 0 1 0 0 0 0 0 0 0 0 0 218
219 117.4 1 0 0 1 0 0 0 0 0 0 0 0 219
220 118.2 1 0 0 0 1 0 0 0 0 0 0 0 220
221 118.4 1 0 0 0 0 1 0 0 0 0 0 0 221
222 116.9 1 0 0 0 0 0 1 0 0 0 0 0 222
223 116.3 1 0 0 0 0 0 0 1 0 0 0 0 223
224 116.8 1 0 0 0 0 0 0 0 1 0 0 0 224
225 114.9 1 0 0 0 0 0 0 0 0 1 0 0 225
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) D M1 M2 M3 M4
63.93216 -9.40780 0.08121 -0.39904 -0.43192 -0.50691
M5 M6 M7 M8 M9 M10
-0.28716 -0.46215 -0.12661 0.18788 -0.79197 -0.47283
M11 t
-0.30308 0.28025
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-14.0478 -1.4244 -0.2504 1.8210 7.2064
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 63.932161 0.760024 84.119 <2e-16 ***
D -9.407799 0.698854 -13.462 <2e-16 ***
M1 0.081214 0.906293 0.090 0.929
M2 -0.399037 0.906227 -0.440 0.660
M3 -0.431920 0.906191 -0.477 0.634
M4 -0.506908 0.906185 -0.559 0.576
M5 -0.287160 0.906209 -0.317 0.752
M6 -0.462148 0.906264 -0.510 0.611
M7 -0.126610 0.906348 -0.140 0.889
M8 0.187876 0.906462 0.207 0.836
M9 -0.791965 0.906238 -0.874 0.383
M10 -0.472831 0.918374 -0.515 0.607
M11 -0.303082 0.918329 -0.330 0.742
t 0.280251 0.005217 53.718 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.755 on 211 degrees of freedom
Multiple R-squared: 0.9676, Adjusted R-squared: 0.9656
F-statistic: 485.2 on 13 and 211 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.860536203 2.789276e-01 1.394638e-01
[2,] 0.796737519 4.065250e-01 2.032625e-01
[3,] 0.731345256 5.373095e-01 2.686547e-01
[4,] 0.634777594 7.304448e-01 3.652224e-01
[5,] 0.590795034 8.184099e-01 4.092050e-01
[6,] 0.508800465 9.823991e-01 4.911995e-01
[7,] 0.477944558 9.558891e-01 5.220554e-01
[8,] 0.386470398 7.729408e-01 6.135296e-01
[9,] 0.333952273 6.679045e-01 6.660477e-01
[10,] 0.428610306 8.572206e-01 5.713897e-01
[11,] 0.470206731 9.404135e-01 5.297933e-01
[12,] 0.392847690 7.856954e-01 6.071523e-01
[13,] 0.339985049 6.799701e-01 6.600150e-01
[14,] 0.496143279 9.922866e-01 5.038567e-01
[15,] 0.800187120 3.996258e-01 1.998129e-01
[16,] 0.947444354 1.051113e-01 5.255565e-02
[17,] 0.960343916 7.931217e-02 3.965608e-02
[18,] 0.945708546 1.085829e-01 5.429145e-02
[19,] 0.935650469 1.286991e-01 6.434953e-02
[20,] 0.917674260 1.646515e-01 8.232574e-02
[21,] 0.912428768 1.751425e-01 8.757123e-02
[22,] 0.921611979 1.567760e-01 7.838802e-02
[23,] 0.918777368 1.624453e-01 8.122263e-02
[24,] 0.903420696 1.931586e-01 9.657930e-02
[25,] 0.892515357 2.149693e-01 1.074846e-01
[26,] 0.872077630 2.558447e-01 1.279224e-01
[27,] 0.853590953 2.928181e-01 1.464090e-01
[28,] 0.833215671 3.335687e-01 1.667843e-01
[29,] 0.811318199 3.773636e-01 1.886818e-01
[30,] 0.812430502 3.751390e-01 1.875695e-01
[31,] 0.799445185 4.011096e-01 2.005548e-01
[32,] 0.769791092 4.604178e-01 2.302089e-01
[33,] 0.733926938 5.321461e-01 2.660731e-01
[34,] 0.703221918 5.935562e-01 2.967781e-01
[35,] 0.696408568 6.071829e-01 3.035914e-01
[36,] 0.670876150 6.582477e-01 3.291239e-01
[37,] 0.636999214 7.260016e-01 3.630008e-01
[38,] 0.612569766 7.748605e-01 3.874302e-01
[39,] 0.582106381 8.357872e-01 4.178936e-01
[40,] 0.543413323 9.131734e-01 4.565867e-01
[41,] 0.515401149 9.691977e-01 4.845989e-01
[42,] 0.523763858 9.524723e-01 4.762361e-01
[43,] 0.530029350 9.399413e-01 4.699706e-01
[44,] 0.523533635 9.529327e-01 4.764664e-01
[45,] 0.506657870 9.866843e-01 4.933421e-01
[46,] 0.473137590 9.462752e-01 5.268624e-01
[47,] 0.437287050 8.745741e-01 5.627129e-01
[48,] 0.399598701 7.991974e-01 6.004013e-01
[49,] 0.356353790 7.127076e-01 6.436462e-01
[50,] 0.318438374 6.368767e-01 6.815616e-01
[51,] 0.283947265 5.678945e-01 7.160527e-01
[52,] 0.252683072 5.053661e-01 7.473169e-01
[53,] 0.220224747 4.404495e-01 7.797753e-01
[54,] 0.187901674 3.758033e-01 8.120983e-01
[55,] 0.159072364 3.181447e-01 8.409276e-01
[56,] 0.134854961 2.697099e-01 8.651450e-01
[57,] 0.111923391 2.238468e-01 8.880766e-01
[58,] 0.135956982 2.719140e-01 8.640430e-01
[59,] 0.163211930 3.264239e-01 8.367881e-01
[60,] 0.151138453 3.022769e-01 8.488615e-01
[61,] 0.147750769 2.955015e-01 8.522492e-01
[62,] 0.153148450 3.062969e-01 8.468516e-01
[63,] 0.144487902 2.889758e-01 8.555121e-01
[64,] 0.132631696 2.652634e-01 8.673683e-01
[65,] 0.129650579 2.593012e-01 8.703494e-01
[66,] 0.128673387 2.573468e-01 8.713266e-01
[67,] 0.111700264 2.234005e-01 8.882997e-01
[68,] 0.099860363 1.997207e-01 9.001396e-01
[69,] 0.120592236 2.411845e-01 8.794078e-01
[70,] 0.154177550 3.083551e-01 8.458225e-01
[71,] 0.176716266 3.534325e-01 8.232837e-01
[72,] 0.183315482 3.666310e-01 8.166845e-01
[73,] 0.169430610 3.388612e-01 8.305694e-01
[74,] 0.152516795 3.050336e-01 8.474832e-01
[75,] 0.136277494 2.725550e-01 8.637225e-01
[76,] 0.116826700 2.336534e-01 8.831733e-01
[77,] 0.134919891 2.698398e-01 8.650801e-01
[78,] 0.118357030 2.367141e-01 8.816430e-01
[79,] 0.112717726 2.254355e-01 8.872823e-01
[80,] 0.100031440 2.000629e-01 8.999686e-01
[81,] 0.092450396 1.849008e-01 9.075496e-01
[82,] 0.090630117 1.812602e-01 9.093699e-01
[83,] 0.076966607 1.539332e-01 9.230334e-01
[84,] 0.076823748 1.536475e-01 9.231763e-01
[85,] 0.071254497 1.425090e-01 9.287455e-01
[86,] 0.058345336 1.166907e-01 9.416547e-01
[87,] 0.048615422 9.723084e-02 9.513846e-01
[88,] 0.042984261 8.596852e-02 9.570157e-01
[89,] 0.034848075 6.969615e-02 9.651519e-01
[90,] 0.033330166 6.666033e-02 9.666698e-01
[91,] 0.031096904 6.219381e-02 9.689031e-01
[92,] 0.026615216 5.323043e-02 9.733848e-01
[93,] 0.021842845 4.368569e-02 9.781572e-01
[94,] 0.018611752 3.722350e-02 9.813882e-01
[95,] 0.016123809 3.224762e-02 9.838762e-01
[96,] 0.013114561 2.622912e-02 9.868854e-01
[97,] 0.010463589 2.092718e-02 9.895364e-01
[98,] 0.008386272 1.677254e-02 9.916137e-01
[99,] 0.007584551 1.516910e-02 9.924154e-01
[100,] 0.006136888 1.227378e-02 9.938631e-01
[101,] 0.007605720 1.521144e-02 9.923943e-01
[102,] 0.010360267 2.072053e-02 9.896397e-01
[103,] 0.014600521 2.920104e-02 9.853995e-01
[104,] 0.012076040 2.415208e-02 9.879240e-01
[105,] 0.010278621 2.055724e-02 9.897214e-01
[106,] 0.008138085 1.627617e-02 9.918619e-01
[107,] 0.009795279 1.959056e-02 9.902047e-01
[108,] 0.010128887 2.025777e-02 9.898711e-01
[109,] 0.015997071 3.199414e-02 9.840029e-01
[110,] 0.018140090 3.628018e-02 9.818599e-01
[111,] 0.018789980 3.757996e-02 9.812100e-01
[112,] 0.017591663 3.518333e-02 9.824083e-01
[113,] 0.035359545 7.071909e-02 9.646405e-01
[114,] 0.041186725 8.237345e-02 9.588133e-01
[115,] 0.053171933 1.063439e-01 9.468281e-01
[116,] 0.046038448 9.207690e-02 9.539616e-01
[117,] 0.041301272 8.260254e-02 9.586987e-01
[118,] 0.034172754 6.834551e-02 9.658272e-01
[119,] 0.027414001 5.482800e-02 9.725860e-01
[120,] 0.021861431 4.372286e-02 9.781386e-01
[121,] 0.017100091 3.420018e-02 9.828999e-01
[122,] 0.013502497 2.700499e-02 9.864975e-01
[123,] 0.010500295 2.100059e-02 9.894997e-01
[124,] 0.008358199 1.671640e-02 9.916418e-01
[125,] 0.079848964 1.596979e-01 9.201510e-01
[126,] 0.263999979 5.280000e-01 7.360000e-01
[127,] 0.399744531 7.994891e-01 6.002555e-01
[128,] 0.496532957 9.930659e-01 5.034670e-01
[129,] 0.533596265 9.328075e-01 4.664037e-01
[130,] 0.581177892 8.376442e-01 4.188221e-01
[131,] 0.596969947 8.060601e-01 4.030301e-01
[132,] 0.594836921 8.103262e-01 4.051631e-01
[133,] 0.598615824 8.027684e-01 4.013842e-01
[134,] 0.590240985 8.195180e-01 4.097590e-01
[135,] 0.560141106 8.797178e-01 4.398589e-01
[136,] 0.535462766 9.290745e-01 4.645372e-01
[137,] 0.506543001 9.869140e-01 4.934570e-01
[138,] 0.495224496 9.904490e-01 5.047755e-01
[139,] 0.465765025 9.315301e-01 5.342350e-01
[140,] 0.450704312 9.014086e-01 5.492957e-01
[141,] 0.416075312 8.321506e-01 5.839247e-01
[142,] 0.385823088 7.716462e-01 6.141769e-01
[143,] 0.435597414 8.711948e-01 5.644026e-01
[144,] 0.739744449 5.205111e-01 2.602556e-01
[145,] 0.935764947 1.284701e-01 6.423505e-02
[146,] 0.985903207 2.819359e-02 1.409679e-02
[147,] 0.988398018 2.320396e-02 1.160198e-02
[148,] 0.993529076 1.294185e-02 6.470924e-03
[149,] 0.995477099 9.045801e-03 4.522901e-03
[150,] 0.998823005 2.353989e-03 1.176995e-03
[151,] 0.999181986 1.636029e-03 8.180143e-04
[152,] 0.999351018 1.297963e-03 6.489816e-04
[153,] 0.999920234 1.595314e-04 7.976572e-05
[154,] 0.999936442 1.271166e-04 6.355828e-05
[155,] 0.999963009 7.398116e-05 3.699058e-05
[156,] 0.999977705 4.458950e-05 2.229475e-05
[157,] 0.999996824 6.352862e-06 3.176431e-06
[158,] 0.999997036 5.927957e-06 2.963979e-06
[159,] 0.999996796 6.407050e-06 3.203525e-06
[160,] 0.999995847 8.306738e-06 4.153369e-06
[161,] 0.999995879 8.242821e-06 4.121410e-06
[162,] 0.999994983 1.003358e-05 5.016789e-06
[163,] 0.999992722 1.455558e-05 7.277790e-06
[164,] 0.999990045 1.990984e-05 9.954919e-06
[165,] 0.999984671 3.065804e-05 1.532902e-05
[166,] 0.999978318 4.336379e-05 2.168190e-05
[167,] 0.999966119 6.776297e-05 3.388149e-05
[168,] 0.999948989 1.020213e-04 5.101063e-05
[169,] 0.999925775 1.484498e-04 7.422488e-05
[170,] 0.999879961 2.400784e-04 1.200392e-04
[171,] 0.999794550 4.109000e-04 2.054500e-04
[172,] 0.999635514 7.289728e-04 3.644864e-04
[173,] 0.999690654 6.186923e-04 3.093462e-04
[174,] 0.999687817 6.243652e-04 3.121826e-04
[175,] 0.999426479 1.147042e-03 5.735212e-04
[176,] 0.999544913 9.101745e-04 4.550873e-04
[177,] 0.999145296 1.709409e-03 8.547043e-04
[178,] 0.998351637 3.296726e-03 1.648363e-03
[179,] 0.996988409 6.023182e-03 3.011591e-03
[180,] 0.994841393 1.031721e-02 5.158607e-03
[181,] 0.991946340 1.610732e-02 8.053660e-03
[182,] 0.988179185 2.364163e-02 1.182082e-02
[183,] 0.979975725 4.004855e-02 2.002428e-02
[184,] 0.974344752 5.131050e-02 2.565525e-02
[185,] 0.955432237 8.913553e-02 4.456776e-02
[186,] 0.955809220 8.838156e-02 4.419078e-02
[187,] 0.932748804 1.345024e-01 6.725120e-02
[188,] 0.896462008 2.070760e-01 1.035380e-01
[189,] 0.845952466 3.080951e-01 1.540475e-01
[190,] 0.872657721 2.546846e-01 1.273423e-01
[191,] 0.841719681 3.165606e-01 1.582803e-01
[192,] 0.871842251 2.563155e-01 1.281577e-01
> postscript(file="/var/www/html/rcomp/tmp/1eq0h1227952310.ps",horizontal=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/html/rcomp/tmp/2uh3d1227952310.ps",horizontal=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/html/rcomp/tmp/3etft1227952310.ps",horizontal=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/html/rcomp/tmp/4ci4d1227952310.ps",horizontal=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/html/rcomp/tmp/52zf31227952310.ps",horizontal=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 = 225
Frequency = 1
1 2 3 4 5
6.206373839 7.206373839 7.059005418 5.553742260 4.353742260
6 7 8 9 10
4.648479102 4.032689629 4.337952787 3.737542339 3.538156640
11 12 13 14 15
2.588156640 5.604823307 2.343358093 -3.056641907 -4.204010328
16 17 18 19 20
1.890726515 1.490726515 0.785463357 0.569673883 0.074937041
21 22 23 24 25
1.174526593 0.175140894 0.625140894 0.741807561 -0.719657652
26 27 28 29 30
0.080342348 -0.467026073 -2.272289231 -0.772289231 2.822447611
31 32 33 34 35
5.006658137 5.511921295 2.911510847 -0.887874851 0.362125149
36 37 38 39 40
-0.321208185 0.817326602 1.017326602 0.069958181 -0.235304977
41 42 43 44 45
0.264695023 -1.540568135 -1.556357609 -1.451094451 0.048495101
46 47 48 49 50
0.349109403 -0.000890597 -0.584223930 -1.345689144 -1.145689144
51 52 53 54 55
-0.593057565 -0.798320723 -1.098320723 -0.503583881 -0.719373354
56 57 58 59 60
-1.914110196 -0.514520644 0.086093657 0.136093657 0.052760324
61 62 63 64 65
-0.608704889 -1.508704889 -1.856073310 -1.761336468 -2.661336468
66 67 68 69 70
-2.866599626 -2.782389100 -3.177125942 -1.977536390 -2.676922088
71 72 73 74 75
-2.426922088 -1.910255422 -2.971720635 -0.071720635 -0.219089056
76 77 78 79 80
-1.424352214 -1.024352214 -0.429615372 -0.945404846 -1.240141688
81 82 83 84 85
-0.440552136 -0.639937834 -1.689937834 -1.073271168 0.365263619
86 87 88 89 90
0.665263619 0.117895198 -0.287367960 -1.187367960 -1.292631118
91 92 93 94 95
-1.308420591 -1.903157433 0.696432119 -1.402953580 -0.552953580
96 97 98 99 100
-0.936286913 -0.697752127 -0.297752127 -1.745120548 -0.250383705
101 102 103 104 105
-0.750383705 -2.255646863 -3.071436337 -0.966173179 -2.466583627
106 107 108 109 110
-0.265969326 -0.315969326 -0.699302659 -1.160767872 -0.760767872
111 112 113 114 115
-0.908136293 -1.213399451 -2.313399451 -1.318662609 -0.334452083
116 117 118 119 120
-1.029188925 1.270400627 1.571014929 1.821014929 -2.262318405
121 122 123 124 125
-2.623783618 -1.023783618 1.228847961 0.823584803 2.223584803
126 127 128 129 130
1.318321645 1.002532172 0.507795329 3.307384881 1.907999183
131 132 133 134 135
2.257999183 0.074665850 0.313200636 -0.486799364 -0.934167785
136 137 138 139 140
-0.839430943 -1.439430943 -1.844694101 -1.360483574 -0.155220416
141 142 143 144 145
-14.047832354 -10.447218052 -7.797218052 -3.580551386 -3.742016599
146 147 148 149 150
-1.942016599 -2.189385020 -2.194648178 -1.594648178 -1.699911336
151 152 153 154 155
-2.615700810 -2.010437652 -2.810848100 -0.910233798 -1.660233798
156 157 158 159 160
-0.643567131 -1.805032345 -3.405032345 -4.952400766 -7.857663924
161 162 163 164 165
-7.157663924 -5.862927082 -2.878716555 -3.573453397 -1.773863845
166 167 168 169 170
-2.273249544 -1.223249544 -1.106582877 -2.768048090 -0.768048090
171 172 173 174 175
0.084583489 0.579320331 -0.220679669 1.374057173 0.858267699
176 177 178 179 180
1.263530857 1.763120409 3.463734710 2.013734710 1.430401377
181 182 183 184 185
2.568936164 2.668936164 2.921567743 2.716304585 3.116304585
186 187 188 189 190
3.111041427 2.495251953 2.200515111 4.400104663 1.700718965
191 192 193 194 195
2.050718965 0.467385631 2.205920418 1.705920418 2.558551997
196 197 198 199 200
2.653288839 2.853288839 1.648025681 1.532236208 0.937499366
201 202 203 204 205
2.637088918 2.537703219 1.887703219 2.504369886 1.942904672
206 207 208 209 210
-0.157095328 2.095536251 2.390273093 3.690273093 3.285009936
211 212 213 214 215
2.669220462 3.274483620 3.974073172 4.174687473 1.924687473
216 217 218 219 220
2.241354140 1.679888927 1.279888927 1.932520506 2.527257348
221 222 223 224 225
2.227257348 0.621994190 -0.593795284 -0.688532126 -1.888942574
> postscript(file="/var/www/html/rcomp/tmp/66h3u1227952310.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 225
Frequency = 1
lag(myerror, k = 1) myerror
0 6.206373839 NA
1 7.206373839 6.206373839
2 7.059005418 7.206373839
3 5.553742260 7.059005418
4 4.353742260 5.553742260
5 4.648479102 4.353742260
6 4.032689629 4.648479102
7 4.337952787 4.032689629
8 3.737542339 4.337952787
9 3.538156640 3.737542339
10 2.588156640 3.538156640
11 5.604823307 2.588156640
12 2.343358093 5.604823307
13 -3.056641907 2.343358093
14 -4.204010328 -3.056641907
15 1.890726515 -4.204010328
16 1.490726515 1.890726515
17 0.785463357 1.490726515
18 0.569673883 0.785463357
19 0.074937041 0.569673883
20 1.174526593 0.074937041
21 0.175140894 1.174526593
22 0.625140894 0.175140894
23 0.741807561 0.625140894
24 -0.719657652 0.741807561
25 0.080342348 -0.719657652
26 -0.467026073 0.080342348
27 -2.272289231 -0.467026073
28 -0.772289231 -2.272289231
29 2.822447611 -0.772289231
30 5.006658137 2.822447611
31 5.511921295 5.006658137
32 2.911510847 5.511921295
33 -0.887874851 2.911510847
34 0.362125149 -0.887874851
35 -0.321208185 0.362125149
36 0.817326602 -0.321208185
37 1.017326602 0.817326602
38 0.069958181 1.017326602
39 -0.235304977 0.069958181
40 0.264695023 -0.235304977
41 -1.540568135 0.264695023
42 -1.556357609 -1.540568135
43 -1.451094451 -1.556357609
44 0.048495101 -1.451094451
45 0.349109403 0.048495101
46 -0.000890597 0.349109403
47 -0.584223930 -0.000890597
48 -1.345689144 -0.584223930
49 -1.145689144 -1.345689144
50 -0.593057565 -1.145689144
51 -0.798320723 -0.593057565
52 -1.098320723 -0.798320723
53 -0.503583881 -1.098320723
54 -0.719373354 -0.503583881
55 -1.914110196 -0.719373354
56 -0.514520644 -1.914110196
57 0.086093657 -0.514520644
58 0.136093657 0.086093657
59 0.052760324 0.136093657
60 -0.608704889 0.052760324
61 -1.508704889 -0.608704889
62 -1.856073310 -1.508704889
63 -1.761336468 -1.856073310
64 -2.661336468 -1.761336468
65 -2.866599626 -2.661336468
66 -2.782389100 -2.866599626
67 -3.177125942 -2.782389100
68 -1.977536390 -3.177125942
69 -2.676922088 -1.977536390
70 -2.426922088 -2.676922088
71 -1.910255422 -2.426922088
72 -2.971720635 -1.910255422
73 -0.071720635 -2.971720635
74 -0.219089056 -0.071720635
75 -1.424352214 -0.219089056
76 -1.024352214 -1.424352214
77 -0.429615372 -1.024352214
78 -0.945404846 -0.429615372
79 -1.240141688 -0.945404846
80 -0.440552136 -1.240141688
81 -0.639937834 -0.440552136
82 -1.689937834 -0.639937834
83 -1.073271168 -1.689937834
84 0.365263619 -1.073271168
85 0.665263619 0.365263619
86 0.117895198 0.665263619
87 -0.287367960 0.117895198
88 -1.187367960 -0.287367960
89 -1.292631118 -1.187367960
90 -1.308420591 -1.292631118
91 -1.903157433 -1.308420591
92 0.696432119 -1.903157433
93 -1.402953580 0.696432119
94 -0.552953580 -1.402953580
95 -0.936286913 -0.552953580
96 -0.697752127 -0.936286913
97 -0.297752127 -0.697752127
98 -1.745120548 -0.297752127
99 -0.250383705 -1.745120548
100 -0.750383705 -0.250383705
101 -2.255646863 -0.750383705
102 -3.071436337 -2.255646863
103 -0.966173179 -3.071436337
104 -2.466583627 -0.966173179
105 -0.265969326 -2.466583627
106 -0.315969326 -0.265969326
107 -0.699302659 -0.315969326
108 -1.160767872 -0.699302659
109 -0.760767872 -1.160767872
110 -0.908136293 -0.760767872
111 -1.213399451 -0.908136293
112 -2.313399451 -1.213399451
113 -1.318662609 -2.313399451
114 -0.334452083 -1.318662609
115 -1.029188925 -0.334452083
116 1.270400627 -1.029188925
117 1.571014929 1.270400627
118 1.821014929 1.571014929
119 -2.262318405 1.821014929
120 -2.623783618 -2.262318405
121 -1.023783618 -2.623783618
122 1.228847961 -1.023783618
123 0.823584803 1.228847961
124 2.223584803 0.823584803
125 1.318321645 2.223584803
126 1.002532172 1.318321645
127 0.507795329 1.002532172
128 3.307384881 0.507795329
129 1.907999183 3.307384881
130 2.257999183 1.907999183
131 0.074665850 2.257999183
132 0.313200636 0.074665850
133 -0.486799364 0.313200636
134 -0.934167785 -0.486799364
135 -0.839430943 -0.934167785
136 -1.439430943 -0.839430943
137 -1.844694101 -1.439430943
138 -1.360483574 -1.844694101
139 -0.155220416 -1.360483574
140 -14.047832354 -0.155220416
141 -10.447218052 -14.047832354
142 -7.797218052 -10.447218052
143 -3.580551386 -7.797218052
144 -3.742016599 -3.580551386
145 -1.942016599 -3.742016599
146 -2.189385020 -1.942016599
147 -2.194648178 -2.189385020
148 -1.594648178 -2.194648178
149 -1.699911336 -1.594648178
150 -2.615700810 -1.699911336
151 -2.010437652 -2.615700810
152 -2.810848100 -2.010437652
153 -0.910233798 -2.810848100
154 -1.660233798 -0.910233798
155 -0.643567131 -1.660233798
156 -1.805032345 -0.643567131
157 -3.405032345 -1.805032345
158 -4.952400766 -3.405032345
159 -7.857663924 -4.952400766
160 -7.157663924 -7.857663924
161 -5.862927082 -7.157663924
162 -2.878716555 -5.862927082
163 -3.573453397 -2.878716555
164 -1.773863845 -3.573453397
165 -2.273249544 -1.773863845
166 -1.223249544 -2.273249544
167 -1.106582877 -1.223249544
168 -2.768048090 -1.106582877
169 -0.768048090 -2.768048090
170 0.084583489 -0.768048090
171 0.579320331 0.084583489
172 -0.220679669 0.579320331
173 1.374057173 -0.220679669
174 0.858267699 1.374057173
175 1.263530857 0.858267699
176 1.763120409 1.263530857
177 3.463734710 1.763120409
178 2.013734710 3.463734710
179 1.430401377 2.013734710
180 2.568936164 1.430401377
181 2.668936164 2.568936164
182 2.921567743 2.668936164
183 2.716304585 2.921567743
184 3.116304585 2.716304585
185 3.111041427 3.116304585
186 2.495251953 3.111041427
187 2.200515111 2.495251953
188 4.400104663 2.200515111
189 1.700718965 4.400104663
190 2.050718965 1.700718965
191 0.467385631 2.050718965
192 2.205920418 0.467385631
193 1.705920418 2.205920418
194 2.558551997 1.705920418
195 2.653288839 2.558551997
196 2.853288839 2.653288839
197 1.648025681 2.853288839
198 1.532236208 1.648025681
199 0.937499366 1.532236208
200 2.637088918 0.937499366
201 2.537703219 2.637088918
202 1.887703219 2.537703219
203 2.504369886 1.887703219
204 1.942904672 2.504369886
205 -0.157095328 1.942904672
206 2.095536251 -0.157095328
207 2.390273093 2.095536251
208 3.690273093 2.390273093
209 3.285009936 3.690273093
210 2.669220462 3.285009936
211 3.274483620 2.669220462
212 3.974073172 3.274483620
213 4.174687473 3.974073172
214 1.924687473 4.174687473
215 2.241354140 1.924687473
216 1.679888927 2.241354140
217 1.279888927 1.679888927
218 1.932520506 1.279888927
219 2.527257348 1.932520506
220 2.227257348 2.527257348
221 0.621994190 2.227257348
222 -0.593795284 0.621994190
223 -0.688532126 -0.593795284
224 -1.888942574 -0.688532126
225 NA -1.888942574
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] 7.206373839 6.206373839
[2,] 7.059005418 7.206373839
[3,] 5.553742260 7.059005418
[4,] 4.353742260 5.553742260
[5,] 4.648479102 4.353742260
[6,] 4.032689629 4.648479102
[7,] 4.337952787 4.032689629
[8,] 3.737542339 4.337952787
[9,] 3.538156640 3.737542339
[10,] 2.588156640 3.538156640
[11,] 5.604823307 2.588156640
[12,] 2.343358093 5.604823307
[13,] -3.056641907 2.343358093
[14,] -4.204010328 -3.056641907
[15,] 1.890726515 -4.204010328
[16,] 1.490726515 1.890726515
[17,] 0.785463357 1.490726515
[18,] 0.569673883 0.785463357
[19,] 0.074937041 0.569673883
[20,] 1.174526593 0.074937041
[21,] 0.175140894 1.174526593
[22,] 0.625140894 0.175140894
[23,] 0.741807561 0.625140894
[24,] -0.719657652 0.741807561
[25,] 0.080342348 -0.719657652
[26,] -0.467026073 0.080342348
[27,] -2.272289231 -0.467026073
[28,] -0.772289231 -2.272289231
[29,] 2.822447611 -0.772289231
[30,] 5.006658137 2.822447611
[31,] 5.511921295 5.006658137
[32,] 2.911510847 5.511921295
[33,] -0.887874851 2.911510847
[34,] 0.362125149 -0.887874851
[35,] -0.321208185 0.362125149
[36,] 0.817326602 -0.321208185
[37,] 1.017326602 0.817326602
[38,] 0.069958181 1.017326602
[39,] -0.235304977 0.069958181
[40,] 0.264695023 -0.235304977
[41,] -1.540568135 0.264695023
[42,] -1.556357609 -1.540568135
[43,] -1.451094451 -1.556357609
[44,] 0.048495101 -1.451094451
[45,] 0.349109403 0.048495101
[46,] -0.000890597 0.349109403
[47,] -0.584223930 -0.000890597
[48,] -1.345689144 -0.584223930
[49,] -1.145689144 -1.345689144
[50,] -0.593057565 -1.145689144
[51,] -0.798320723 -0.593057565
[52,] -1.098320723 -0.798320723
[53,] -0.503583881 -1.098320723
[54,] -0.719373354 -0.503583881
[55,] -1.914110196 -0.719373354
[56,] -0.514520644 -1.914110196
[57,] 0.086093657 -0.514520644
[58,] 0.136093657 0.086093657
[59,] 0.052760324 0.136093657
[60,] -0.608704889 0.052760324
[61,] -1.508704889 -0.608704889
[62,] -1.856073310 -1.508704889
[63,] -1.761336468 -1.856073310
[64,] -2.661336468 -1.761336468
[65,] -2.866599626 -2.661336468
[66,] -2.782389100 -2.866599626
[67,] -3.177125942 -2.782389100
[68,] -1.977536390 -3.177125942
[69,] -2.676922088 -1.977536390
[70,] -2.426922088 -2.676922088
[71,] -1.910255422 -2.426922088
[72,] -2.971720635 -1.910255422
[73,] -0.071720635 -2.971720635
[74,] -0.219089056 -0.071720635
[75,] -1.424352214 -0.219089056
[76,] -1.024352214 -1.424352214
[77,] -0.429615372 -1.024352214
[78,] -0.945404846 -0.429615372
[79,] -1.240141688 -0.945404846
[80,] -0.440552136 -1.240141688
[81,] -0.639937834 -0.440552136
[82,] -1.689937834 -0.639937834
[83,] -1.073271168 -1.689937834
[84,] 0.365263619 -1.073271168
[85,] 0.665263619 0.365263619
[86,] 0.117895198 0.665263619
[87,] -0.287367960 0.117895198
[88,] -1.187367960 -0.287367960
[89,] -1.292631118 -1.187367960
[90,] -1.308420591 -1.292631118
[91,] -1.903157433 -1.308420591
[92,] 0.696432119 -1.903157433
[93,] -1.402953580 0.696432119
[94,] -0.552953580 -1.402953580
[95,] -0.936286913 -0.552953580
[96,] -0.697752127 -0.936286913
[97,] -0.297752127 -0.697752127
[98,] -1.745120548 -0.297752127
[99,] -0.250383705 -1.745120548
[100,] -0.750383705 -0.250383705
[101,] -2.255646863 -0.750383705
[102,] -3.071436337 -2.255646863
[103,] -0.966173179 -3.071436337
[104,] -2.466583627 -0.966173179
[105,] -0.265969326 -2.466583627
[106,] -0.315969326 -0.265969326
[107,] -0.699302659 -0.315969326
[108,] -1.160767872 -0.699302659
[109,] -0.760767872 -1.160767872
[110,] -0.908136293 -0.760767872
[111,] -1.213399451 -0.908136293
[112,] -2.313399451 -1.213399451
[113,] -1.318662609 -2.313399451
[114,] -0.334452083 -1.318662609
[115,] -1.029188925 -0.334452083
[116,] 1.270400627 -1.029188925
[117,] 1.571014929 1.270400627
[118,] 1.821014929 1.571014929
[119,] -2.262318405 1.821014929
[120,] -2.623783618 -2.262318405
[121,] -1.023783618 -2.623783618
[122,] 1.228847961 -1.023783618
[123,] 0.823584803 1.228847961
[124,] 2.223584803 0.823584803
[125,] 1.318321645 2.223584803
[126,] 1.002532172 1.318321645
[127,] 0.507795329 1.002532172
[128,] 3.307384881 0.507795329
[129,] 1.907999183 3.307384881
[130,] 2.257999183 1.907999183
[131,] 0.074665850 2.257999183
[132,] 0.313200636 0.074665850
[133,] -0.486799364 0.313200636
[134,] -0.934167785 -0.486799364
[135,] -0.839430943 -0.934167785
[136,] -1.439430943 -0.839430943
[137,] -1.844694101 -1.439430943
[138,] -1.360483574 -1.844694101
[139,] -0.155220416 -1.360483574
[140,] -14.047832354 -0.155220416
[141,] -10.447218052 -14.047832354
[142,] -7.797218052 -10.447218052
[143,] -3.580551386 -7.797218052
[144,] -3.742016599 -3.580551386
[145,] -1.942016599 -3.742016599
[146,] -2.189385020 -1.942016599
[147,] -2.194648178 -2.189385020
[148,] -1.594648178 -2.194648178
[149,] -1.699911336 -1.594648178
[150,] -2.615700810 -1.699911336
[151,] -2.010437652 -2.615700810
[152,] -2.810848100 -2.010437652
[153,] -0.910233798 -2.810848100
[154,] -1.660233798 -0.910233798
[155,] -0.643567131 -1.660233798
[156,] -1.805032345 -0.643567131
[157,] -3.405032345 -1.805032345
[158,] -4.952400766 -3.405032345
[159,] -7.857663924 -4.952400766
[160,] -7.157663924 -7.857663924
[161,] -5.862927082 -7.157663924
[162,] -2.878716555 -5.862927082
[163,] -3.573453397 -2.878716555
[164,] -1.773863845 -3.573453397
[165,] -2.273249544 -1.773863845
[166,] -1.223249544 -2.273249544
[167,] -1.106582877 -1.223249544
[168,] -2.768048090 -1.106582877
[169,] -0.768048090 -2.768048090
[170,] 0.084583489 -0.768048090
[171,] 0.579320331 0.084583489
[172,] -0.220679669 0.579320331
[173,] 1.374057173 -0.220679669
[174,] 0.858267699 1.374057173
[175,] 1.263530857 0.858267699
[176,] 1.763120409 1.263530857
[177,] 3.463734710 1.763120409
[178,] 2.013734710 3.463734710
[179,] 1.430401377 2.013734710
[180,] 2.568936164 1.430401377
[181,] 2.668936164 2.568936164
[182,] 2.921567743 2.668936164
[183,] 2.716304585 2.921567743
[184,] 3.116304585 2.716304585
[185,] 3.111041427 3.116304585
[186,] 2.495251953 3.111041427
[187,] 2.200515111 2.495251953
[188,] 4.400104663 2.200515111
[189,] 1.700718965 4.400104663
[190,] 2.050718965 1.700718965
[191,] 0.467385631 2.050718965
[192,] 2.205920418 0.467385631
[193,] 1.705920418 2.205920418
[194,] 2.558551997 1.705920418
[195,] 2.653288839 2.558551997
[196,] 2.853288839 2.653288839
[197,] 1.648025681 2.853288839
[198,] 1.532236208 1.648025681
[199,] 0.937499366 1.532236208
[200,] 2.637088918 0.937499366
[201,] 2.537703219 2.637088918
[202,] 1.887703219 2.537703219
[203,] 2.504369886 1.887703219
[204,] 1.942904672 2.504369886
[205,] -0.157095328 1.942904672
[206,] 2.095536251 -0.157095328
[207,] 2.390273093 2.095536251
[208,] 3.690273093 2.390273093
[209,] 3.285009936 3.690273093
[210,] 2.669220462 3.285009936
[211,] 3.274483620 2.669220462
[212,] 3.974073172 3.274483620
[213,] 4.174687473 3.974073172
[214,] 1.924687473 4.174687473
[215,] 2.241354140 1.924687473
[216,] 1.679888927 2.241354140
[217,] 1.279888927 1.679888927
[218,] 1.932520506 1.279888927
[219,] 2.527257348 1.932520506
[220,] 2.227257348 2.527257348
[221,] 0.621994190 2.227257348
[222,] -0.593795284 0.621994190
[223,] -0.688532126 -0.593795284
[224,] -1.888942574 -0.688532126
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 7.206373839 6.206373839
2 7.059005418 7.206373839
3 5.553742260 7.059005418
4 4.353742260 5.553742260
5 4.648479102 4.353742260
6 4.032689629 4.648479102
7 4.337952787 4.032689629
8 3.737542339 4.337952787
9 3.538156640 3.737542339
10 2.588156640 3.538156640
11 5.604823307 2.588156640
12 2.343358093 5.604823307
13 -3.056641907 2.343358093
14 -4.204010328 -3.056641907
15 1.890726515 -4.204010328
16 1.490726515 1.890726515
17 0.785463357 1.490726515
18 0.569673883 0.785463357
19 0.074937041 0.569673883
20 1.174526593 0.074937041
21 0.175140894 1.174526593
22 0.625140894 0.175140894
23 0.741807561 0.625140894
24 -0.719657652 0.741807561
25 0.080342348 -0.719657652
26 -0.467026073 0.080342348
27 -2.272289231 -0.467026073
28 -0.772289231 -2.272289231
29 2.822447611 -0.772289231
30 5.006658137 2.822447611
31 5.511921295 5.006658137
32 2.911510847 5.511921295
33 -0.887874851 2.911510847
34 0.362125149 -0.887874851
35 -0.321208185 0.362125149
36 0.817326602 -0.321208185
37 1.017326602 0.817326602
38 0.069958181 1.017326602
39 -0.235304977 0.069958181
40 0.264695023 -0.235304977
41 -1.540568135 0.264695023
42 -1.556357609 -1.540568135
43 -1.451094451 -1.556357609
44 0.048495101 -1.451094451
45 0.349109403 0.048495101
46 -0.000890597 0.349109403
47 -0.584223930 -0.000890597
48 -1.345689144 -0.584223930
49 -1.145689144 -1.345689144
50 -0.593057565 -1.145689144
51 -0.798320723 -0.593057565
52 -1.098320723 -0.798320723
53 -0.503583881 -1.098320723
54 -0.719373354 -0.503583881
55 -1.914110196 -0.719373354
56 -0.514520644 -1.914110196
57 0.086093657 -0.514520644
58 0.136093657 0.086093657
59 0.052760324 0.136093657
60 -0.608704889 0.052760324
61 -1.508704889 -0.608704889
62 -1.856073310 -1.508704889
63 -1.761336468 -1.856073310
64 -2.661336468 -1.761336468
65 -2.866599626 -2.661336468
66 -2.782389100 -2.866599626
67 -3.177125942 -2.782389100
68 -1.977536390 -3.177125942
69 -2.676922088 -1.977536390
70 -2.426922088 -2.676922088
71 -1.910255422 -2.426922088
72 -2.971720635 -1.910255422
73 -0.071720635 -2.971720635
74 -0.219089056 -0.071720635
75 -1.424352214 -0.219089056
76 -1.024352214 -1.424352214
77 -0.429615372 -1.024352214
78 -0.945404846 -0.429615372
79 -1.240141688 -0.945404846
80 -0.440552136 -1.240141688
81 -0.639937834 -0.440552136
82 -1.689937834 -0.639937834
83 -1.073271168 -1.689937834
84 0.365263619 -1.073271168
85 0.665263619 0.365263619
86 0.117895198 0.665263619
87 -0.287367960 0.117895198
88 -1.187367960 -0.287367960
89 -1.292631118 -1.187367960
90 -1.308420591 -1.292631118
91 -1.903157433 -1.308420591
92 0.696432119 -1.903157433
93 -1.402953580 0.696432119
94 -0.552953580 -1.402953580
95 -0.936286913 -0.552953580
96 -0.697752127 -0.936286913
97 -0.297752127 -0.697752127
98 -1.745120548 -0.297752127
99 -0.250383705 -1.745120548
100 -0.750383705 -0.250383705
101 -2.255646863 -0.750383705
102 -3.071436337 -2.255646863
103 -0.966173179 -3.071436337
104 -2.466583627 -0.966173179
105 -0.265969326 -2.466583627
106 -0.315969326 -0.265969326
107 -0.699302659 -0.315969326
108 -1.160767872 -0.699302659
109 -0.760767872 -1.160767872
110 -0.908136293 -0.760767872
111 -1.213399451 -0.908136293
112 -2.313399451 -1.213399451
113 -1.318662609 -2.313399451
114 -0.334452083 -1.318662609
115 -1.029188925 -0.334452083
116 1.270400627 -1.029188925
117 1.571014929 1.270400627
118 1.821014929 1.571014929
119 -2.262318405 1.821014929
120 -2.623783618 -2.262318405
121 -1.023783618 -2.623783618
122 1.228847961 -1.023783618
123 0.823584803 1.228847961
124 2.223584803 0.823584803
125 1.318321645 2.223584803
126 1.002532172 1.318321645
127 0.507795329 1.002532172
128 3.307384881 0.507795329
129 1.907999183 3.307384881
130 2.257999183 1.907999183
131 0.074665850 2.257999183
132 0.313200636 0.074665850
133 -0.486799364 0.313200636
134 -0.934167785 -0.486799364
135 -0.839430943 -0.934167785
136 -1.439430943 -0.839430943
137 -1.844694101 -1.439430943
138 -1.360483574 -1.844694101
139 -0.155220416 -1.360483574
140 -14.047832354 -0.155220416
141 -10.447218052 -14.047832354
142 -7.797218052 -10.447218052
143 -3.580551386 -7.797218052
144 -3.742016599 -3.580551386
145 -1.942016599 -3.742016599
146 -2.189385020 -1.942016599
147 -2.194648178 -2.189385020
148 -1.594648178 -2.194648178
149 -1.699911336 -1.594648178
150 -2.615700810 -1.699911336
151 -2.010437652 -2.615700810
152 -2.810848100 -2.010437652
153 -0.910233798 -2.810848100
154 -1.660233798 -0.910233798
155 -0.643567131 -1.660233798
156 -1.805032345 -0.643567131
157 -3.405032345 -1.805032345
158 -4.952400766 -3.405032345
159 -7.857663924 -4.952400766
160 -7.157663924 -7.857663924
161 -5.862927082 -7.157663924
162 -2.878716555 -5.862927082
163 -3.573453397 -2.878716555
164 -1.773863845 -3.573453397
165 -2.273249544 -1.773863845
166 -1.223249544 -2.273249544
167 -1.106582877 -1.223249544
168 -2.768048090 -1.106582877
169 -0.768048090 -2.768048090
170 0.084583489 -0.768048090
171 0.579320331 0.084583489
172 -0.220679669 0.579320331
173 1.374057173 -0.220679669
174 0.858267699 1.374057173
175 1.263530857 0.858267699
176 1.763120409 1.263530857
177 3.463734710 1.763120409
178 2.013734710 3.463734710
179 1.430401377 2.013734710
180 2.568936164 1.430401377
181 2.668936164 2.568936164
182 2.921567743 2.668936164
183 2.716304585 2.921567743
184 3.116304585 2.716304585
185 3.111041427 3.116304585
186 2.495251953 3.111041427
187 2.200515111 2.495251953
188 4.400104663 2.200515111
189 1.700718965 4.400104663
190 2.050718965 1.700718965
191 0.467385631 2.050718965
192 2.205920418 0.467385631
193 1.705920418 2.205920418
194 2.558551997 1.705920418
195 2.653288839 2.558551997
196 2.853288839 2.653288839
197 1.648025681 2.853288839
198 1.532236208 1.648025681
199 0.937499366 1.532236208
200 2.637088918 0.937499366
201 2.537703219 2.637088918
202 1.887703219 2.537703219
203 2.504369886 1.887703219
204 1.942904672 2.504369886
205 -0.157095328 1.942904672
206 2.095536251 -0.157095328
207 2.390273093 2.095536251
208 3.690273093 2.390273093
209 3.285009936 3.690273093
210 2.669220462 3.285009936
211 3.274483620 2.669220462
212 3.974073172 3.274483620
213 4.174687473 3.974073172
214 1.924687473 4.174687473
215 2.241354140 1.924687473
216 1.679888927 2.241354140
217 1.279888927 1.679888927
218 1.932520506 1.279888927
219 2.527257348 1.932520506
220 2.227257348 2.527257348
221 0.621994190 2.227257348
222 -0.593795284 0.621994190
223 -0.688532126 -0.593795284
224 -1.888942574 -0.688532126
> 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/html/rcomp/tmp/7m2xk1227952310.ps",horizontal=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/html/rcomp/tmp/8lg2a1227952310.ps",horizontal=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/html/rcomp/tmp/9x8d71227952310.ps",horizontal=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/html/rcomp/tmp/108etj1227952310.ps",horizontal=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/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/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/html/rcomp/tmp/11maax1227952310.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/html/rcomp/tmp/12utuv1227952310.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/html/rcomp/tmp/13n7sk1227952310.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/html/rcomp/tmp/14qolp1227952310.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/html/rcomp/tmp/15twn31227952310.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/html/rcomp/tmp/16a75u1227952311.tab")
+ }
>
> system("convert tmp/1eq0h1227952310.ps tmp/1eq0h1227952310.png")
> system("convert tmp/2uh3d1227952310.ps tmp/2uh3d1227952310.png")
> system("convert tmp/3etft1227952310.ps tmp/3etft1227952310.png")
> system("convert tmp/4ci4d1227952310.ps tmp/4ci4d1227952310.png")
> system("convert tmp/52zf31227952310.ps tmp/52zf31227952310.png")
> system("convert tmp/66h3u1227952310.ps tmp/66h3u1227952310.png")
> system("convert tmp/7m2xk1227952310.ps tmp/7m2xk1227952310.png")
> system("convert tmp/8lg2a1227952310.ps tmp/8lg2a1227952310.png")
> system("convert tmp/9x8d71227952310.ps tmp/9x8d71227952310.png")
> system("convert tmp/108etj1227952310.ps tmp/108etj1227952310.png")
>
>
> proc.time()
user system elapsed
5.532 1.774 6.121