Poisson regression (xtpoisson) requires the dependent variable to be a non-negative count variable. However, in some cases one may need to take the first difference of the dependent variable to deal with, for example, reverse causality of the regressors. My question is how can one take the first difference of the count variable in Stata while making sure that the resulting difference stays non-negative so that it can be used in poisson regression. Cameron and Trivedi's Microeconometrics using Stata outline a transformation $(\frac{\lambda_{i,t-1}}{\lambda_{i,t}) * y_{i,t} - y_{i,t-1}$ where $\lambda_{i,t}=exp(x_{it}'\beta)$ which, they state, can be used to eliminate the FE and as the basis for estimation of dynamic panel count models. My question is how can one actually estimate $\lambda_{it}$ in Stata so that it can then be used to create first differences?
Related Posts with How to get first difference of count variable for poisson regression
'No observations' errorDear all, I'm trying to conduct a unit root test to my variables using the following code: Code: …
Panel type 2 Tobit with random effectsHi everyone, I'm was planning to estimate a correlated random effects model on panel data using st…
Age standardizationI am calculating age-adjusted prevalence of certain diseases using direct method. I have a variable …
Manipulating macro listI have a do file which contains a macro list. I want to evaluate each element of the list and determ…
Regarding error message “ fpc for all observations within a stratum must be the same” with PPS sampling design, how to handle it ?Dear Statalists, I am running analysis on a survey dataset which use multi-stage stratified systemat…
Subscribe to:
Post Comments (Atom)
0 Response to How to get first difference of count variable for poisson regression
Post a Comment