This preview shows pages 1–4. Sign up to view the full content.
Assignment #2 Solution
Q1.
(a) Since
()0
t
EZ
=
∵
,
, we have
2
2
)
(
)
(
s
Z
E
Z
Var
t
t
=
=
otherwise
k
if
bcs
k
if
s
c
b
cases
Z
Z
Cov
c
Z
Z
cbCov
Z
Z
bcCov
Z
Z
Cov
b
X
X
Cov
a
cZ
bZ
a
E
X
E
t
k
t
t
k
t
t
k
t
k
t
t
k
t
t
k
t
t
t
,
0
1
,
0
,
)
(
3
)
,
(
)
,
(
)
,
(
)
,
(
)
,
(
)
(
)
(
2
2
2
2
2
2
2
1
2
2
1
1
1
2
2
1
=
=
=
=
+
=
=
+
+
+
=
=
=
+
+
=
−
−
+
−
−
+
−
−
+
−
+
−
+
−
−
γ
Therefore, it is (weakly) stationary because its mean is constant and the covariance
does NOT depend on time t, but only k.
(b)
0
)
(
)
2
sin(
)
(
=
=
t
t
Z
E
t
X
E
)))
(
2
sin(
),
2
sin(
cov(
)
,
cov(
k
t
Z
t
Z
X
X
k
t
t
k
t
t
k
+
=
=
+
+
If k=0, cov(
)=
k
t
t
+
X
X
,
)
2
(
sin
2
2
t
S
If k
cov(
)=0;
,
0
≠
k
t
t
X
X
+
,
Therefore it is not (weakly) stationary, since its variance changes, depending on
time t.
Q1.
(a)
> data<read.table("./consumption.txt",header=T)
> x1 < data$TBILL
> x2 < data$RSERV
> Tbill < x1[1:29]
> Rserv < x2[1:29]
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document >
x<cbind(Tbill,Rserv)
> X < as.matrix(x)
> y1<data$CONS
> Cons < y1[1:29]
> reg<lm(Cons~X)
> summary(reg)
Call:
lm(formula = Cons ~ X)
Residuals:
Min
1Q
Median
3Q
Max
369.61
98.65
20.06
94.19
248.43
Coefficients:
Estimate Std. Error t value Pr(>t)
(Intercept) 4.812e+03
1.251e+02
38.461
<2e16 ***
XTbill
2.930e+01
1.314e+01
2.231
0.0345 *
XRserv
4.131e+00
7.045e02
58.638
<2e16 ***

Signif. codes:
0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 168.8 on 26 degrees of freedom
Multiple RSquared: 0.9933,
Adjusted Rsquared: 0.9928
Fstatistic:
1928 on 2 and 26 DF,
pvalue: < 2.2e16
> acf(reg$residuals,lag.max=25)
2
Figure 1. Autocorrleation function of the residuals
(comments)
It is clear to see that the correlations at first lags is significant and at lag 12, 13,
and 14 , it has relatively significant correlations, but it is negligible because the
values are in the confidence interval. Overall, it damps off according to a mixed
exponential decay. We might think of AR(1) process for the residual in the further
study.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 01/12/2012 for the course STAT 443 taught by Professor Yuliagel during the Spring '09 term at Waterloo.
 Spring '09
 YuliaGel
 Forecasting

Click to edit the document details