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(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.3
+ ,1.6
+ ,20.3
+ ,2
+ ,19.3
+ ,2.1
+ ,18.7
+ ,1.9
+ ,21
+ ,1.5
+ ,24
+ ,1.2
+ ,24.8
+ ,1.5
+ ,24.2
+ ,2.2
+ ,23.3
+ ,2.1
+ ,22.7
+ ,2.1
+ ,22.3
+ ,2.1
+ ,21.8
+ ,1.9
+ ,21.2
+ ,1.3
+ ,20.5
+ ,1.1
+ ,19.7
+ ,1.4
+ ,19.2
+ ,1.6
+ ,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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
+ ,198)
+ ,dimnames=list(c('Y(Werkloosheid)'
+ ,'X(inflatie)')
+ ,1:198))
> y <- array(NA,dim=c(2,198),dimnames=list(c('Y(Werkloosheid)','X(inflatie)'),1:198))
> 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 17.4 2.3 1 0 0 0 0 0 0 0 0 0 0 1
2 17.4 2.0 0 1 0 0 0 0 0 0 0 0 0 2
3 20.1 2.3 0 0 1 0 0 0 0 0 0 0 0 3
4 23.2 2.9 0 0 0 1 0 0 0 0 0 0 0 4
5 24.2 2.5 0 0 0 0 1 0 0 0 0 0 0 5
6 24.2 2.5 0 0 0 0 0 1 0 0 0 0 0 6
7 23.9 2.3 0 0 0 0 0 0 1 0 0 0 0 7
8 23.8 2.5 0 0 0 0 0 0 0 1 0 0 0 8
9 23.8 2.3 0 0 0 0 0 0 0 0 1 0 0 9
10 23.3 2.4 0 0 0 0 0 0 0 0 0 1 0 10
11 22.4 2.2 0 0 0 0 0 0 0 0 0 0 1 11
12 21.5 2.4 0 0 0 0 0 0 0 0 0 0 0 12
13 20.5 2.6 1 0 0 0 0 0 0 0 0 0 0 13
14 19.9 2.8 0 1 0 0 0 0 0 0 0 0 0 14
15 22.0 2.8 0 0 1 0 0 0 0 0 0 0 0 15
16 24.9 2.5 0 0 0 1 0 0 0 0 0 0 0 16
17 25.7 2.5 0 0 0 0 1 0 0 0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
78 19.0 1.4 0 0 0 0 0 1 0 0 0 0 0 78
79 17.0 1.6 0 0 0 0 0 0 1 0 0 0 0 79
80 16.1 2.1 0 0 0 0 0 0 0 1 0 0 0 80
81 15.9 0.3 0 0 0 0 0 0 0 0 1 0 0 81
82 15.7 2.1 0 0 0 0 0 0 0 0 0 1 0 82
83 15.1 2.5 0 0 0 0 0 0 0 0 0 0 1 83
84 14.8 2.3 0 0 0 0 0 0 0 0 0 0 0 84
85 14.3 2.4 1 0 0 0 0 0 0 0 0 0 0 85
86 14.5 3.0 0 1 0 0 0 0 0 0 0 0 0 86
87 18.9 1.7 0 0 1 0 0 0 0 0 0 0 0 87
88 21.6 3.5 0 0 0 1 0 0 0 0 0 0 0 88
89 20.4 4.0 0 0 0 0 1 0 0 0 0 0 0 89
90 17.9 3.7 0 0 0 0 0 1 0 0 0 0 0 90
91 15.7 3.7 0 0 0 0 0 0 1 0 0 0 0 91
92 14.5 3.0 0 0 0 0 0 0 0 1 0 0 0 92
93 14.0 2.7 0 0 0 0 0 0 0 0 1 0 0 93
94 13.9 2.5 0 0 0 0 0 0 0 0 0 1 0 94
95 14.4 2.2 0 0 0 0 0 0 0 0 0 0 1 95
96 15.8 2.9 0 0 0 0 0 0 0 0 0 0 0 96
97 15.6 3.1 1 0 0 0 0 0 0 0 0 0 0 97
98 14.7 3.0 0 1 0 0 0 0 0 0 0 0 0 98
99 16.7 2.8 0 0 1 0 0 0 0 0 0 0 0 99
100 17.9 2.5 0 0 0 1 0 0 0 0 0 0 0 100
101 18.7 1.9 0 0 0 0 1 0 0 0 0 0 0 101
102 20.1 1.9 0 0 0 0 0 1 0 0 0 0 0 102
103 19.5 1.8 0 0 0 0 0 0 1 0 0 0 0 103
104 19.4 2.0 0 0 0 0 0 0 0 1 0 0 0 104
105 18.6 2.6 0 0 0 0 0 0 0 0 1 0 0 105
106 17.8 2.5 0 0 0 0 0 0 0 0 0 1 0 106
107 17.1 2.5 0 0 0 0 0 0 0 0 0 0 1 107
108 16.5 1.6 0 0 0 0 0 0 0 0 0 0 0 108
109 15.5 1.4 1 0 0 0 0 0 0 0 0 0 0 109
110 14.9 0.8 0 1 0 0 0 0 0 0 0 0 0 110
111 18.6 1.1 0 0 1 0 0 0 0 0 0 0 0 111
112 19.1 1.3 0 0 0 1 0 0 0 0 0 0 0 112
113 18.8 1.2 0 0 0 0 1 0 0 0 0 0 0 113
114 18.2 1.3 0 0 0 0 0 1 0 0 0 0 0 114
115 18.0 1.1 0 0 0 0 0 0 1 0 0 0 0 115
116 19.0 1.3 0 0 0 0 0 0 0 1 0 0 0 116
117 20.7 1.2 0 0 0 0 0 0 0 0 1 0 0 117
118 21.2 1.6 0 0 0 0 0 0 0 0 0 1 0 118
119 20.7 1.7 0 0 0 0 0 0 0 0 0 0 1 119
120 19.6 1.5 0 0 0 0 0 0 0 0 0 0 0 120
121 18.6 0.9 1 0 0 0 0 0 0 0 0 0 0 121
122 18.7 1.5 0 1 0 0 0 0 0 0 0 0 0 122
123 23.8 1.4 0 0 1 0 0 0 0 0 0 0 0 123
124 24.9 1.6 0 0 0 1 0 0 0 0 0 0 0 124
125 24.8 1.7 0 0 0 0 1 0 0 0 0 0 0 125
126 23.8 1.4 0 0 0 0 0 1 0 0 0 0 0 126
127 22.3 1.8 0 0 0 0 0 0 1 0 0 0 0 127
128 21.7 1.7 0 0 0 0 0 0 0 1 0 0 0 128
129 20.7 1.4 0 0 0 0 0 0 0 0 1 0 0 129
130 19.7 1.2 0 0 0 0 0 0 0 0 0 1 0 130
131 18.4 1.0 0 0 0 0 0 0 0 0 0 0 1 131
132 17.4 1.7 0 0 0 0 0 0 0 0 0 0 0 132
133 17.0 2.4 1 0 0 0 0 0 0 0 0 0 0 133
134 18.0 2.0 0 1 0 0 0 0 0 0 0 0 0 134
135 23.8 2.1 0 0 1 0 0 0 0 0 0 0 0 135
136 25.5 2.0 0 0 0 1 0 0 0 0 0 0 0 136
137 25.6 1.8 0 0 0 0 1 0 0 0 0 0 0 137
138 23.7 2.7 0 0 0 0 0 1 0 0 0 0 0 138
139 22.0 2.3 0 0 0 0 0 0 1 0 0 0 0 139
140 21.3 1.9 0 0 0 0 0 0 0 1 0 0 0 140
141 20.7 2.0 0 0 0 0 0 0 0 0 1 0 0 141
142 20.4 2.3 0 0 0 0 0 0 0 0 0 1 0 142
143 20.3 2.8 0 0 0 0 0 0 0 0 0 0 1 143
144 20.4 2.4 0 0 0 0 0 0 0 0 0 0 0 144
145 19.8 2.3 1 0 0 0 0 0 0 0 0 0 0 145
146 19.5 2.7 0 1 0 0 0 0 0 0 0 0 0 146
147 23.1 2.7 0 0 1 0 0 0 0 0 0 0 0 147
148 23.5 2.9 0 0 0 1 0 0 0 0 0 0 0 148
149 23.5 3.0 0 0 0 0 1 0 0 0 0 0 0 149
150 22.9 2.2 0 0 0 0 0 1 0 0 0 0 0 150
151 21.9 2.3 0 0 0 0 0 0 1 0 0 0 0 151
152 21.5 2.8 0 0 0 0 0 0 0 1 0 0 0 152
153 20.5 2.8 0 0 0 0 0 0 0 0 1 0 0 153
154 20.2 2.8 0 0 0 0 0 0 0 0 0 1 0 154
155 19.4 2.2 0 0 0 0 0 0 0 0 0 0 1 155
156 19.2 2.6 0 0 0 0 0 0 0 0 0 0 0 156
157 18.8 2.8 1 0 0 0 0 0 0 0 0 0 0 157
158 18.8 2.5 0 1 0 0 0 0 0 0 0 0 0 158
159 22.6 2.4 0 0 1 0 0 0 0 0 0 0 0 159
160 23.3 2.3 0 0 0 1 0 0 0 0 0 0 0 160
161 23.0 1.9 0 0 0 0 1 0 0 0 0 0 0 161
162 21.4 1.7 0 0 0 0 0 1 0 0 0 0 0 162
163 19.9 2.0 0 0 0 0 0 0 1 0 0 0 0 163
164 18.8 2.1 0 0 0 0 0 0 0 1 0 0 0 164
165 18.6 1.7 0 0 0 0 0 0 0 0 1 0 0 165
166 18.4 1.8 0 0 0 0 0 0 0 0 0 1 0 166
167 18.6 1.8 0 0 0 0 0 0 0 0 0 0 1 167
168 19.9 1.8 0 0 0 0 0 0 0 0 0 0 0 168
169 19.2 1.3 1 0 0 0 0 0 0 0 0 0 0 169
170 18.4 1.3 0 1 0 0 0 0 0 0 0 0 0 170
171 21.1 1.3 0 0 1 0 0 0 0 0 0 0 0 171
172 20.5 1.2 0 0 0 1 0 0 0 0 0 0 0 172
173 19.1 1.4 0 0 0 0 1 0 0 0 0 0 0 173
174 18.1 2.2 0 0 0 0 0 1 0 0 0 0 0 174
175 17.0 2.9 0 0 0 0 0 0 1 0 0 0 0 175
176 17.1 3.1 0 0 0 0 0 0 0 1 0 0 0 176
177 17.4 3.5 0 0 0 0 0 0 0 0 1 0 0 177
178 16.8 3.6 0 0 0 0 0 0 0 0 0 1 0 178
179 15.3 4.4 0 0 0 0 0 0 0 0 0 0 1 179
180 14.3 4.1 0 0 0 0 0 0 0 0 0 0 0 180
181 13.4 5.1 1 0 0 0 0 0 0 0 0 0 0 181
182 15.3 5.8 0 1 0 0 0 0 0 0 0 0 0 182
183 22.1 5.9 0 0 1 0 0 0 0 0 0 0 0 183
184 23.7 5.4 0 0 0 1 0 0 0 0 0 0 0 184
185 22.2 5.5 0 0 0 0 1 0 0 0 0 0 0 185
186 19.5 4.8 0 0 0 0 0 1 0 0 0 0 0 186
187 16.6 3.2 0 0 0 0 0 0 1 0 0 0 0 187
188 17.3 2.7 0 0 0 0 0 0 0 1 0 0 0 188
189 19.8 2.1 0 0 0 0 0 0 0 0 1 0 0 189
190 21.2 1.9 0 0 0 0 0 0 0 0 0 1 0 190
191 21.5 0.6 0 0 0 0 0 0 0 0 0 0 1 191
192 20.6 0.7 0 0 0 0 0 0 0 0 0 0 0 192
193 19.1 -0.2 1 0 0 0 0 0 0 0 0 0 0 193
194 19.6 -1.0 0 1 0 0 0 0 0 0 0 0 0 194
195 23.5 -1.7 0 0 1 0 0 0 0 0 0 0 0 195
196 24.0 -0.7 0 0 0 1 0 0 0 0 0 0 0 196
197 23.2 -1.0 0 0 0 0 1 0 0 0 0 0 0 197
198 21.2 -0.9 0 0 0 0 0 1 0 0 0 0 0 198
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) `X(inflatie)` M1 M2 M3
21.73946 -0.66589 -0.89242 -1.08632 2.19044
M4 M5 M6 M7 M8
4.01406 3.97899 2.93019 1.74492 1.35468
M9 M10 M11 t
1.17289 0.97005 0.39234 -0.01392
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-5.836 -1.386 0.523 1.726 4.647
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 21.73946 0.68592 31.694 < 2e-16 ***
`X(inflatie)` -0.66589 0.15049 -4.425 1.65e-05 ***
M1 -0.89242 0.79295 -1.125 0.261863
M2 -1.08632 0.79288 -1.370 0.172328
M3 2.19044 0.79305 2.762 0.006327 **
M4 4.01406 0.79282 5.063 9.97e-07 ***
M5 3.97899 0.79282 5.019 1.22e-06 ***
M6 2.93018 0.79284 3.696 0.000289 ***
M7 1.74492 0.80495 2.168 0.031462 *
M8 1.35468 0.80488 1.683 0.094056 .
M9 1.17289 0.80489 1.457 0.146763
M10 0.97005 0.80476 1.205 0.229599
M11 0.39234 0.80473 0.488 0.626455
t -0.01392 0.00286 -4.869 2.41e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.276 on 184 degrees of freedom
Multiple R-squared: 0.4523, Adjusted R-squared: 0.4136
F-statistic: 11.69 on 13 and 184 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,] 1.018162e-02 2.036323e-02 0.989818383
[2,] 2.400179e-03 4.800358e-03 0.997599821
[3,] 1.312644e-03 2.625287e-03 0.998687356
[4,] 4.207333e-04 8.414666e-04 0.999579267
[5,] 2.451458e-04 4.902917e-04 0.999754854
[6,] 5.922307e-05 1.184461e-04 0.999940777
[7,] 1.647056e-05 3.294112e-05 0.999983529
[8,] 3.471941e-06 6.943882e-06 0.999996528
[9,] 4.023052e-06 8.046104e-06 0.999995977
[10,] 1.532573e-06 3.065147e-06 0.999998467
[11,] 7.005916e-07 1.401183e-06 0.999999299
[12,] 2.299431e-07 4.598862e-07 0.999999770
[13,] 5.244775e-08 1.048955e-07 0.999999948
[14,] 1.477772e-08 2.955544e-08 0.999999985
[15,] 7.931780e-09 1.586356e-08 0.999999992
[16,] 1.200504e-08 2.401008e-08 0.999999988
[17,] 2.654322e-08 5.308644e-08 0.999999973
[18,] 5.479830e-08 1.095966e-07 0.999999945
[19,] 1.724751e-07 3.449502e-07 0.999999828
[20,] 4.607821e-07 9.215643e-07 0.999999539
[21,] 2.571961e-07 5.143922e-07 0.999999743
[22,] 1.275005e-07 2.550011e-07 0.999999872
[23,] 5.494983e-08 1.098997e-07 0.999999945
[24,] 2.130701e-08 4.261402e-08 0.999999979
[25,] 8.663991e-09 1.732798e-08 0.999999991
[26,] 5.017323e-09 1.003465e-08 0.999999995
[27,] 3.207773e-09 6.415547e-09 0.999999997
[28,] 2.024984e-09 4.049968e-09 0.999999998
[29,] 1.365941e-09 2.731882e-09 0.999999999
[30,] 7.701507e-10 1.540301e-09 0.999999999
[31,] 3.411025e-10 6.822050e-10 1.000000000
[32,] 1.331607e-10 2.663214e-10 1.000000000
[33,] 5.345294e-11 1.069059e-10 1.000000000
[34,] 2.140016e-11 4.280032e-11 1.000000000
[35,] 7.113425e-12 1.422685e-11 1.000000000
[36,] 2.328871e-12 4.657743e-12 1.000000000
[37,] 8.304936e-13 1.660987e-12 1.000000000
[38,] 3.365369e-13 6.730737e-13 1.000000000
[39,] 1.893356e-13 3.786712e-13 1.000000000
[40,] 1.422942e-13 2.845885e-13 1.000000000
[41,] 1.177741e-13 2.355481e-13 1.000000000
[42,] 8.592597e-14 1.718519e-13 1.000000000
[43,] 4.774914e-14 9.549828e-14 1.000000000
[44,] 2.343714e-14 4.687429e-14 1.000000000
[45,] 7.776826e-15 1.555365e-14 1.000000000
[46,] 2.439805e-15 4.879609e-15 1.000000000
[47,] 7.478583e-16 1.495717e-15 1.000000000
[48,] 4.019125e-16 8.038249e-16 1.000000000
[49,] 7.619521e-16 1.523904e-15 1.000000000
[50,] 8.104329e-16 1.620866e-15 1.000000000
[51,] 6.827863e-16 1.365573e-15 1.000000000
[52,] 7.143863e-16 1.428773e-15 1.000000000
[53,] 9.588538e-16 1.917708e-15 1.000000000
[54,] 1.440835e-15 2.881670e-15 1.000000000
[55,] 4.763463e-15 9.526925e-15 1.000000000
[56,] 4.558070e-14 9.116139e-14 1.000000000
[57,] 9.886987e-13 1.977397e-12 1.000000000
[58,] 2.610237e-12 5.220474e-12 1.000000000
[59,] 1.418164e-12 2.836329e-12 1.000000000
[60,] 1.503491e-12 3.006982e-12 1.000000000
[61,] 8.844507e-11 1.768901e-10 1.000000000
[62,] 7.834262e-08 1.566852e-07 0.999999922
[63,] 1.502587e-05 3.005175e-05 0.999984974
[64,] 2.087339e-04 4.174678e-04 0.999791266
[65,] 5.789577e-03 1.157915e-02 0.994210423
[66,] 1.126120e-02 2.252240e-02 0.988738802
[67,] 1.322073e-02 2.644145e-02 0.986779273
[68,] 1.420258e-02 2.840516e-02 0.985797421
[69,] 1.193606e-02 2.387212e-02 0.988063940
[70,] 9.660660e-03 1.932132e-02 0.990339340
[71,] 7.960629e-03 1.592126e-02 0.992039371
[72,] 1.122444e-02 2.244889e-02 0.988775557
[73,] 9.885660e-03 1.977132e-02 0.990114340
[74,] 7.536681e-03 1.507336e-02 0.992463319
[75,] 6.882243e-03 1.376449e-02 0.993117757
[76,] 1.072290e-02 2.144579e-02 0.989277104
[77,] 1.940703e-02 3.881405e-02 0.980592973
[78,] 3.645799e-02 7.291598e-02 0.963542012
[79,] 4.857872e-02 9.715743e-02 0.951421284
[80,] 4.208967e-02 8.417935e-02 0.957910326
[81,] 4.005511e-02 8.011023e-02 0.959944887
[82,] 3.838022e-02 7.676044e-02 0.961619780
[83,] 5.473260e-02 1.094652e-01 0.945267402
[84,] 7.923295e-02 1.584659e-01 0.920767049
[85,] 1.005264e-01 2.010529e-01 0.899473561
[86,] 8.525198e-02 1.705040e-01 0.914748024
[87,] 7.139931e-02 1.427986e-01 0.928600688
[88,] 6.380943e-02 1.276189e-01 0.936190573
[89,] 6.481274e-02 1.296255e-01 0.935187256
[90,] 6.224225e-02 1.244845e-01 0.937757750
[91,] 5.999684e-02 1.199937e-01 0.940003158
[92,] 5.853359e-02 1.170672e-01 0.941466408
[93,] 6.093409e-02 1.218682e-01 0.939065913
[94,] 8.648809e-02 1.729762e-01 0.913511914
[95,] 1.472064e-01 2.944129e-01 0.852793567
[96,] 2.754149e-01 5.508299e-01 0.724585063
[97,] 4.829874e-01 9.659749e-01 0.517012551
[98,] 6.516539e-01 6.966922e-01 0.348346110
[99,] 7.308775e-01 5.382449e-01 0.269122463
[100,] 7.452479e-01 5.095042e-01 0.254752119
[101,] 7.555528e-01 4.888944e-01 0.244447211
[102,] 7.940701e-01 4.118599e-01 0.205929935
[103,] 8.287178e-01 3.425645e-01 0.171282247
[104,] 8.373904e-01 3.252193e-01 0.162609644
[105,] 8.391805e-01 3.216391e-01 0.160819526
[106,] 8.670876e-01 2.658249e-01 0.132912444
[107,] 9.278919e-01 1.442161e-01 0.072108052
[108,] 9.452990e-01 1.094021e-01 0.054701032
[109,] 9.541473e-01 9.170542e-02 0.045852711
[110,] 9.564364e-01 8.712712e-02 0.043563562
[111,] 9.601695e-01 7.966091e-02 0.039830455
[112,] 9.599719e-01 8.005617e-02 0.040028083
[113,] 9.538978e-01 9.220430e-02 0.046102152
[114,] 9.492446e-01 1.015107e-01 0.050755359
[115,] 9.545162e-01 9.096765e-02 0.045483824
[116,] 9.675452e-01 6.490951e-02 0.032454753
[117,] 9.744968e-01 5.100630e-02 0.025503150
[118,] 9.795319e-01 4.093628e-02 0.020468141
[119,] 9.869300e-01 2.613994e-02 0.013069969
[120,] 9.890456e-01 2.190885e-02 0.010954427
[121,] 9.906008e-01 1.879839e-02 0.009399194
[122,] 9.924557e-01 1.508856e-02 0.007544278
[123,] 9.924800e-01 1.504003e-02 0.007520014
[124,] 9.908069e-01 1.838621e-02 0.009193104
[125,] 9.881939e-01 2.361210e-02 0.011806052
[126,] 9.852202e-01 2.955968e-02 0.014779842
[127,] 9.834976e-01 3.300479e-02 0.016502395
[128,] 9.814916e-01 3.701681e-02 0.018508406
[129,] 9.798773e-01 4.024544e-02 0.020122721
[130,] 9.781809e-01 4.363827e-02 0.021819134
[131,] 9.769408e-01 4.611844e-02 0.023059219
[132,] 9.712022e-01 5.759567e-02 0.028797833
[133,] 9.655940e-01 6.881205e-02 0.034406025
[134,] 9.630722e-01 7.385570e-02 0.036927850
[135,] 9.709891e-01 5.802182e-02 0.029010908
[136,] 9.799152e-01 4.016958e-02 0.020084792
[137,] 9.771110e-01 4.577792e-02 0.022888958
[138,] 9.718228e-01 5.635433e-02 0.028177165
[139,] 9.620057e-01 7.598864e-02 0.037994321
[140,] 9.514466e-01 9.710675e-02 0.048553374
[141,] 9.472002e-01 1.055995e-01 0.052799769
[142,] 9.371658e-01 1.256684e-01 0.062834183
[143,] 9.230777e-01 1.538445e-01 0.076922271
[144,] 9.028367e-01 1.943265e-01 0.097163253
[145,] 8.898964e-01 2.202071e-01 0.110103560
[146,] 8.845802e-01 2.308396e-01 0.115419786
[147,] 9.036373e-01 1.927255e-01 0.096362745
[148,] 8.949080e-01 2.101840e-01 0.105092010
[149,] 8.606166e-01 2.787667e-01 0.139383355
[150,] 8.155998e-01 3.688004e-01 0.184400216
[151,] 7.708293e-01 4.583414e-01 0.229170710
[152,] 8.224285e-01 3.551429e-01 0.177571473
[153,] 9.184573e-01 1.630854e-01 0.081542697
[154,] 9.455367e-01 1.089267e-01 0.054463330
[155,] 9.257439e-01 1.485122e-01 0.074256077
[156,] 8.894224e-01 2.211552e-01 0.110577610
[157,] 8.472062e-01 3.055875e-01 0.152793772
[158,] 7.954977e-01 4.090047e-01 0.204502331
[159,] 8.142857e-01 3.714285e-01 0.185714265
[160,] 8.887465e-01 2.225070e-01 0.111253486
[161,] 9.143100e-01 1.713799e-01 0.085689966
[162,] 9.239848e-01 1.520304e-01 0.076015193
[163,] 8.591113e-01 2.817774e-01 0.140888692
[164,] 7.558883e-01 4.882235e-01 0.244111748
[165,] 8.355468e-01 3.289064e-01 0.164453195
> postscript(file="/var/www/html/rcomp/tmp/1vijg1262201303.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/2zh0h1262201303.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/3favg1262201303.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/4rank1262201303.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/5gzf71262201303.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 = 198
Frequency = 1
1 2 3 4 5 6
-1.901556275 -1.893503974 -2.256571912 -0.566739598 0.215899807 1.278626717
7 8 9 10 11 12
2.044640169 2.481980738 2.544509726 2.327862384 1.886316498 1.525759726
13 14 15 16 17 18
1.565285726 1.306284862 0.143448823 1.033976836 1.882973709 2.345932518
19 20 21 22 23 24
2.578535337 2.249518439 2.145226160 1.728810718 1.520443566 1.060118693
25 26 27 28 29 30
0.733287227 -0.058660472 -1.321264611 -0.064379131 0.651207109 1.313934018
31 32 33 34 35 36
1.779715571 1.617056140 1.579353227 1.096116519 0.720928101 0.393550061
37 38 39 40 41 42
0.366486695 -0.158871636 -1.388065142 -0.397537129 0.651227844 1.580080321
43 44 45 46 47 48
1.812683140 1.616844975 1.412552696 0.996137254 0.588233902 0.161319662
49 50 51 52 53 54
0.467435029 0.308434165 -0.754633774 0.002483606 0.884891112 1.081260555
55 56 57 58 59 60
1.147042107 0.484846475 0.014196729 -0.169271879 -0.144460297 -0.338427703
61 62 63 64 65 66
-0.132080436 -0.590849401 -1.553685440 0.303431940 1.719250079 1.915387622
67 68 69 70 71 72
1.947990441 2.018741643 2.214217465 2.030980756 2.422381704 2.495467465
73 74 75 76 77 78
2.402046631 1.343277667 -0.519558372 -1.196083525 -2.280729186 -3.651412909
79 80 81 82 83 84
-4.319041990 -4.481933321 -5.684834201 -4.469462308 -4.211471993 -4.238386233
85 86 87 88 89 90
-3.765449599 -2.958092996 -2.686590803 -0.597686088 -1.415742382 -3.052783572
91 92 93 94 95 96
-4.053591387 -5.315555118 -5.819615498 -5.836030940 -4.944166192 -2.671776131
97 98 99 100 101 102
-1.832250130 -2.591019095 -3.987033868 -4.796505854 -4.347045182 -1.884318273
103 104 105 106 107 108
-1.351715454 -0.914374885 -1.119130963 -1.768957038 -1.877324190 -2.670363998
109 110 111 112 113 114
-2.897195464 -3.688911262 -3.051979201 -4.228504354 -4.546096848 -4.016780572
115 116 117 118 119 120
-3.150767120 -1.613426551 0.215691804 1.198812562 1.357034777 0.530120537
121 122 123 124 125 126
0.036931604 0.744288206 2.514862800 1.938337647 1.953923887 1.816882696
127 128 129 130 131 132
1.782432349 1.520004818 0.515944438 -0.400471004 -1.242016889 -1.369626828
133 134 135 136 137 138
-0.397153994 0.544308941 3.148062269 2.971769016 2.987587155 2.749618366
139 140 141 142 143 144
1.982453084 1.420257453 1.082554540 1.199085932 2.023665614 2.263572641
145 146 147 148 149 150
2.503330541 2.677508410 3.014672371 1.738147218 1.853733457 1.783745433
151 152 153 154 155 156
2.049526986 2.386635655 1.582343376 1.499106667 0.891203315 1.363825276
157 158 159 160 161 162
2.003351276 2.011403578 2.481978172 1.305684919 0.788324324 0.117872501
163 164 165 166 167 168
0.016832787 -0.612416011 -0.883065757 -0.799713099 -0.008080251 1.698184243
169 170 171 172 173 174
1.571584676 0.979405078 0.416569039 -2.059724214 -3.277548608 -2.682106764
175 176 177 178 179 180
-2.116789011 -1.479448442 -0.717383254 -1.034030596 -1.409682814 -2.203186420
181 182 183 184 185 186
-1.530945485 1.043000484 4.646753812 4.104103091 2.719689331 0.616290673
187 188 189 190 191 192
-2.149947009 -1.378732008 0.917439513 2.401024071 2.426995151 1.999849011
193 194 195 196 197 198
0.806891977 0.981997445 1.153035839 0.509225620 -0.441545608 -1.312229331
> postscript(file="/var/www/html/rcomp/tmp/6z2yg1262201303.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 = 198
Frequency = 1
lag(myerror, k = 1) myerror
0 -1.901556275 NA
1 -1.893503974 -1.901556275
2 -2.256571912 -1.893503974
3 -0.566739598 -2.256571912
4 0.215899807 -0.566739598
5 1.278626717 0.215899807
6 2.044640169 1.278626717
7 2.481980738 2.044640169
8 2.544509726 2.481980738
9 2.327862384 2.544509726
10 1.886316498 2.327862384
11 1.525759726 1.886316498
12 1.565285726 1.525759726
13 1.306284862 1.565285726
14 0.143448823 1.306284862
15 1.033976836 0.143448823
16 1.882973709 1.033976836
17 2.345932518 1.882973709
18 2.578535337 2.345932518
19 2.249518439 2.578535337
20 2.145226160 2.249518439
21 1.728810718 2.145226160
22 1.520443566 1.728810718
23 1.060118693 1.520443566
24 0.733287227 1.060118693
25 -0.058660472 0.733287227
26 -1.321264611 -0.058660472
27 -0.064379131 -1.321264611
28 0.651207109 -0.064379131
29 1.313934018 0.651207109
30 1.779715571 1.313934018
31 1.617056140 1.779715571
32 1.579353227 1.617056140
33 1.096116519 1.579353227
34 0.720928101 1.096116519
35 0.393550061 0.720928101
36 0.366486695 0.393550061
37 -0.158871636 0.366486695
38 -1.388065142 -0.158871636
39 -0.397537129 -1.388065142
40 0.651227844 -0.397537129
41 1.580080321 0.651227844
42 1.812683140 1.580080321
43 1.616844975 1.812683140
44 1.412552696 1.616844975
45 0.996137254 1.412552696
46 0.588233902 0.996137254
47 0.161319662 0.588233902
48 0.467435029 0.161319662
49 0.308434165 0.467435029
50 -0.754633774 0.308434165
51 0.002483606 -0.754633774
52 0.884891112 0.002483606
53 1.081260555 0.884891112
54 1.147042107 1.081260555
55 0.484846475 1.147042107
56 0.014196729 0.484846475
57 -0.169271879 0.014196729
58 -0.144460297 -0.169271879
59 -0.338427703 -0.144460297
60 -0.132080436 -0.338427703
61 -0.590849401 -0.132080436
62 -1.553685440 -0.590849401
63 0.303431940 -1.553685440
64 1.719250079 0.303431940
65 1.915387622 1.719250079
66 1.947990441 1.915387622
67 2.018741643 1.947990441
68 2.214217465 2.018741643
69 2.030980756 2.214217465
70 2.422381704 2.030980756
71 2.495467465 2.422381704
72 2.402046631 2.495467465
73 1.343277667 2.402046631
74 -0.519558372 1.343277667
75 -1.196083525 -0.519558372
76 -2.280729186 -1.196083525
77 -3.651412909 -2.280729186
78 -4.319041990 -3.651412909
79 -4.481933321 -4.319041990
80 -5.684834201 -4.481933321
81 -4.469462308 -5.684834201
82 -4.211471993 -4.469462308
83 -4.238386233 -4.211471993
84 -3.765449599 -4.238386233
85 -2.958092996 -3.765449599
86 -2.686590803 -2.958092996
87 -0.597686088 -2.686590803
88 -1.415742382 -0.597686088
89 -3.052783572 -1.415742382
90 -4.053591387 -3.052783572
91 -5.315555118 -4.053591387
92 -5.819615498 -5.315555118
93 -5.836030940 -5.819615498
94 -4.944166192 -5.836030940
95 -2.671776131 -4.944166192
96 -1.832250130 -2.671776131
97 -2.591019095 -1.832250130
98 -3.987033868 -2.591019095
99 -4.796505854 -3.987033868
100 -4.347045182 -4.796505854
101 -1.884318273 -4.347045182
102 -1.351715454 -1.884318273
103 -0.914374885 -1.351715454
104 -1.119130963 -0.914374885
105 -1.768957038 -1.119130963
106 -1.877324190 -1.768957038
107 -2.670363998 -1.877324190
108 -2.897195464 -2.670363998
109 -3.688911262 -2.897195464
110 -3.051979201 -3.688911262
111 -4.228504354 -3.051979201
112 -4.546096848 -4.228504354
113 -4.016780572 -4.546096848
114 -3.150767120 -4.016780572
115 -1.613426551 -3.150767120
116 0.215691804 -1.613426551
117 1.198812562 0.215691804
118 1.357034777 1.198812562
119 0.530120537 1.357034777
120 0.036931604 0.530120537
121 0.744288206 0.036931604
122 2.514862800 0.744288206
123 1.938337647 2.514862800
124 1.953923887 1.938337647
125 1.816882696 1.953923887
126 1.782432349 1.816882696
127 1.520004818 1.782432349
128 0.515944438 1.520004818
129 -0.400471004 0.515944438
130 -1.242016889 -0.400471004
131 -1.369626828 -1.242016889
132 -0.397153994 -1.369626828
133 0.544308941 -0.397153994
134 3.148062269 0.544308941
135 2.971769016 3.148062269
136 2.987587155 2.971769016
137 2.749618366 2.987587155
138 1.982453084 2.749618366
139 1.420257453 1.982453084
140 1.082554540 1.420257453
141 1.199085932 1.082554540
142 2.023665614 1.199085932
143 2.263572641 2.023665614
144 2.503330541 2.263572641
145 2.677508410 2.503330541
146 3.014672371 2.677508410
147 1.738147218 3.014672371
148 1.853733457 1.738147218
149 1.783745433 1.853733457
150 2.049526986 1.783745433
151 2.386635655 2.049526986
152 1.582343376 2.386635655
153 1.499106667 1.582343376
154 0.891203315 1.499106667
155 1.363825276 0.891203315
156 2.003351276 1.363825276
157 2.011403578 2.003351276
158 2.481978172 2.011403578
159 1.305684919 2.481978172
160 0.788324324 1.305684919
161 0.117872501 0.788324324
162 0.016832787 0.117872501
163 -0.612416011 0.016832787
164 -0.883065757 -0.612416011
165 -0.799713099 -0.883065757
166 -0.008080251 -0.799713099
167 1.698184243 -0.008080251
168 1.571584676 1.698184243
169 0.979405078 1.571584676
170 0.416569039 0.979405078
171 -2.059724214 0.416569039
172 -3.277548608 -2.059724214
173 -2.682106764 -3.277548608
174 -2.116789011 -2.682106764
175 -1.479448442 -2.116789011
176 -0.717383254 -1.479448442
177 -1.034030596 -0.717383254
178 -1.409682814 -1.034030596
179 -2.203186420 -1.409682814
180 -1.530945485 -2.203186420
181 1.043000484 -1.530945485
182 4.646753812 1.043000484
183 4.104103091 4.646753812
184 2.719689331 4.104103091
185 0.616290673 2.719689331
186 -2.149947009 0.616290673
187 -1.378732008 -2.149947009
188 0.917439513 -1.378732008
189 2.401024071 0.917439513
190 2.426995151 2.401024071
191 1.999849011 2.426995151
192 0.806891977 1.999849011
193 0.981997445 0.806891977
194 1.153035839 0.981997445
195 0.509225620 1.153035839
196 -0.441545608 0.509225620
197 -1.312229331 -0.441545608
198 NA -1.312229331
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -1.893503974 -1.901556275
[2,] -2.256571912 -1.893503974
[3,] -0.566739598 -2.256571912
[4,] 0.215899807 -0.566739598
[5,] 1.278626717 0.215899807
[6,] 2.044640169 1.278626717
[7,] 2.481980738 2.044640169
[8,] 2.544509726 2.481980738
[9,] 2.327862384 2.544509726
[10,] 1.886316498 2.327862384
[11,] 1.525759726 1.886316498
[12,] 1.565285726 1.525759726
[13,] 1.306284862 1.565285726
[14,] 0.143448823 1.306284862
[15,] 1.033976836 0.143448823
[16,] 1.882973709 1.033976836
[17,] 2.345932518 1.882973709
[18,] 2.578535337 2.345932518
[19,] 2.249518439 2.578535337
[20,] 2.145226160 2.249518439
[21,] 1.728810718 2.145226160
[22,] 1.520443566 1.728810718
[23,] 1.060118693 1.520443566
[24,] 0.733287227 1.060118693
[25,] -0.058660472 0.733287227
[26,] -1.321264611 -0.058660472
[27,] -0.064379131 -1.321264611
[28,] 0.651207109 -0.064379131
[29,] 1.313934018 0.651207109
[30,] 1.779715571 1.313934018
[31,] 1.617056140 1.779715571
[32,] 1.579353227 1.617056140
[33,] 1.096116519 1.579353227
[34,] 0.720928101 1.096116519
[35,] 0.393550061 0.720928101
[36,] 0.366486695 0.393550061
[37,] -0.158871636 0.366486695
[38,] -1.388065142 -0.158871636
[39,] -0.397537129 -1.388065142
[40,] 0.651227844 -0.397537129
[41,] 1.580080321 0.651227844
[42,] 1.812683140 1.580080321
[43,] 1.616844975 1.812683140
[44,] 1.412552696 1.616844975
[45,] 0.996137254 1.412552696
[46,] 0.588233902 0.996137254
[47,] 0.161319662 0.588233902
[48,] 0.467435029 0.161319662
[49,] 0.308434165 0.467435029
[50,] -0.754633774 0.308434165
[51,] 0.002483606 -0.754633774
[52,] 0.884891112 0.002483606
[53,] 1.081260555 0.884891112
[54,] 1.147042107 1.081260555
[55,] 0.484846475 1.147042107
[56,] 0.014196729 0.484846475
[57,] -0.169271879 0.014196729
[58,] -0.144460297 -0.169271879
[59,] -0.338427703 -0.144460297
[60,] -0.132080436 -0.338427703
[61,] -0.590849401 -0.132080436
[62,] -1.553685440 -0.590849401
[63,] 0.303431940 -1.553685440
[64,] 1.719250079 0.303431940
[65,] 1.915387622 1.719250079
[66,] 1.947990441 1.915387622
[67,] 2.018741643 1.947990441
[68,] 2.214217465 2.018741643
[69,] 2.030980756 2.214217465
[70,] 2.422381704 2.030980756
[71,] 2.495467465 2.422381704
[72,] 2.402046631 2.495467465
[73,] 1.343277667 2.402046631
[74,] -0.519558372 1.343277667
[75,] -1.196083525 -0.519558372
[76,] -2.280729186 -1.196083525
[77,] -3.651412909 -2.280729186
[78,] -4.319041990 -3.651412909
[79,] -4.481933321 -4.319041990
[80,] -5.684834201 -4.481933321
[81,] -4.469462308 -5.684834201
[82,] -4.211471993 -4.469462308
[83,] -4.238386233 -4.211471993
[84,] -3.765449599 -4.238386233
[85,] -2.958092996 -3.765449599
[86,] -2.686590803 -2.958092996
[87,] -0.597686088 -2.686590803
[88,] -1.415742382 -0.597686088
[89,] -3.052783572 -1.415742382
[90,] -4.053591387 -3.052783572
[91,] -5.315555118 -4.053591387
[92,] -5.819615498 -5.315555118
[93,] -5.836030940 -5.819615498
[94,] -4.944166192 -5.836030940
[95,] -2.671776131 -4.944166192
[96,] -1.832250130 -2.671776131
[97,] -2.591019095 -1.832250130
[98,] -3.987033868 -2.591019095
[99,] -4.796505854 -3.987033868
[100,] -4.347045182 -4.796505854
[101,] -1.884318273 -4.347045182
[102,] -1.351715454 -1.884318273
[103,] -0.914374885 -1.351715454
[104,] -1.119130963 -0.914374885
[105,] -1.768957038 -1.119130963
[106,] -1.877324190 -1.768957038
[107,] -2.670363998 -1.877324190
[108,] -2.897195464 -2.670363998
[109,] -3.688911262 -2.897195464
[110,] -3.051979201 -3.688911262
[111,] -4.228504354 -3.051979201
[112,] -4.546096848 -4.228504354
[113,] -4.016780572 -4.546096848
[114,] -3.150767120 -4.016780572
[115,] -1.613426551 -3.150767120
[116,] 0.215691804 -1.613426551
[117,] 1.198812562 0.215691804
[118,] 1.357034777 1.198812562
[119,] 0.530120537 1.357034777
[120,] 0.036931604 0.530120537
[121,] 0.744288206 0.036931604
[122,] 2.514862800 0.744288206
[123,] 1.938337647 2.514862800
[124,] 1.953923887 1.938337647
[125,] 1.816882696 1.953923887
[126,] 1.782432349 1.816882696
[127,] 1.520004818 1.782432349
[128,] 0.515944438 1.520004818
[129,] -0.400471004 0.515944438
[130,] -1.242016889 -0.400471004
[131,] -1.369626828 -1.242016889
[132,] -0.397153994 -1.369626828
[133,] 0.544308941 -0.397153994
[134,] 3.148062269 0.544308941
[135,] 2.971769016 3.148062269
[136,] 2.987587155 2.971769016
[137,] 2.749618366 2.987587155
[138,] 1.982453084 2.749618366
[139,] 1.420257453 1.982453084
[140,] 1.082554540 1.420257453
[141,] 1.199085932 1.082554540
[142,] 2.023665614 1.199085932
[143,] 2.263572641 2.023665614
[144,] 2.503330541 2.263572641
[145,] 2.677508410 2.503330541
[146,] 3.014672371 2.677508410
[147,] 1.738147218 3.014672371
[148,] 1.853733457 1.738147218
[149,] 1.783745433 1.853733457
[150,] 2.049526986 1.783745433
[151,] 2.386635655 2.049526986
[152,] 1.582343376 2.386635655
[153,] 1.499106667 1.582343376
[154,] 0.891203315 1.499106667
[155,] 1.363825276 0.891203315
[156,] 2.003351276 1.363825276
[157,] 2.011403578 2.003351276
[158,] 2.481978172 2.011403578
[159,] 1.305684919 2.481978172
[160,] 0.788324324 1.305684919
[161,] 0.117872501 0.788324324
[162,] 0.016832787 0.117872501
[163,] -0.612416011 0.016832787
[164,] -0.883065757 -0.612416011
[165,] -0.799713099 -0.883065757
[166,] -0.008080251 -0.799713099
[167,] 1.698184243 -0.008080251
[168,] 1.571584676 1.698184243
[169,] 0.979405078 1.571584676
[170,] 0.416569039 0.979405078
[171,] -2.059724214 0.416569039
[172,] -3.277548608 -2.059724214
[173,] -2.682106764 -3.277548608
[174,] -2.116789011 -2.682106764
[175,] -1.479448442 -2.116789011
[176,] -0.717383254 -1.479448442
[177,] -1.034030596 -0.717383254
[178,] -1.409682814 -1.034030596
[179,] -2.203186420 -1.409682814
[180,] -1.530945485 -2.203186420
[181,] 1.043000484 -1.530945485
[182,] 4.646753812 1.043000484
[183,] 4.104103091 4.646753812
[184,] 2.719689331 4.104103091
[185,] 0.616290673 2.719689331
[186,] -2.149947009 0.616290673
[187,] -1.378732008 -2.149947009
[188,] 0.917439513 -1.378732008
[189,] 2.401024071 0.917439513
[190,] 2.426995151 2.401024071
[191,] 1.999849011 2.426995151
[192,] 0.806891977 1.999849011
[193,] 0.981997445 0.806891977
[194,] 1.153035839 0.981997445
[195,] 0.509225620 1.153035839
[196,] -0.441545608 0.509225620
[197,] -1.312229331 -0.441545608
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -1.893503974 -1.901556275
2 -2.256571912 -1.893503974
3 -0.566739598 -2.256571912
4 0.215899807 -0.566739598
5 1.278626717 0.215899807
6 2.044640169 1.278626717
7 2.481980738 2.044640169
8 2.544509726 2.481980738
9 2.327862384 2.544509726
10 1.886316498 2.327862384
11 1.525759726 1.886316498
12 1.565285726 1.525759726
13 1.306284862 1.565285726
14 0.143448823 1.306284862
15 1.033976836 0.143448823
16 1.882973709 1.033976836
17 2.345932518 1.882973709
18 2.578535337 2.345932518
19 2.249518439 2.578535337
20 2.145226160 2.249518439
21 1.728810718 2.145226160
22 1.520443566 1.728810718
23 1.060118693 1.520443566
24 0.733287227 1.060118693
25 -0.058660472 0.733287227
26 -1.321264611 -0.058660472
27 -0.064379131 -1.321264611
28 0.651207109 -0.064379131
29 1.313934018 0.651207109
30 1.779715571 1.313934018
31 1.617056140 1.779715571
32 1.579353227 1.617056140
33 1.096116519 1.579353227
34 0.720928101 1.096116519
35 0.393550061 0.720928101
36 0.366486695 0.393550061
37 -0.158871636 0.366486695
38 -1.388065142 -0.158871636
39 -0.397537129 -1.388065142
40 0.651227844 -0.397537129
41 1.580080321 0.651227844
42 1.812683140 1.580080321
43 1.616844975 1.812683140
44 1.412552696 1.616844975
45 0.996137254 1.412552696
46 0.588233902 0.996137254
47 0.161319662 0.588233902
48 0.467435029 0.161319662
49 0.308434165 0.467435029
50 -0.754633774 0.308434165
51 0.002483606 -0.754633774
52 0.884891112 0.002483606
53 1.081260555 0.884891112
54 1.147042107 1.081260555
55 0.484846475 1.147042107
56 0.014196729 0.484846475
57 -0.169271879 0.014196729
58 -0.144460297 -0.169271879
59 -0.338427703 -0.144460297
60 -0.132080436 -0.338427703
61 -0.590849401 -0.132080436
62 -1.553685440 -0.590849401
63 0.303431940 -1.553685440
64 1.719250079 0.303431940
65 1.915387622 1.719250079
66 1.947990441 1.915387622
67 2.018741643 1.947990441
68 2.214217465 2.018741643
69 2.030980756 2.214217465
70 2.422381704 2.030980756
71 2.495467465 2.422381704
72 2.402046631 2.495467465
73 1.343277667 2.402046631
74 -0.519558372 1.343277667
75 -1.196083525 -0.519558372
76 -2.280729186 -1.196083525
77 -3.651412909 -2.280729186
78 -4.319041990 -3.651412909
79 -4.481933321 -4.319041990
80 -5.684834201 -4.481933321
81 -4.469462308 -5.684834201
82 -4.211471993 -4.469462308
83 -4.238386233 -4.211471993
84 -3.765449599 -4.238386233
85 -2.958092996 -3.765449599
86 -2.686590803 -2.958092996
87 -0.597686088 -2.686590803
88 -1.415742382 -0.597686088
89 -3.052783572 -1.415742382
90 -4.053591387 -3.052783572
91 -5.315555118 -4.053591387
92 -5.819615498 -5.315555118
93 -5.836030940 -5.819615498
94 -4.944166192 -5.836030940
95 -2.671776131 -4.944166192
96 -1.832250130 -2.671776131
97 -2.591019095 -1.832250130
98 -3.987033868 -2.591019095
99 -4.796505854 -3.987033868
100 -4.347045182 -4.796505854
101 -1.884318273 -4.347045182
102 -1.351715454 -1.884318273
103 -0.914374885 -1.351715454
104 -1.119130963 -0.914374885
105 -1.768957038 -1.119130963
106 -1.877324190 -1.768957038
107 -2.670363998 -1.877324190
108 -2.897195464 -2.670363998
109 -3.688911262 -2.897195464
110 -3.051979201 -3.688911262
111 -4.228504354 -3.051979201
112 -4.546096848 -4.228504354
113 -4.016780572 -4.546096848
114 -3.150767120 -4.016780572
115 -1.613426551 -3.150767120
116 0.215691804 -1.613426551
117 1.198812562 0.215691804
118 1.357034777 1.198812562
119 0.530120537 1.357034777
120 0.036931604 0.530120537
121 0.744288206 0.036931604
122 2.514862800 0.744288206
123 1.938337647 2.514862800
124 1.953923887 1.938337647
125 1.816882696 1.953923887
126 1.782432349 1.816882696
127 1.520004818 1.782432349
128 0.515944438 1.520004818
129 -0.400471004 0.515944438
130 -1.242016889 -0.400471004
131 -1.369626828 -1.242016889
132 -0.397153994 -1.369626828
133 0.544308941 -0.397153994
134 3.148062269 0.544308941
135 2.971769016 3.148062269
136 2.987587155 2.971769016
137 2.749618366 2.987587155
138 1.982453084 2.749618366
139 1.420257453 1.982453084
140 1.082554540 1.420257453
141 1.199085932 1.082554540
142 2.023665614 1.199085932
143 2.263572641 2.023665614
144 2.503330541 2.263572641
145 2.677508410 2.503330541
146 3.014672371 2.677508410
147 1.738147218 3.014672371
148 1.853733457 1.738147218
149 1.783745433 1.853733457
150 2.049526986 1.783745433
151 2.386635655 2.049526986
152 1.582343376 2.386635655
153 1.499106667 1.582343376
154 0.891203315 1.499106667
155 1.363825276 0.891203315
156 2.003351276 1.363825276
157 2.011403578 2.003351276
158 2.481978172 2.011403578
159 1.305684919 2.481978172
160 0.788324324 1.305684919
161 0.117872501 0.788324324
162 0.016832787 0.117872501
163 -0.612416011 0.016832787
164 -0.883065757 -0.612416011
165 -0.799713099 -0.883065757
166 -0.008080251 -0.799713099
167 1.698184243 -0.008080251
168 1.571584676 1.698184243
169 0.979405078 1.571584676
170 0.416569039 0.979405078
171 -2.059724214 0.416569039
172 -3.277548608 -2.059724214
173 -2.682106764 -3.277548608
174 -2.116789011 -2.682106764
175 -1.479448442 -2.116789011
176 -0.717383254 -1.479448442
177 -1.034030596 -0.717383254
178 -1.409682814 -1.034030596
179 -2.203186420 -1.409682814
180 -1.530945485 -2.203186420
181 1.043000484 -1.530945485
182 4.646753812 1.043000484
183 4.104103091 4.646753812
184 2.719689331 4.104103091
185 0.616290673 2.719689331
186 -2.149947009 0.616290673
187 -1.378732008 -2.149947009
188 0.917439513 -1.378732008
189 2.401024071 0.917439513
190 2.426995151 2.401024071
191 1.999849011 2.426995151
192 0.806891977 1.999849011
193 0.981997445 0.806891977
194 1.153035839 0.981997445
195 0.509225620 1.153035839
196 -0.441545608 0.509225620
197 -1.312229331 -0.441545608
> 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/7sr401262201303.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/8hwp91262201303.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/9wos61262201303.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/10uobo1262201303.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/11z3ni1262201303.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/12vmtm1262201303.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/136eai1262201303.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/14yebj1262201303.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/156jzr1262201303.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/16yvfb1262201303.tab")
+ }
> try(system("convert tmp/1vijg1262201303.ps tmp/1vijg1262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/2zh0h1262201303.ps tmp/2zh0h1262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/3favg1262201303.ps tmp/3favg1262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/4rank1262201303.ps tmp/4rank1262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/5gzf71262201303.ps tmp/5gzf71262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/6z2yg1262201303.ps tmp/6z2yg1262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/7sr401262201303.ps tmp/7sr401262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/8hwp91262201303.ps tmp/8hwp91262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/9wos61262201303.ps tmp/9wos61262201303.png",intern=TRUE))
character(0)
> try(system("convert tmp/10uobo1262201303.ps tmp/10uobo1262201303.png",intern=TRUE))
character(0)
>
>
> proc.time()
user system elapsed
5.160 1.841 12.116