Hi all,
I’m trying to replicate a series of regressions in which, for each forecaster i and forecast horizon h (t+1, t+2, t+5), I estimate an expectations‐augmented Phillips curve of the form
E_{t,i}\bigl[\Delta\pi_{t+h}\bigr] = \alpha_i + \beta_i\,E_{t,i}\bigl[\Delta u_{t+h}\bigr] + \frac{1}{K}\sum_{k=1}^{K}\theta_k\,\mathrm{year}_k + \varepsilon_t, \varepsilon_t = \varphi\,\varepsilon_{t-1},
My questions:
* data: one obs per survey round * vars: forecaster_id target_period delta_pi delta_u
Any code snippets or examples of a loop using foreach forecaster + the right estimation command would be greatly appreciated!
Thanks in advance.
I’m trying to replicate a series of regressions in which, for each forecaster i and forecast horizon h (t+1, t+2, t+5), I estimate an expectations‐augmented Phillips curve of the form
E_{t,i}\bigl[\Delta\pi_{t+h}\bigr] = \alpha_i + \beta_i\,E_{t,i}\bigl[\Delta u_{t+h}\bigr] + \frac{1}{K}\sum_{k=1}^{K}\theta_k\,\mathrm{year}_k + \varepsilon_t, \varepsilon_t = \varphi\,\varepsilon_{t-1},
- Et,i_t,i: survey‐round expectations
- Δπ, Δu: expected inflation and unemployment changes
- year_k: dummy =1 if the forecast target year = k (K=19 dummies)
- AR(1) serial correlation in ε_t
My questions:
- What is the best way in Stata to loop over each forecaster and horizon, estimate a separate regression with:
- individual intercept α_i
- individual slope β_i on Δu
- time‐fixed effects
- AR(1) errors ?
- Which command(s) should I use? I’ve seen prais, xtreg, reghdfe, etc. – which is most appropriate to get correct SEs under AR(1) and include year dummies?
- How do I extract and store each estimated β_i and its p‐value automatically (e.g. with postfile or statsby) so I can build the summary table?
* data: one obs per survey round * vars: forecaster_id target_period delta_pi delta_u
Any code snippets or examples of a loop using foreach forecaster + the right estimation command would be greatly appreciated!
Thanks in advance.