Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Dimitriy V. Masterov" <dvmaster@gmail.com> |

To |
Statalist <statalist@hsphsun2.harvard.edu> |

Subject |
st: orders of operation for a seasonal difference quadratic regression using factor variables |

Date |
Wed, 8 Aug 2012 16:25:04 -0700 |

I have monthly panel data on unemployment (uerate) and an outcome of interest (lny) by US county. I ran the following 12-month seasonal difference regression with a quadratic unemployment term (lagged one month to give my counties time to adjust): regress S12.(lny cL1.uerate##cL1.uerate) i.countyid#c.dateym, vce(cluster state) My (misguided) intuition is that Stata would expand the factor variables and then do the seasonal differencing, resulting the OLS regression: lny_{t}-lny_{t-12} = a + b*(x_{t-1}-x_{t-13}) + c * (x_{t-1}^2-x_{t-13}^2) + county-specific trend. Stata actually seems to be estimating: lny_{t}-lny_{t-12} = a + b*(x_{t-1}-x_{t-13}) + c * (x_{t-1}-x_{t-13})^2 + county-specific trend. The manual says that D. and S. operators may not be combined with factor variables. It provides a categorical variable example, which makes sense, but does not apply here. There's no error message and Stata actually estimates something, but I can't seem to find the logic anywhere in the pdf documentation. DVM * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: programming maximum likelihood estimation for specific logistic function** - Next by Date:
**Re: st: Syntax error with Syntax itself** - Previous by thread:
**st: Syntax error with Syntax itself** - Next by thread:
**st: IVPROBIT and marginal effects** - Index(es):