Hi all,
I am still a novice at using Stata, and I would like to ask a question.
I have a panel data containing information about hospitals from years 2007 to 2016, and I would like to count the number of observations that have a change in value for a particular variable across the years. More specifically, I would like to count the number of hospitals that have changed ownership from public to private across the years.
My thought process is to first bys hospital_id, and then count the number of observations where private changes from 0 to 1 across the years.
However, I am not too sure what would be the command for this on Stata version 14.
Your inputs will be greatly appreciated. Thank you in advance.
Regards,
Priscilla
Related Posts with Count the number of observations that have a change in value for a particular variable across the years
Fixed effects conditional logit model, problems with Age and Year's effectHello everyone, I am using unbalanced panel data on individual respondents (T = 11 and N = 83687). …
Help with xtdcce2 - unit specific error correction termsHello all, I have recently come across to xtdcce2 and would like to ask some questions. - If I use…
Recode multiple observations to missingHello Statalist I need help on how i can recode multiple observations to missing. In the data examp…
Is it possible to generate latent class at firm level instead of firm year level.I would like to do the latent class regression. The sample is at firm-year level. Normally, the gsem…
Graph twoway scatter with 95% CI and Odds RatioI got a dataset with 2 group of ppl (group1 is male, group 2 is female), and I got their odds ratio,…
Subscribe to:
Post Comments (Atom)
0 Response to Count the number of observations that have a change in value for a particular variable across the years
Post a Comment