Autoregressive Processes: Dennis Sun Stats 253
Autoregressive Processes: Dennis Sun Stats 253
Autoregressive Processes
Dennis Sun
Stats 253
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
y = X + , N (0, 2 I)
yt = xTt + yt1 + t
Simulation Study
Simulated many instances of a length 1000 random walk
yt = yt1 + t , = 1
Estimate by autoregression.
Histogram of phi
3500
3000
2500
2000
Frequency
1500
1000
500
0
phi
Var() = .003
Dennis Sun Stats 253 Lecture 2 June 25, 2014
Last Class
Simulation Study
yt = yt1 + t , = 1
Estimate by autoregression.
Good Bad
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
MLE of an AR process
We need to calculate p(y1 , ..., yn |).
p(y1 , ..., yn ) = p(y1 ) p(y2 |y1 ) p(y3 |y1 , y2 ) ... p(yn |y1 , ..., yn1 ).
MLE of an AR process
n
n1 ( )
1 1 X
p(y1 , ..., yn ) = p(y1 ) exp 2 (yt yt1 )2
2 2
t=2
Maximum likelihood and least squares are identical for AR time series!
Dennis Sun Stats 253 Lecture 2 June 25, 2014
Maximum Likelihood Estimation
Summary
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
...
0
Freeman-Tukey transformed data:
yi = (1000Si /ni )1/2 + (1000(Si + 1)/ni )1/2
Dennis Sun Stats 253 Lecture 2 June 25, 2014
Spatial Autoregression Case Study
An Autoregressive Model
Lets try to model this as a spatial process.
Estimating Parameters
1 X
yi i = (yj j ) + i
|N (i)|
jN (i)
y = W (y ) +
(I W )(y ) =
so y = + (I W )1 N (, (I W )1 2 I(I W T )1 ).
Now we can write down the likelihood and maximize it.
Data Analysis
R Code:
model <- spautolm(ft.SID74 ~ 1, data=nc,
listw=nb2listw(neighbors, zero.policy=T))
summary(model)
R Output:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.8597 0.1445 19.791 < 2.2e-16
Data Analysis
R Code:
model <- spautolm(ft.SID74 ~ ft.NWBIR74, data=nc,
listw=nb2listw(neighbors, zero.policy=T))
summary(model)
R Output:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.5444201 0.2161106 7.1464 8.906e-13
ft.NWBIR74 0.0416524 0.0060981 6.8303 8.471e-12
Different Specifications?
1 X
yi i = (yj j ) + i
|N (i)|
jN (i)
Issues:
Are the two specifications equivalent?
Is the conditional specification even well defined?
In general, given a set of conditionals p(yi |yj , j 6= i), there does not
necessarily exist a joint distribution p(y1 , ..., yn ) with those
conditionals.
However, in this case, we can show that
y N (, (I W )1 2 I)
Data Analysis
R Code:
model <- spautolm(ft.SID74 ~ ft.NWBIR74, data=nc,
listw=nb2listw(neighbors, zero.policy=T), family="CAR")
summary(model)
R Output:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.5446517 0.2156409 7.1631 7.889e-13
ft.NWBIR74 0.0416498 0.0060856 6.8440 7.704e-12
What if instead of
1 X
(yj j ), 2
yi (yj , j N (i)) N i +
|N (i)|
jN (i)
we had
1 X
yi (yj , j N (i)) Pois i + (yj j )?
|N (i)|
jN (i)
Issues:
Impossible to write down joint distribution.
Challenging to simulate.
Coding
Coding
Coding
1 Last Class
4 Spatial Autoregression
Case Study
Simultaneous vs. Conditional Autoregression
Non-Gaussian Data
5 Wrapping Up
Administrivia
Piazza
Enrollment cap?
Homework 1: autoregression and bootstrap
Will be posted by tomorrow night.
Remember that you can work in pairs! (Hand in only one problem set
per pair.)
Will be graded check, resubmit, or zero.
Edgar will be lecturing next Monday on R for spatial data.
Jingshu and Edgar will be holding workshops starting next week.