Hi,
Below is some data that I have that has provider names, the quarter we are in, and the units provided by that provider. I want to create a variable that =1 if there is a provider "entry" or a provider "exit."
So, essentially my new var provider_enter would =0 but then =1 in qtr 14 for Beth (this is when she enters the market as she was providing 0 units in qtr 13). But, I don't want it to =1 in the quarters after that even though she is providing units. Basically =1 in the qtr where the previous qtr is 0 and this one she has provided some units.
My new var provider_exit would =0 but then =1 in qtr 19, because then is when she drops from providing 236 units to 0 units, but not after that. TIA
Below is some data that I have that has provider names, the quarter we are in, and the units provided by that provider. I want to create a variable that =1 if there is a provider "entry" or a provider "exit."
So, essentially my new var provider_enter would =0 but then =1 in qtr 14 for Beth (this is when she enters the market as she was providing 0 units in qtr 13). But, I don't want it to =1 in the quarters after that even though she is providing units. Basically =1 in the qtr where the previous qtr is 0 and this one she has provided some units.
My new var provider_exit would =0 but then =1 in qtr 19, because then is when she drops from providing 236 units to 0 units, but not after that. TIA
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str66 provider_name byte qtr double units " Beth C." 11 0 "Beth C." 12 0 "Beth C." 13 0 "Beth C." 14 24 "Beth C." 15 88 " Beth C." 16 112 "Beth C." 17 124 "Beth C." 18 236 "Beth C." 19 0
Comment