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 non-users, 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)
5 4 0
5 5 0
5 6 0
5 7 0
6 7 0
7 8 0 ( id 5- 7 ) all non-users. Thanks
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 Generating a variable for user pre and post policy change
Two Step Binary Choice Regression Model: What type of regression model to use to avoid sample selection bias and autocorrelation?Hi, I have a two step-model (see below) in which all the people answer the question in the first par…
Looking for methological adviceHi everyone, I'm looking for methodological advice on the undertaking described below. I tried to s…
Graph panel dataHi all, My name is Thomas Leirvik, and have a few questions about plotting using Stata (sorry for m…
Drop observation if missing in two discontinous yearsHello, I have a lot of balance sheet data (with a lot of variables). What I need is for every idnr …
convert northing and easting to longtitude and latitudeHi, is there a code for converting "northing" and "easting" to longitude and latitude? Many thanks! …
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable for user pre and post policy change
Post a Comment