R version 2.9.0 (2009-04-17)
Copyright (C) 2009 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(15
+ ,2.1
+ ,14.4
+ ,2.1
+ ,13.5
+ ,2.6
+ ,12.8
+ ,2.6
+ ,12.3
+ ,2.7
+ ,12.2
+ ,2.5
+ ,14.5
+ ,2.4
+ ,17.2
+ ,1.9
+ ,18
+ ,2.2
+ ,18.1
+ ,1.9
+ ,18
+ ,2
+ ,18.3
+ ,2.2
+ ,18.7
+ ,2.5
+ ,18.6
+ ,2.5
+ ,18.3
+ ,2.7
+ ,17.9
+ ,2.6
+ ,17.4
+ ,2.3
+ ,17.4
+ ,2
+ ,20.1
+ ,2.3
+ ,23.2
+ ,2.9
+ ,24.2
+ ,2.5
+ ,24.2
+ ,2.5
+ ,23.9
+ ,2.3
+ ,23.8
+ ,2.5
+ ,23.8
+ ,2.3
+ ,23.3
+ ,2.4
+ ,22.4
+ ,2.2
+ ,21.5
+ ,2.4
+ ,20.5
+ ,2.6
+ ,19.9
+ ,2.8
+ ,22
+ ,2.8
+ ,24.9
+ ,2.5
+ ,25.7
+ ,2.5
+ ,25.3
+ ,2.2
+ ,24.4
+ ,2.1
+ ,23.8
+ ,1.9
+ ,23.5
+ ,1.9
+ ,23
+ ,1.7
+ ,22.2
+ ,1.7
+ ,21.4
+ ,1.6
+ ,20.3
+ ,1.4
+ ,19.5
+ ,1.1
+ ,21.7
+ ,0.8
+ ,24.7
+ ,0.9
+ ,25.3
+ ,1
+ ,24.9
+ ,1
+ ,24.1
+ ,1.1
+ ,23.4
+ ,1.3
+ ,23.1
+ ,1.4
+ ,22.4
+ ,1.4
+ ,21.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,18.6
+ ,1.8
+ ,19.9
+ ,1.8
+ ,19.2
+ ,1.3
+ ,18.4
+ ,1.3
+ ,21.1
+ ,1.3
+ ,20.5
+ ,1.2
+ ,19.1
+ ,1.4
+ ,18.1
+ ,2.2
+ ,17
+ ,2.9
+ ,17.1
+ ,3.1
+ ,17.4
+ ,3.5
+ ,16.8
+ ,3.6
+ ,15.3
+ ,4.4
+ ,14.3
+ ,4.1
+ ,13.4
+ ,5.1
+ ,15.3
+ ,5.8
+ ,22.1
+ ,5.9
+ ,23.7
+ ,5.4
+ ,22.2
+ ,5.5
+ ,19.5
+ ,4.8
+ ,16.6
+ ,3.2
+ ,17.3
+ ,2.7
+ ,19.8
+ ,2.1
+ ,21.2
+ ,1.9
+ ,21.5
+ ,0.6
+ ,20.6
+ ,0.7
+ ,19.1
+ ,-0.2
+ ,19.6
+ ,-1
+ ,23.5
+ ,-1.7
+ ,24
+ ,-0.7
+ ,23.2
+ ,-1
+ ,21.2
+ ,-0.9)
+ ,dim=c(2
+ ,214)
+ ,dimnames=list(c('Y(Werkloosheid)'
+ ,'X(inflatie)')
+ ,1:214))
> y <- array(NA,dim=c(2,214),dimnames=list(c('Y(Werkloosheid)','X(inflatie)'),1:214))
> 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(Werkloosheid) X(inflatie) M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t
1 15.0 2.1 1 0 0 0 0 0 0 0 0 0 0 1
2 14.4 2.1 0 1 0 0 0 0 0 0 0 0 0 2
3 13.5 2.6 0 0 1 0 0 0 0 0 0 0 0 3
4 12.8 2.6 0 0 0 1 0 0 0 0 0 0 0 4
5 12.3 2.7 0 0 0 0 1 0 0 0 0 0 0 5
6 12.2 2.5 0 0 0 0 0 1 0 0 0 0 0 6
7 14.5 2.4 0 0 0 0 0 0 1 0 0 0 0 7
8 17.2 1.9 0 0 0 0 0 0 0 1 0 0 0 8
9 18.0 2.2 0 0 0 0 0 0 0 0 1 0 0 9
10 18.1 1.9 0 0 0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 0 0 100
101 14.3 2.4 0 0 0 0 1 0 0 0 0 0 0 101
102 14.5 3.0 0 0 0 0 0 1 0 0 0 0 0 102
103 18.9 1.7 0 0 0 0 0 0 1 0 0 0 0 103
104 21.6 3.5 0 0 0 0 0 0 0 1 0 0 0 104
105 20.4 4.0 0 0 0 0 0 0 0 0 1 0 0 105
106 17.9 3.7 0 0 0 0 0 0 0 0 0 1 0 106
107 15.7 3.7 0 0 0 0 0 0 0 0 0 0 1 107
108 14.5 3.0 0 0 0 0 0 0 0 0 0 0 0 108
109 14.0 2.7 1 0 0 0 0 0 0 0 0 0 0 109
110 13.9 2.5 0 1 0 0 0 0 0 0 0 0 0 110
111 14.4 2.2 0 0 1 0 0 0 0 0 0 0 0 111
112 15.8 2.9 0 0 0 1 0 0 0 0 0 0 0 112
113 15.6 3.1 0 0 0 0 1 0 0 0 0 0 0 113
114 14.7 3.0 0 0 0 0 0 1 0 0 0 0 0 114
115 16.7 2.8 0 0 0 0 0 0 1 0 0 0 0 115
116 17.9 2.5 0 0 0 0 0 0 0 1 0 0 0 116
117 18.7 1.9 0 0 0 0 0 0 0 0 1 0 0 117
118 20.1 1.9 0 0 0 0 0 0 0 0 0 1 0 118
119 19.5 1.8 0 0 0 0 0 0 0 0 0 0 1 119
120 19.4 2.0 0 0 0 0 0 0 0 0 0 0 0 120
121 18.6 2.6 1 0 0 0 0 0 0 0 0 0 0 121
122 17.8 2.5 0 1 0 0 0 0 0 0 0 0 0 122
123 17.1 2.5 0 0 1 0 0 0 0 0 0 0 0 123
124 16.5 1.6 0 0 0 1 0 0 0 0 0 0 0 124
125 15.5 1.4 0 0 0 0 1 0 0 0 0 0 0 125
126 14.9 0.8 0 0 0 0 0 1 0 0 0 0 0 126
127 18.6 1.1 0 0 0 0 0 0 1 0 0 0 0 127
128 19.1 1.3 0 0 0 0 0 0 0 1 0 0 0 128
129 18.8 1.2 0 0 0 0 0 0 0 0 1 0 0 129
130 18.2 1.3 0 0 0 0 0 0 0 0 0 1 0 130
131 18.0 1.1 0 0 0 0 0 0 0 0 0 0 1 131
132 19.0 1.3 0 0 0 0 0 0 0 0 0 0 0 132
133 20.7 1.2 1 0 0 0 0 0 0 0 0 0 0 133
134 21.2 1.6 0 1 0 0 0 0 0 0 0 0 0 134
135 20.7 1.7 0 0 1 0 0 0 0 0 0 0 0 135
136 19.6 1.5 0 0 0 1 0 0 0 0 0 0 0 136
137 18.6 0.9 0 0 0 0 1 0 0 0 0 0 0 137
138 18.7 1.5 0 0 0 0 0 1 0 0 0 0 0 138
139 23.8 1.4 0 0 0 0 0 0 1 0 0 0 0 139
140 24.9 1.6 0 0 0 0 0 0 0 1 0 0 0 140
141 24.8 1.7 0 0 0 0 0 0 0 0 1 0 0 141
142 23.8 1.4 0 0 0 0 0 0 0 0 0 1 0 142
143 22.3 1.8 0 0 0 0 0 0 0 0 0 0 1 143
144 21.7 1.7 0 0 0 0 0 0 0 0 0 0 0 144
145 20.7 1.4 1 0 0 0 0 0 0 0 0 0 0 145
146 19.7 1.2 0 1 0 0 0 0 0 0 0 0 0 146
147 18.4 1.0 0 0 1 0 0 0 0 0 0 0 0 147
148 17.4 1.7 0 0 0 1 0 0 0 0 0 0 0 148
149 17.0 2.4 0 0 0 0 1 0 0 0 0 0 0 149
150 18.0 2.0 0 0 0 0 0 1 0 0 0 0 0 150
151 23.8 2.1 0 0 0 0 0 0 1 0 0 0 0 151
152 25.5 2.0 0 0 0 0 0 0 0 1 0 0 0 152
153 25.6 1.8 0 0 0 0 0 0 0 0 1 0 0 153
154 23.7 2.7 0 0 0 0 0 0 0 0 0 1 0 154
155 22.0 2.3 0 0 0 0 0 0 0 0 0 0 1 155
156 21.3 1.9 0 0 0 0 0 0 0 0 0 0 0 156
157 20.7 2.0 1 0 0 0 0 0 0 0 0 0 0 157
158 20.4 2.3 0 1 0 0 0 0 0 0 0 0 0 158
159 20.3 2.8 0 0 1 0 0 0 0 0 0 0 0 159
160 20.4 2.4 0 0 0 1 0 0 0 0 0 0 0 160
161 19.8 2.3 0 0 0 0 1 0 0 0 0 0 0 161
162 19.5 2.7 0 0 0 0 0 1 0 0 0 0 0 162
163 23.1 2.7 0 0 0 0 0 0 1 0 0 0 0 163
164 23.5 2.9 0 0 0 0 0 0 0 1 0 0 0 164
165 23.5 3.0 0 0 0 0 0 0 0 0 1 0 0 165
166 22.9 2.2 0 0 0 0 0 0 0 0 0 1 0 166
167 21.9 2.3 0 0 0 0 0 0 0 0 0 0 1 167
168 21.5 2.8 0 0 0 0 0 0 0 0 0 0 0 168
169 20.5 2.8 1 0 0 0 0 0 0 0 0 0 0 169
170 20.2 2.8 0 1 0 0 0 0 0 0 0 0 0 170
171 19.4 2.2 0 0 1 0 0 0 0 0 0 0 0 171
172 19.2 2.6 0 0 0 1 0 0 0 0 0 0 0 172
173 18.8 2.8 0 0 0 0 1 0 0 0 0 0 0 173
174 18.8 2.5 0 0 0 0 0 1 0 0 0 0 0 174
175 22.6 2.4 0 0 0 0 0 0 1 0 0 0 0 175
176 23.3 2.3 0 0 0 0 0 0 0 1 0 0 0 176
177 23.0 1.9 0 0 0 0 0 0 0 0 1 0 0 177
178 21.4 1.7 0 0 0 0 0 0 0 0 0 1 0 178
179 19.9 2.0 0 0 0 0 0 0 0 0 0 0 1 179
180 18.8 2.1 0 0 0 0 0 0 0 0 0 0 0 180
181 18.6 1.7 1 0 0 0 0 0 0 0 0 0 0 181
182 18.4 1.8 0 1 0 0 0 0 0 0 0 0 0 182
183 18.6 1.8 0 0 1 0 0 0 0 0 0 0 0 183
184 19.9 1.8 0 0 0 1 0 0 0 0 0 0 0 184
185 19.2 1.3 0 0 0 0 1 0 0 0 0 0 0 185
186 18.4 1.3 0 0 0 0 0 1 0 0 0 0 0 186
187 21.1 1.3 0 0 0 0 0 0 1 0 0 0 0 187
188 20.5 1.2 0 0 0 0 0 0 0 1 0 0 0 188
189 19.1 1.4 0 0 0 0 0 0 0 0 1 0 0 189
190 18.1 2.2 0 0 0 0 0 0 0 0 0 1 0 190
191 17.0 2.9 0 0 0 0 0 0 0 0 0 0 1 191
192 17.1 3.1 0 0 0 0 0 0 0 0 0 0 0 192
193 17.4 3.5 1 0 0 0 0 0 0 0 0 0 0 193
194 16.8 3.6 0 1 0 0 0 0 0 0 0 0 0 194
195 15.3 4.4 0 0 1 0 0 0 0 0 0 0 0 195
196 14.3 4.1 0 0 0 1 0 0 0 0 0 0 0 196
197 13.4 5.1 0 0 0 0 1 0 0 0 0 0 0 197
198 15.3 5.8 0 0 0 0 0 1 0 0 0 0 0 198
199 22.1 5.9 0 0 0 0 0 0 1 0 0 0 0 199
200 23.7 5.4 0 0 0 0 0 0 0 1 0 0 0 200
201 22.2 5.5 0 0 0 0 0 0 0 0 1 0 0 201
202 19.5 4.8 0 0 0 0 0 0 0 0 0 1 0 202
203 16.6 3.2 0 0 0 0 0 0 0 0 0 0 1 203
204 17.3 2.7 0 0 0 0 0 0 0 0 0 0 0 204
205 19.8 2.1 1 0 0 0 0 0 0 0 0 0 0 205
206 21.2 1.9 0 1 0 0 0 0 0 0 0 0 0 206
207 21.5 0.6 0 0 1 0 0 0 0 0 0 0 0 207
208 20.6 0.7 0 0 0 1 0 0 0 0 0 0 0 208
209 19.1 -0.2 0 0 0 0 1 0 0 0 0 0 0 209
210 19.6 -1.0 0 0 0 0 0 1 0 0 0 0 0 210
211 23.5 -1.7 0 0 0 0 0 0 1 0 0 0 0 211
212 24.0 -0.7 0 0 0 0 0 0 0 1 0 0 0 212
213 23.2 -1.0 0 0 0 0 0 0 0 0 1 0 0 213
214 21.2 -0.9 0 0 0 0 0 0 0 0 0 1 0 214
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `X(inflatie)` M1 M2 M3
22.311927 -0.845158 -0.468052 -0.676589 -1.240144
M4 M5 M6 M7 M8
-1.660974 -2.422808 -2.635897 0.551947 2.412657
M9 M10 M11 t
2.423045 1.409957 0.350740 -0.003112
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-6.3137 -1.6281 0.4987 1.9094 4.8419
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 22.311927 0.771389 28.924 < 2e-16 ***
`X(inflatie)` -0.845158 0.169364 -4.990 1.31e-06 ***
M1 -0.468052 0.879524 -0.532 0.59520
M2 -0.676589 0.879261 -0.769 0.44251
M3 -1.240144 0.879228 -1.410 0.15995
M4 -1.660974 0.879203 -1.889 0.06031 .
M5 -2.422808 0.879191 -2.756 0.00640 **
M6 -2.635897 0.879227 -2.998 0.00306 **
M7 0.551947 0.879655 0.627 0.53107
M8 2.412657 0.879297 2.744 0.00662 **
M9 2.423045 0.879354 2.755 0.00640 **
M10 1.409957 0.879529 1.603 0.11049
M11 0.350740 0.891661 0.393 0.69448
t -0.003112 0.002888 -1.078 0.28250
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.6 on 200 degrees of freedom
Multiple R-squared: 0.361, Adjusted R-squared: 0.3195
F-statistic: 8.691 on 13 and 200 DF, p-value: 5.982e-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,] 2.193866e-03 4.387731e-03 9.978061e-01
[2,] 2.622921e-04 5.245841e-04 9.997377e-01
[3,] 1.489206e-04 2.978413e-04 9.998511e-01
[4,] 8.894801e-04 1.778960e-03 9.991105e-01
[5,] 5.325534e-04 1.065107e-03 9.994674e-01
[6,] 2.099357e-04 4.198714e-04 9.997901e-01
[7,] 6.761305e-05 1.352261e-04 9.999324e-01
[8,] 1.687254e-05 3.374509e-05 9.999831e-01
[9,] 7.182819e-06 1.436564e-05 9.999928e-01
[10,] 3.178468e-06 6.356935e-06 9.999968e-01
[11,] 1.064826e-06 2.129652e-06 9.999989e-01
[12,] 5.969628e-07 1.193926e-06 9.999994e-01
[13,] 1.092285e-06 2.184570e-06 9.999989e-01
[14,] 5.805315e-06 1.161063e-05 9.999942e-01
[15,] 1.589035e-05 3.178069e-05 9.999841e-01
[16,] 2.180584e-05 4.361169e-05 9.999782e-01
[17,] 2.645619e-05 5.291239e-05 9.999735e-01
[18,] 4.111260e-05 8.222521e-05 9.999589e-01
[19,] 1.005953e-04 2.011905e-04 9.998994e-01
[20,] 2.224724e-04 4.449448e-04 9.997775e-01
[21,] 4.189698e-04 8.379396e-04 9.995810e-01
[22,] 3.921118e-04 7.842236e-04 9.996079e-01
[23,] 2.655643e-04 5.311285e-04 9.997344e-01
[24,] 1.532277e-04 3.064555e-04 9.998468e-01
[25,] 8.199015e-05 1.639803e-04 9.999180e-01
[26,] 4.196929e-05 8.393857e-05 9.999580e-01
[27,] 2.123903e-05 4.247806e-05 9.999788e-01
[28,] 1.014062e-05 2.028124e-05 9.999899e-01
[29,] 5.239848e-06 1.047970e-05 9.999948e-01
[30,] 3.816322e-06 7.632644e-06 9.999962e-01
[31,] 4.755467e-06 9.510935e-06 9.999952e-01
[32,] 1.193115e-05 2.386230e-05 9.999881e-01
[33,] 4.034065e-05 8.068129e-05 9.999597e-01
[34,] 1.174671e-04 2.349342e-04 9.998825e-01
[35,] 3.741521e-04 7.483042e-04 9.996258e-01
[36,] 2.302744e-03 4.605489e-03 9.976973e-01
[37,] 9.817740e-03 1.963548e-02 9.901823e-01
[38,] 2.421142e-02 4.842285e-02 9.757886e-01
[39,] 3.309178e-02 6.618356e-02 9.669082e-01
[40,] 3.432387e-02 6.864774e-02 9.656761e-01
[41,] 4.144213e-02 8.288426e-02 9.585579e-01
[42,] 9.040641e-02 1.808128e-01 9.095936e-01
[43,] 1.540606e-01 3.081213e-01 8.459394e-01
[44,] 2.228573e-01 4.457146e-01 7.771427e-01
[45,] 2.754927e-01 5.509854e-01 7.245073e-01
[46,] 3.066186e-01 6.132373e-01 6.933814e-01
[47,] 3.012522e-01 6.025045e-01 6.987478e-01
[48,] 2.826598e-01 5.653196e-01 7.173402e-01
[49,] 2.694589e-01 5.389177e-01 7.305411e-01
[50,] 2.624116e-01 5.248232e-01 7.375884e-01
[51,] 2.652315e-01 5.304630e-01 7.347685e-01
[52,] 2.690059e-01 5.380119e-01 7.309941e-01
[53,] 2.719874e-01 5.439748e-01 7.280126e-01
[54,] 2.779961e-01 5.559922e-01 7.220039e-01
[55,] 3.018241e-01 6.036482e-01 6.981759e-01
[56,] 3.159884e-01 6.319769e-01 6.840116e-01
[57,] 3.051371e-01 6.102742e-01 6.948629e-01
[58,] 2.984723e-01 5.969447e-01 7.015277e-01
[59,] 2.915389e-01 5.830779e-01 7.084611e-01
[60,] 2.878769e-01 5.757538e-01 7.121231e-01
[61,] 2.789977e-01 5.579954e-01 7.210023e-01
[62,] 2.685352e-01 5.370704e-01 7.314648e-01
[63,] 2.557615e-01 5.115230e-01 7.442385e-01
[64,] 2.342086e-01 4.684172e-01 7.657914e-01
[65,] 2.287469e-01 4.574937e-01 7.712531e-01
[66,] 2.357525e-01 4.715050e-01 7.642475e-01
[67,] 2.507187e-01 5.014374e-01 7.492813e-01
[68,] 2.714689e-01 5.429379e-01 7.285311e-01
[69,] 3.009283e-01 6.018566e-01 6.990717e-01
[70,] 3.276865e-01 6.553731e-01 6.723135e-01
[71,] 3.699733e-01 7.399465e-01 6.300267e-01
[72,] 4.184566e-01 8.369131e-01 5.815434e-01
[73,] 4.717322e-01 9.434644e-01 5.282678e-01
[74,] 4.883470e-01 9.766941e-01 5.116530e-01
[75,] 4.599628e-01 9.199257e-01 5.400372e-01
[76,] 4.831459e-01 9.662918e-01 5.168541e-01
[77,] 6.088402e-01 7.823196e-01 3.911598e-01
[78,] 7.948044e-01 4.103913e-01 2.051956e-01
[79,] 9.229326e-01 1.541347e-01 7.706737e-02
[80,] 9.721222e-01 5.575555e-02 2.787778e-02
[81,] 9.899265e-01 2.014690e-02 1.007345e-02
[82,] 9.944708e-01 1.105837e-02 5.529187e-03
[83,] 9.960084e-01 7.983264e-03 3.991632e-03
[84,] 9.967138e-01 6.572342e-03 3.286171e-03
[85,] 9.967897e-01 6.420666e-03 3.210333e-03
[86,] 9.959955e-01 8.008934e-03 4.004467e-03
[87,] 9.951346e-01 9.730863e-03 4.865431e-03
[88,] 9.939258e-01 1.214849e-02 6.074245e-03
[89,] 9.919780e-01 1.604399e-02 8.021994e-03
[90,] 9.901201e-01 1.975971e-02 9.879854e-03
[91,] 9.896124e-01 2.077530e-02 1.038765e-02
[92,] 9.928284e-01 1.434323e-02 7.171616e-03
[93,] 9.957638e-01 8.472361e-03 4.236180e-03
[94,] 9.978044e-01 4.391265e-03 2.195633e-03
[95,] 9.985243e-01 2.951350e-03 1.475675e-03
[96,] 9.981285e-01 3.743030e-03 1.871515e-03
[97,] 9.975102e-01 4.979505e-03 2.489752e-03
[98,] 9.970904e-01 5.819166e-03 2.909583e-03
[99,] 9.982479e-01 3.504150e-03 1.752075e-03
[100,] 9.990953e-01 1.809382e-03 9.046912e-04
[101,] 9.994438e-01 1.112431e-03 5.562156e-04
[102,] 9.992504e-01 1.499198e-03 7.495990e-04
[103,] 9.989449e-01 2.110215e-03 1.055108e-03
[104,] 9.984996e-01 3.000802e-03 1.500401e-03
[105,] 9.980573e-01 3.885396e-03 1.942698e-03
[106,] 9.976457e-01 4.708503e-03 2.354252e-03
[107,] 9.972329e-01 5.534253e-03 2.767126e-03
[108,] 9.972467e-01 5.506661e-03 2.753331e-03
[109,] 9.976096e-01 4.780733e-03 2.390367e-03
[110,] 9.988028e-01 2.394414e-03 1.197207e-03
[111,] 9.995632e-01 8.736392e-04 4.368196e-04
[112,] 9.999173e-01 1.653247e-04 8.266237e-05
[113,] 9.999907e-01 1.859827e-05 9.299136e-06
[114,] 9.999985e-01 2.905240e-06 1.452620e-06
[115,] 9.999995e-01 1.003446e-06 5.017232e-07
[116,] 9.999995e-01 9.167902e-07 4.583951e-07
[117,] 9.999993e-01 1.465633e-06 7.328167e-07
[118,] 9.999989e-01 2.213156e-06 1.106578e-06
[119,] 9.999984e-01 3.292134e-06 1.646067e-06
[120,] 9.999975e-01 5.062004e-06 2.531002e-06
[121,] 9.999964e-01 7.186551e-06 3.593276e-06
[122,] 9.999954e-01 9.171680e-06 4.585840e-06
[123,] 9.999952e-01 9.641679e-06 4.820840e-06
[124,] 9.999935e-01 1.297430e-05 6.487150e-06
[125,] 9.999907e-01 1.858336e-05 9.291682e-06
[126,] 9.999861e-01 2.773429e-05 1.386715e-05
[127,] 9.999810e-01 3.801992e-05 1.900996e-05
[128,] 9.999715e-01 5.695562e-05 2.847781e-05
[129,] 9.999544e-01 9.114443e-05 4.557222e-05
[130,] 9.999400e-01 1.199169e-04 5.995843e-05
[131,] 9.999488e-01 1.023575e-04 5.117875e-05
[132,] 9.999693e-01 6.137375e-05 3.068687e-05
[133,] 9.999745e-01 5.092430e-05 2.546215e-05
[134,] 9.999757e-01 4.869611e-05 2.434806e-05
[135,] 9.999736e-01 5.277209e-05 2.638605e-05
[136,] 9.999657e-01 6.867792e-05 3.433896e-05
[137,] 9.999581e-01 8.376471e-05 4.188236e-05
[138,] 9.999556e-01 8.870016e-05 4.435008e-05
[139,] 9.999438e-01 1.124569e-04 5.622843e-05
[140,] 9.999117e-01 1.766671e-04 8.833357e-05
[141,] 9.998555e-01 2.889270e-04 1.444635e-04
[142,] 9.997709e-01 4.582499e-04 2.291250e-04
[143,] 9.996734e-01 6.531131e-04 3.265565e-04
[144,] 9.995343e-01 9.313472e-04 4.656736e-04
[145,] 9.993572e-01 1.285515e-03 6.427576e-04
[146,] 9.991144e-01 1.771277e-03 8.856386e-04
[147,] 9.988115e-01 2.377066e-03 1.188533e-03
[148,] 9.982171e-01 3.565795e-03 1.782898e-03
[149,] 9.975126e-01 4.974756e-03 2.487378e-03
[150,] 9.970293e-01 5.941353e-03 2.970676e-03
[151,] 9.976209e-01 4.758112e-03 2.379056e-03
[152,] 9.983419e-01 3.316289e-03 1.658145e-03
[153,] 9.978973e-01 4.205392e-03 2.102696e-03
[154,] 9.970718e-01 5.856454e-03 2.928227e-03
[155,] 9.954806e-01 9.038811e-03 4.519406e-03
[156,] 9.934245e-01 1.315106e-02 6.575529e-03
[157,] 9.921008e-01 1.579846e-02 7.899230e-03
[158,] 9.893560e-01 2.128800e-02 1.064400e-02
[159,] 9.849849e-01 3.003012e-02 1.501506e-02
[160,] 9.786955e-01 4.260906e-02 2.130453e-02
[161,] 9.740002e-01 5.199963e-02 2.599981e-02
[162,] 9.715835e-01 5.683300e-02 2.841650e-02
[163,] 9.766695e-01 4.666098e-02 2.333049e-02
[164,] 9.732434e-01 5.351327e-02 2.675664e-02
[165,] 9.606154e-01 7.876921e-02 3.938460e-02
[166,] 9.418605e-01 1.162791e-01 5.813953e-02
[167,] 9.201371e-01 1.597259e-01 7.986294e-02
[168,] 9.394202e-01 1.211597e-01 6.057985e-02
[169,] 9.751361e-01 4.972777e-02 2.486389e-02
[170,] 9.835172e-01 3.296553e-02 1.648277e-02
[171,] 9.750666e-01 4.986688e-02 2.493344e-02
[172,] 9.587932e-01 8.241351e-02 4.120675e-02
[173,] 9.371757e-01 1.256486e-01 6.282432e-02
[174,] 9.069329e-01 1.861342e-01 9.306708e-02
[175,] 9.127131e-01 1.745739e-01 8.728694e-02
[176,] 9.485248e-01 1.029504e-01 5.147518e-02
[177,] 9.586440e-01 8.271196e-02 4.135598e-02
[178,] 9.607554e-01 7.848920e-02 3.924460e-02
[179,] 9.174731e-01 1.650537e-01 8.252686e-02
[180,] 8.381656e-01 3.236687e-01 1.618344e-01
[181,] 8.847886e-01 2.304228e-01 1.152114e-01
> postscript(file="/var/www/html/rcomp/tmp/1e4zo1262199215.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/2n59y1262199215.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/3dqo31262199215.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/4ozuu1262199215.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/5g1811262199215.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 = 214
Frequency = 1
1 2 3 4 5 6
-5.06593166 -5.45428252 -5.36503699 -5.64109430 -5.29163233 -5.34446329
7 8 9 10 11 12
-6.31371067 -5.89388776 -4.84761647 -3.98496321 -2.93811838 -2.11523482
13 14 15 16 17 18
-0.99052312 -0.87887398 -0.44317577 -0.50374885 -0.49234997 -0.52969671
19 20 21 22 23 24
-0.76088099 0.98861542 1.64327630 2.65947688 3.25277439 3.67565795
25 26 27 28 29 30
3.97779078 3.77395569 3.27159082 2.96456505 2.89854280 2.68377492
31 32 33 34 35 36
1.59904332 2.38789777 3.18062175 3.54327501 3.62108829 3.20590876
37 38 39 40 41 42
3.37707314 2.91969073 2.68635740 2.22578432 1.72169897 0.88435223
43 44 45 46 47 48
-0.35392668 0.87299086 1.55023061 2.16643118 2.51327601 2.33615957
49 50 51 52 53 54
2.59183972 2.10348886 1.73918708 1.50119286 1.35065483 0.79782386
55 56 57 58 59 60
-0.42497083 0.46388362 1.51015492 2.51796590 2.59577919 2.34963120
61 62 63 64 65 66
2.42079558 1.96341317 1.42298520 0.97789635 1.19638987 1.08162199
67 68 69 70 71 72
0.15043771 0.82380793 1.63201614 1.71015362 1.65699845 0.87278738
73 74 75 76 77 78
0.60588866 0.47108512 0.50678333 0.38427334 0.44921954 -0.01909565
79 80 81 82 83 84
-0.90382725 0.86954297 2.19323540 2.32492021 2.20273349 2.24110128
85 86 87 88 89 90
2.76581297 2.57746212 2.99767610 3.05258725 2.76398613 1.69567093
91 92 93 94 95 96
-0.08906067 -0.77762735 -1.84684029 -3.24612394 -4.01476333 -4.13833246
97 98 99 100 101 102
-5.38845199 -3.85551894 -3.55078918 -3.59587803 -3.24641607 -2.32312085
103 104 105 106 107 108
-2.20655749 0.15712818 -0.62756898 -2.36491572 -3.50258666 -4.94034506
109 110 111 112 113 114
-5.22272800 -5.28011040 -4.46699105 -2.05143795 -1.31746021 -2.08577540
115 116 117 118 119 120
-3.43953855 -4.35068410 -4.06505476 -1.64885418 -1.27104089 -0.84815734
121 122 123 124 125 126
-0.66989832 -1.34276495 -1.47609829 -2.41279755 -2.81688290 -3.70777695
127 128 129 130 131 132
-2.93896123 -4.12752792 -4.51931972 -4.01860337 -3.32530586 -1.80242230
133 134 135 136 137 138
0.28422631 1.33393854 1.48512098 0.64003213 -0.10211631 0.72117890
139 140 141 142 143 144
2.55193153 1.96336485 1.94060459 1.70325785 1.60365000 1.27298624
145 146 147 148 149 150
0.49060330 -0.46677910 -1.36914398 -1.35359088 -0.39703428 0.48110321
151 152 153 154 155 156
3.18088739 2.93877338 2.86246581 2.73930835 1.76357431 1.07936323
157 158 159 160 161 162
1.03504338 1.20023984 2.08948537 2.27536498 2.35579540 2.61005907
163 164 165 166 167 168
3.02532747 1.73676079 1.81400053 1.55407493 1.70091976 2.07735064
169 170 171 172 173 174
1.54851501 1.46016415 0.71973619 1.28174197 1.81571971 1.77837297
175 176 177 178 179 180
2.30912560 1.06701160 0.42167248 -0.33115849 -0.51528211 -1.17691433
181 182 183 184 185 186
-1.24381304 -1.14764812 -0.38098146 1.34296123 0.98532857 0.40152915
187 188 189 190 191 192
-0.08320245 -2.62531645 -3.86356093 -3.17123417 -2.61729471 -1.99441115
193 194 195 196 197 198
-0.88518368 -1.18901877 -1.44622592 -2.27583055 -1.56572662 1.14208436
199 200 201 202 203 204
4.84186854 4.16169144 2.73893119 0.46352136 -2.72640195 -2.09512880
205 206 207 208 209 210
0.36894095 1.81155854 1.57952017 1.18797863 -0.30771713 -0.26764273
211 212 213 214
-0.14398474 -0.65642524 -1.71724858 -2.61653223
> postscript(file="/var/www/html/rcomp/tmp/6qx0v1262199215.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 = 214
Frequency = 1
lag(myerror, k = 1) myerror
0 -5.06593166 NA
1 -5.45428252 -5.06593166
2 -5.36503699 -5.45428252
3 -5.64109430 -5.36503699
4 -5.29163233 -5.64109430
5 -5.34446329 -5.29163233
6 -6.31371067 -5.34446329
7 -5.89388776 -6.31371067
8 -4.84761647 -5.89388776
9 -3.98496321 -4.84761647
10 -2.93811838 -3.98496321
11 -2.11523482 -2.93811838
12 -0.99052312 -2.11523482
13 -0.87887398 -0.99052312
14 -0.44317577 -0.87887398
15 -0.50374885 -0.44317577
16 -0.49234997 -0.50374885
17 -0.52969671 -0.49234997
18 -0.76088099 -0.52969671
19 0.98861542 -0.76088099
20 1.64327630 0.98861542
21 2.65947688 1.64327630
22 3.25277439 2.65947688
23 3.67565795 3.25277439
24 3.97779078 3.67565795
25 3.77395569 3.97779078
26 3.27159082 3.77395569
27 2.96456505 3.27159082
28 2.89854280 2.96456505
29 2.68377492 2.89854280
30 1.59904332 2.68377492
31 2.38789777 1.59904332
32 3.18062175 2.38789777
33 3.54327501 3.18062175
34 3.62108829 3.54327501
35 3.20590876 3.62108829
36 3.37707314 3.20590876
37 2.91969073 3.37707314
38 2.68635740 2.91969073
39 2.22578432 2.68635740
40 1.72169897 2.22578432
41 0.88435223 1.72169897
42 -0.35392668 0.88435223
43 0.87299086 -0.35392668
44 1.55023061 0.87299086
45 2.16643118 1.55023061
46 2.51327601 2.16643118
47 2.33615957 2.51327601
48 2.59183972 2.33615957
49 2.10348886 2.59183972
50 1.73918708 2.10348886
51 1.50119286 1.73918708
52 1.35065483 1.50119286
53 0.79782386 1.35065483
54 -0.42497083 0.79782386
55 0.46388362 -0.42497083
56 1.51015492 0.46388362
57 2.51796590 1.51015492
58 2.59577919 2.51796590
59 2.34963120 2.59577919
60 2.42079558 2.34963120
61 1.96341317 2.42079558
62 1.42298520 1.96341317
63 0.97789635 1.42298520
64 1.19638987 0.97789635
65 1.08162199 1.19638987
66 0.15043771 1.08162199
67 0.82380793 0.15043771
68 1.63201614 0.82380793
69 1.71015362 1.63201614
70 1.65699845 1.71015362
71 0.87278738 1.65699845
72 0.60588866 0.87278738
73 0.47108512 0.60588866
74 0.50678333 0.47108512
75 0.38427334 0.50678333
76 0.44921954 0.38427334
77 -0.01909565 0.44921954
78 -0.90382725 -0.01909565
79 0.86954297 -0.90382725
80 2.19323540 0.86954297
81 2.32492021 2.19323540
82 2.20273349 2.32492021
83 2.24110128 2.20273349
84 2.76581297 2.24110128
85 2.57746212 2.76581297
86 2.99767610 2.57746212
87 3.05258725 2.99767610
88 2.76398613 3.05258725
89 1.69567093 2.76398613
90 -0.08906067 1.69567093
91 -0.77762735 -0.08906067
92 -1.84684029 -0.77762735
93 -3.24612394 -1.84684029
94 -4.01476333 -3.24612394
95 -4.13833246 -4.01476333
96 -5.38845199 -4.13833246
97 -3.85551894 -5.38845199
98 -3.55078918 -3.85551894
99 -3.59587803 -3.55078918
100 -3.24641607 -3.59587803
101 -2.32312085 -3.24641607
102 -2.20655749 -2.32312085
103 0.15712818 -2.20655749
104 -0.62756898 0.15712818
105 -2.36491572 -0.62756898
106 -3.50258666 -2.36491572
107 -4.94034506 -3.50258666
108 -5.22272800 -4.94034506
109 -5.28011040 -5.22272800
110 -4.46699105 -5.28011040
111 -2.05143795 -4.46699105
112 -1.31746021 -2.05143795
113 -2.08577540 -1.31746021
114 -3.43953855 -2.08577540
115 -4.35068410 -3.43953855
116 -4.06505476 -4.35068410
117 -1.64885418 -4.06505476
118 -1.27104089 -1.64885418
119 -0.84815734 -1.27104089
120 -0.66989832 -0.84815734
121 -1.34276495 -0.66989832
122 -1.47609829 -1.34276495
123 -2.41279755 -1.47609829
124 -2.81688290 -2.41279755
125 -3.70777695 -2.81688290
126 -2.93896123 -3.70777695
127 -4.12752792 -2.93896123
128 -4.51931972 -4.12752792
129 -4.01860337 -4.51931972
130 -3.32530586 -4.01860337
131 -1.80242230 -3.32530586
132 0.28422631 -1.80242230
133 1.33393854 0.28422631
134 1.48512098 1.33393854
135 0.64003213 1.48512098
136 -0.10211631 0.64003213
137 0.72117890 -0.10211631
138 2.55193153 0.72117890
139 1.96336485 2.55193153
140 1.94060459 1.96336485
141 1.70325785 1.94060459
142 1.60365000 1.70325785
143 1.27298624 1.60365000
144 0.49060330 1.27298624
145 -0.46677910 0.49060330
146 -1.36914398 -0.46677910
147 -1.35359088 -1.36914398
148 -0.39703428 -1.35359088
149 0.48110321 -0.39703428
150 3.18088739 0.48110321
151 2.93877338 3.18088739
152 2.86246581 2.93877338
153 2.73930835 2.86246581
154 1.76357431 2.73930835
155 1.07936323 1.76357431
156 1.03504338 1.07936323
157 1.20023984 1.03504338
158 2.08948537 1.20023984
159 2.27536498 2.08948537
160 2.35579540 2.27536498
161 2.61005907 2.35579540
162 3.02532747 2.61005907
163 1.73676079 3.02532747
164 1.81400053 1.73676079
165 1.55407493 1.81400053
166 1.70091976 1.55407493
167 2.07735064 1.70091976
168 1.54851501 2.07735064
169 1.46016415 1.54851501
170 0.71973619 1.46016415
171 1.28174197 0.71973619
172 1.81571971 1.28174197
173 1.77837297 1.81571971
174 2.30912560 1.77837297
175 1.06701160 2.30912560
176 0.42167248 1.06701160
177 -0.33115849 0.42167248
178 -0.51528211 -0.33115849
179 -1.17691433 -0.51528211
180 -1.24381304 -1.17691433
181 -1.14764812 -1.24381304
182 -0.38098146 -1.14764812
183 1.34296123 -0.38098146
184 0.98532857 1.34296123
185 0.40152915 0.98532857
186 -0.08320245 0.40152915
187 -2.62531645 -0.08320245
188 -3.86356093 -2.62531645
189 -3.17123417 -3.86356093
190 -2.61729471 -3.17123417
191 -1.99441115 -2.61729471
192 -0.88518368 -1.99441115
193 -1.18901877 -0.88518368
194 -1.44622592 -1.18901877
195 -2.27583055 -1.44622592
196 -1.56572662 -2.27583055
197 1.14208436 -1.56572662
198 4.84186854 1.14208436
199 4.16169144 4.84186854
200 2.73893119 4.16169144
201 0.46352136 2.73893119
202 -2.72640195 0.46352136
203 -2.09512880 -2.72640195
204 0.36894095 -2.09512880
205 1.81155854 0.36894095
206 1.57952017 1.81155854
207 1.18797863 1.57952017
208 -0.30771713 1.18797863
209 -0.26764273 -0.30771713
210 -0.14398474 -0.26764273
211 -0.65642524 -0.14398474
212 -1.71724858 -0.65642524
213 -2.61653223 -1.71724858
214 NA -2.61653223
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -5.45428252 -5.06593166
[2,] -5.36503699 -5.45428252
[3,] -5.64109430 -5.36503699
[4,] -5.29163233 -5.64109430
[5,] -5.34446329 -5.29163233
[6,] -6.31371067 -5.34446329
[7,] -5.89388776 -6.31371067
[8,] -4.84761647 -5.89388776
[9,] -3.98496321 -4.84761647
[10,] -2.93811838 -3.98496321
[11,] -2.11523482 -2.93811838
[12,] -0.99052312 -2.11523482
[13,] -0.87887398 -0.99052312
[14,] -0.44317577 -0.87887398
[15,] -0.50374885 -0.44317577
[16,] -0.49234997 -0.50374885
[17,] -0.52969671 -0.49234997
[18,] -0.76088099 -0.52969671
[19,] 0.98861542 -0.76088099
[20,] 1.64327630 0.98861542
[21,] 2.65947688 1.64327630
[22,] 3.25277439 2.65947688
[23,] 3.67565795 3.25277439
[24,] 3.97779078 3.67565795
[25,] 3.77395569 3.97779078
[26,] 3.27159082 3.77395569
[27,] 2.96456505 3.27159082
[28,] 2.89854280 2.96456505
[29,] 2.68377492 2.89854280
[30,] 1.59904332 2.68377492
[31,] 2.38789777 1.59904332
[32,] 3.18062175 2.38789777
[33,] 3.54327501 3.18062175
[34,] 3.62108829 3.54327501
[35,] 3.20590876 3.62108829
[36,] 3.37707314 3.20590876
[37,] 2.91969073 3.37707314
[38,] 2.68635740 2.91969073
[39,] 2.22578432 2.68635740
[40,] 1.72169897 2.22578432
[41,] 0.88435223 1.72169897
[42,] -0.35392668 0.88435223
[43,] 0.87299086 -0.35392668
[44,] 1.55023061 0.87299086
[45,] 2.16643118 1.55023061
[46,] 2.51327601 2.16643118
[47,] 2.33615957 2.51327601
[48,] 2.59183972 2.33615957
[49,] 2.10348886 2.59183972
[50,] 1.73918708 2.10348886
[51,] 1.50119286 1.73918708
[52,] 1.35065483 1.50119286
[53,] 0.79782386 1.35065483
[54,] -0.42497083 0.79782386
[55,] 0.46388362 -0.42497083
[56,] 1.51015492 0.46388362
[57,] 2.51796590 1.51015492
[58,] 2.59577919 2.51796590
[59,] 2.34963120 2.59577919
[60,] 2.42079558 2.34963120
[61,] 1.96341317 2.42079558
[62,] 1.42298520 1.96341317
[63,] 0.97789635 1.42298520
[64,] 1.19638987 0.97789635
[65,] 1.08162199 1.19638987
[66,] 0.15043771 1.08162199
[67,] 0.82380793 0.15043771
[68,] 1.63201614 0.82380793
[69,] 1.71015362 1.63201614
[70,] 1.65699845 1.71015362
[71,] 0.87278738 1.65699845
[72,] 0.60588866 0.87278738
[73,] 0.47108512 0.60588866
[74,] 0.50678333 0.47108512
[75,] 0.38427334 0.50678333
[76,] 0.44921954 0.38427334
[77,] -0.01909565 0.44921954
[78,] -0.90382725 -0.01909565
[79,] 0.86954297 -0.90382725
[80,] 2.19323540 0.86954297
[81,] 2.32492021 2.19323540
[82,] 2.20273349 2.32492021
[83,] 2.24110128 2.20273349
[84,] 2.76581297 2.24110128
[85,] 2.57746212 2.76581297
[86,] 2.99767610 2.57746212
[87,] 3.05258725 2.99767610
[88,] 2.76398613 3.05258725
[89,] 1.69567093 2.76398613
[90,] -0.08906067 1.69567093
[91,] -0.77762735 -0.08906067
[92,] -1.84684029 -0.77762735
[93,] -3.24612394 -1.84684029
[94,] -4.01476333 -3.24612394
[95,] -4.13833246 -4.01476333
[96,] -5.38845199 -4.13833246
[97,] -3.85551894 -5.38845199
[98,] -3.55078918 -3.85551894
[99,] -3.59587803 -3.55078918
[100,] -3.24641607 -3.59587803
[101,] -2.32312085 -3.24641607
[102,] -2.20655749 -2.32312085
[103,] 0.15712818 -2.20655749
[104,] -0.62756898 0.15712818
[105,] -2.36491572 -0.62756898
[106,] -3.50258666 -2.36491572
[107,] -4.94034506 -3.50258666
[108,] -5.22272800 -4.94034506
[109,] -5.28011040 -5.22272800
[110,] -4.46699105 -5.28011040
[111,] -2.05143795 -4.46699105
[112,] -1.31746021 -2.05143795
[113,] -2.08577540 -1.31746021
[114,] -3.43953855 -2.08577540
[115,] -4.35068410 -3.43953855
[116,] -4.06505476 -4.35068410
[117,] -1.64885418 -4.06505476
[118,] -1.27104089 -1.64885418
[119,] -0.84815734 -1.27104089
[120,] -0.66989832 -0.84815734
[121,] -1.34276495 -0.66989832
[122,] -1.47609829 -1.34276495
[123,] -2.41279755 -1.47609829
[124,] -2.81688290 -2.41279755
[125,] -3.70777695 -2.81688290
[126,] -2.93896123 -3.70777695
[127,] -4.12752792 -2.93896123
[128,] -4.51931972 -4.12752792
[129,] -4.01860337 -4.51931972
[130,] -3.32530586 -4.01860337
[131,] -1.80242230 -3.32530586
[132,] 0.28422631 -1.80242230
[133,] 1.33393854 0.28422631
[134,] 1.48512098 1.33393854
[135,] 0.64003213 1.48512098
[136,] -0.10211631 0.64003213
[137,] 0.72117890 -0.10211631
[138,] 2.55193153 0.72117890
[139,] 1.96336485 2.55193153
[140,] 1.94060459 1.96336485
[141,] 1.70325785 1.94060459
[142,] 1.60365000 1.70325785
[143,] 1.27298624 1.60365000
[144,] 0.49060330 1.27298624
[145,] -0.46677910 0.49060330
[146,] -1.36914398 -0.46677910
[147,] -1.35359088 -1.36914398
[148,] -0.39703428 -1.35359088
[149,] 0.48110321 -0.39703428
[150,] 3.18088739 0.48110321
[151,] 2.93877338 3.18088739
[152,] 2.86246581 2.93877338
[153,] 2.73930835 2.86246581
[154,] 1.76357431 2.73930835
[155,] 1.07936323 1.76357431
[156,] 1.03504338 1.07936323
[157,] 1.20023984 1.03504338
[158,] 2.08948537 1.20023984
[159,] 2.27536498 2.08948537
[160,] 2.35579540 2.27536498
[161,] 2.61005907 2.35579540
[162,] 3.02532747 2.61005907
[163,] 1.73676079 3.02532747
[164,] 1.81400053 1.73676079
[165,] 1.55407493 1.81400053
[166,] 1.70091976 1.55407493
[167,] 2.07735064 1.70091976
[168,] 1.54851501 2.07735064
[169,] 1.46016415 1.54851501
[170,] 0.71973619 1.46016415
[171,] 1.28174197 0.71973619
[172,] 1.81571971 1.28174197
[173,] 1.77837297 1.81571971
[174,] 2.30912560 1.77837297
[175,] 1.06701160 2.30912560
[176,] 0.42167248 1.06701160
[177,] -0.33115849 0.42167248
[178,] -0.51528211 -0.33115849
[179,] -1.17691433 -0.51528211
[180,] -1.24381304 -1.17691433
[181,] -1.14764812 -1.24381304
[182,] -0.38098146 -1.14764812
[183,] 1.34296123 -0.38098146
[184,] 0.98532857 1.34296123
[185,] 0.40152915 0.98532857
[186,] -0.08320245 0.40152915
[187,] -2.62531645 -0.08320245
[188,] -3.86356093 -2.62531645
[189,] -3.17123417 -3.86356093
[190,] -2.61729471 -3.17123417
[191,] -1.99441115 -2.61729471
[192,] -0.88518368 -1.99441115
[193,] -1.18901877 -0.88518368
[194,] -1.44622592 -1.18901877
[195,] -2.27583055 -1.44622592
[196,] -1.56572662 -2.27583055
[197,] 1.14208436 -1.56572662
[198,] 4.84186854 1.14208436
[199,] 4.16169144 4.84186854
[200,] 2.73893119 4.16169144
[201,] 0.46352136 2.73893119
[202,] -2.72640195 0.46352136
[203,] -2.09512880 -2.72640195
[204,] 0.36894095 -2.09512880
[205,] 1.81155854 0.36894095
[206,] 1.57952017 1.81155854
[207,] 1.18797863 1.57952017
[208,] -0.30771713 1.18797863
[209,] -0.26764273 -0.30771713
[210,] -0.14398474 -0.26764273
[211,] -0.65642524 -0.14398474
[212,] -1.71724858 -0.65642524
[213,] -2.61653223 -1.71724858
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -5.45428252 -5.06593166
2 -5.36503699 -5.45428252
3 -5.64109430 -5.36503699
4 -5.29163233 -5.64109430
5 -5.34446329 -5.29163233
6 -6.31371067 -5.34446329
7 -5.89388776 -6.31371067
8 -4.84761647 -5.89388776
9 -3.98496321 -4.84761647
10 -2.93811838 -3.98496321
11 -2.11523482 -2.93811838
12 -0.99052312 -2.11523482
13 -0.87887398 -0.99052312
14 -0.44317577 -0.87887398
15 -0.50374885 -0.44317577
16 -0.49234997 -0.50374885
17 -0.52969671 -0.49234997
18 -0.76088099 -0.52969671
19 0.98861542 -0.76088099
20 1.64327630 0.98861542
21 2.65947688 1.64327630
22 3.25277439 2.65947688
23 3.67565795 3.25277439
24 3.97779078 3.67565795
25 3.77395569 3.97779078
26 3.27159082 3.77395569
27 2.96456505 3.27159082
28 2.89854280 2.96456505
29 2.68377492 2.89854280
30 1.59904332 2.68377492
31 2.38789777 1.59904332
32 3.18062175 2.38789777
33 3.54327501 3.18062175
34 3.62108829 3.54327501
35 3.20590876 3.62108829
36 3.37707314 3.20590876
37 2.91969073 3.37707314
38 2.68635740 2.91969073
39 2.22578432 2.68635740
40 1.72169897 2.22578432
41 0.88435223 1.72169897
42 -0.35392668 0.88435223
43 0.87299086 -0.35392668
44 1.55023061 0.87299086
45 2.16643118 1.55023061
46 2.51327601 2.16643118
47 2.33615957 2.51327601
48 2.59183972 2.33615957
49 2.10348886 2.59183972
50 1.73918708 2.10348886
51 1.50119286 1.73918708
52 1.35065483 1.50119286
53 0.79782386 1.35065483
54 -0.42497083 0.79782386
55 0.46388362 -0.42497083
56 1.51015492 0.46388362
57 2.51796590 1.51015492
58 2.59577919 2.51796590
59 2.34963120 2.59577919
60 2.42079558 2.34963120
61 1.96341317 2.42079558
62 1.42298520 1.96341317
63 0.97789635 1.42298520
64 1.19638987 0.97789635
65 1.08162199 1.19638987
66 0.15043771 1.08162199
67 0.82380793 0.15043771
68 1.63201614 0.82380793
69 1.71015362 1.63201614
70 1.65699845 1.71015362
71 0.87278738 1.65699845
72 0.60588866 0.87278738
73 0.47108512 0.60588866
74 0.50678333 0.47108512
75 0.38427334 0.50678333
76 0.44921954 0.38427334
77 -0.01909565 0.44921954
78 -0.90382725 -0.01909565
79 0.86954297 -0.90382725
80 2.19323540 0.86954297
81 2.32492021 2.19323540
82 2.20273349 2.32492021
83 2.24110128 2.20273349
84 2.76581297 2.24110128
85 2.57746212 2.76581297
86 2.99767610 2.57746212
87 3.05258725 2.99767610
88 2.76398613 3.05258725
89 1.69567093 2.76398613
90 -0.08906067 1.69567093
91 -0.77762735 -0.08906067
92 -1.84684029 -0.77762735
93 -3.24612394 -1.84684029
94 -4.01476333 -3.24612394
95 -4.13833246 -4.01476333
96 -5.38845199 -4.13833246
97 -3.85551894 -5.38845199
98 -3.55078918 -3.85551894
99 -3.59587803 -3.55078918
100 -3.24641607 -3.59587803
101 -2.32312085 -3.24641607
102 -2.20655749 -2.32312085
103 0.15712818 -2.20655749
104 -0.62756898 0.15712818
105 -2.36491572 -0.62756898
106 -3.50258666 -2.36491572
107 -4.94034506 -3.50258666
108 -5.22272800 -4.94034506
109 -5.28011040 -5.22272800
110 -4.46699105 -5.28011040
111 -2.05143795 -4.46699105
112 -1.31746021 -2.05143795
113 -2.08577540 -1.31746021
114 -3.43953855 -2.08577540
115 -4.35068410 -3.43953855
116 -4.06505476 -4.35068410
117 -1.64885418 -4.06505476
118 -1.27104089 -1.64885418
119 -0.84815734 -1.27104089
120 -0.66989832 -0.84815734
121 -1.34276495 -0.66989832
122 -1.47609829 -1.34276495
123 -2.41279755 -1.47609829
124 -2.81688290 -2.41279755
125 -3.70777695 -2.81688290
126 -2.93896123 -3.70777695
127 -4.12752792 -2.93896123
128 -4.51931972 -4.12752792
129 -4.01860337 -4.51931972
130 -3.32530586 -4.01860337
131 -1.80242230 -3.32530586
132 0.28422631 -1.80242230
133 1.33393854 0.28422631
134 1.48512098 1.33393854
135 0.64003213 1.48512098
136 -0.10211631 0.64003213
137 0.72117890 -0.10211631
138 2.55193153 0.72117890
139 1.96336485 2.55193153
140 1.94060459 1.96336485
141 1.70325785 1.94060459
142 1.60365000 1.70325785
143 1.27298624 1.60365000
144 0.49060330 1.27298624
145 -0.46677910 0.49060330
146 -1.36914398 -0.46677910
147 -1.35359088 -1.36914398
148 -0.39703428 -1.35359088
149 0.48110321 -0.39703428
150 3.18088739 0.48110321
151 2.93877338 3.18088739
152 2.86246581 2.93877338
153 2.73930835 2.86246581
154 1.76357431 2.73930835
155 1.07936323 1.76357431
156 1.03504338 1.07936323
157 1.20023984 1.03504338
158 2.08948537 1.20023984
159 2.27536498 2.08948537
160 2.35579540 2.27536498
161 2.61005907 2.35579540
162 3.02532747 2.61005907
163 1.73676079 3.02532747
164 1.81400053 1.73676079
165 1.55407493 1.81400053
166 1.70091976 1.55407493
167 2.07735064 1.70091976
168 1.54851501 2.07735064
169 1.46016415 1.54851501
170 0.71973619 1.46016415
171 1.28174197 0.71973619
172 1.81571971 1.28174197
173 1.77837297 1.81571971
174 2.30912560 1.77837297
175 1.06701160 2.30912560
176 0.42167248 1.06701160
177 -0.33115849 0.42167248
178 -0.51528211 -0.33115849
179 -1.17691433 -0.51528211
180 -1.24381304 -1.17691433
181 -1.14764812 -1.24381304
182 -0.38098146 -1.14764812
183 1.34296123 -0.38098146
184 0.98532857 1.34296123
185 0.40152915 0.98532857
186 -0.08320245 0.40152915
187 -2.62531645 -0.08320245
188 -3.86356093 -2.62531645
189 -3.17123417 -3.86356093
190 -2.61729471 -3.17123417
191 -1.99441115 -2.61729471
192 -0.88518368 -1.99441115
193 -1.18901877 -0.88518368
194 -1.44622592 -1.18901877
195 -2.27583055 -1.44622592
196 -1.56572662 -2.27583055
197 1.14208436 -1.56572662
198 4.84186854 1.14208436
199 4.16169144 4.84186854
200 2.73893119 4.16169144
201 0.46352136 2.73893119
202 -2.72640195 0.46352136
203 -2.09512880 -2.72640195
204 0.36894095 -2.09512880
205 1.81155854 0.36894095
206 1.57952017 1.81155854
207 1.18797863 1.57952017
208 -0.30771713 1.18797863
209 -0.26764273 -0.30771713
210 -0.14398474 -0.26764273
211 -0.65642524 -0.14398474
212 -1.71724858 -0.65642524
213 -2.61653223 -1.71724858
> 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/7r8df1262199215.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/86g7j1262199215.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/97nyo1262199215.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/10hm0r1262199215.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/113mcx1262199215.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/12ss901262199215.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/1307nl1262199215.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/14m0c91262199215.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/15gdmb1262199215.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/167fnj1262199215.tab")
+ }
> try(system("convert tmp/1e4zo1262199215.ps tmp/1e4zo1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/2n59y1262199215.ps tmp/2n59y1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/3dqo31262199215.ps tmp/3dqo31262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/4ozuu1262199215.ps tmp/4ozuu1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/5g1811262199215.ps tmp/5g1811262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/6qx0v1262199215.ps tmp/6qx0v1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/7r8df1262199215.ps tmp/7r8df1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/86g7j1262199215.ps tmp/86g7j1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/97nyo1262199215.ps tmp/97nyo1262199215.png",intern=TRUE))
character(0)
> try(system("convert tmp/10hm0r1262199215.ps tmp/10hm0r1262199215.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.215 1.794 6.985