Prais-Winsten manually
Posted: Wed Mar 05, 2014 2:52 pm
Hi all
I would like to perform the Prais-Winsten estimation manually, i.e. do the iterations myself. I tried all day but failed..
I think I follow exactly what Wooldridge (and other sources I found) are proposing. But it does not seem to work...
In particular, I would like to reproduce the example in the Wooldridge textbook on the static Phillips curve. So for the model: inflation_t = b0 + b1 unemployment_t + u_t.
The steps I take in the program (you can find the program and the workfile with the relevant data attached):
1] Estimate the model: inflation_t = b0 + b1 unemployment_t + u_t
2] Obtain the residuals and regress: uhat_t = rho*uhat_{t-1} + e_t
3] Calculate the quasi-differenced data using the estimated rho from 2]
4] Estimate the model in 1] but with the estimated model
5] Obtain the residuals from the model in 4] and obtain a new rho by estimating the residual at time t on a lag.
6] Using the estimated rho from 5] to calculate the quasi-differenced data.
7] Estimate the model in 1] with the quasi-differenced data from 6]
8] Keep going until convergence.
Doing this we should find an estimated rho of 0.781 and the coefficient on unemployment should be -0.716.
In the program attached I get a value of rho 0.338 (you can find this estimate in the equation object "rho_est100") and a coefficient on unemployment of 0.163 (you can find this estimate in the equation object "model100").
I really hope somebody out there could point me in the good direction.. All the help is much appreciated!!
Regards
I would like to perform the Prais-Winsten estimation manually, i.e. do the iterations myself. I tried all day but failed..
I think I follow exactly what Wooldridge (and other sources I found) are proposing. But it does not seem to work...
In particular, I would like to reproduce the example in the Wooldridge textbook on the static Phillips curve. So for the model: inflation_t = b0 + b1 unemployment_t + u_t.
The steps I take in the program (you can find the program and the workfile with the relevant data attached):
1] Estimate the model: inflation_t = b0 + b1 unemployment_t + u_t
2] Obtain the residuals and regress: uhat_t = rho*uhat_{t-1} + e_t
3] Calculate the quasi-differenced data using the estimated rho from 2]
4] Estimate the model in 1] but with the estimated model
5] Obtain the residuals from the model in 4] and obtain a new rho by estimating the residual at time t on a lag.
6] Using the estimated rho from 5] to calculate the quasi-differenced data.
7] Estimate the model in 1] with the quasi-differenced data from 6]
8] Keep going until convergence.
Doing this we should find an estimated rho of 0.781 and the coefficient on unemployment should be -0.716.
In the program attached I get a value of rho 0.338 (you can find this estimate in the equation object "rho_est100") and a coefficient on unemployment of 0.163 (you can find this estimate in the equation object "model100").
I really hope somebody out there could point me in the good direction.. All the help is much appreciated!!
Regards