HI,
So I have panel data for 5 years (4,5,6,7,8) and I am evaluating a policy change that happened just after year 6. So now my pre-policy years are 4 and 5 and post-policy years are 6,7,8. I am trying to categories the individual (id) into pre and post-policy based on when they used a particular service (x, where x is is a dummy variable x=1 if they used the service, zero otherwise) please see the following example
id year x
1 4 1 ( id 1 is a pre- policy user)
1 5 0
1 6 1
2 4 0
2 5 0
2 6 1 ( id 2 is a post policy user)
3 4 1
3 6 1 (id 3 is a pre policy user)
4 4 .
4 7 1 (id 4 is a post policy user)
So if an individual uses the service in all the years they are still considered pre-policy users. They are only considered post-policy users if they use the service only in year 6, 7, or 8
Can anyone help as to how one does that? Thanks for your help in advance
Kind Regards,
Aarushi
Related Posts with Pre and post policy count
How to obtain estimates via Margins after a Poisson regression with an offsetDear all, It may be a silly question, but I was unable to resolve it after some time searching the …
Probability Weights vs Frequency WeightsHi. I am sorry if the following is too basic a question. I want to know when to use probability we…
What are the results of reldist in Stata?When relative distribution method is used to compare the distribution similarity of two samples, rel…
forvalues command errorhello Statlist, hope everyone is in good health, i face following error in forvalues command during…
BSWEIGHTS without stratum in the dataI am wanting to use bsweights to resample the weights before a bootstrap a weighted regression. I do…
Subscribe to:
Post Comments (Atom)
0 Response to Pre and post policy count
Post a Comment