Hello Everyone!
I have a question about generating a sequence in Stata with a condition. I have a variable ( var= 0,0,0,1,0,0,1,0,0,0) and want to generate a sequence with a break whenever var=1 and then restarts. The new variable will be like this (newvar = 1,2,3, . , 1, 2, ., 1, 2, 3). I would appreciate your help in this respect.
Moeen
Related Posts with Sequencing with a condition
Dealing with missing valuesHi, I am using an individual survey and I am examining the impact of international remittances on ch…
how to interpret gsem coefficientsHi all, I am working with gsem - Bernoulli logit distribution, and I was wondering if someone has an…
How to obtain confidence interval & p-value from stmh command result tableGood Morning, I am a relatively new STATA15 user. I need some help obtaining the confidence interva…
Computations within groupHello friends, I have a data like the following: Year Firm Gender 2009 A M 2009 A M 2009 A …
Post estimation command for predicted count probabilities of count models (NB)After estimating a Negative Binomial model, I need to obtain predicted count probabilities of specif…
Subscribe to:
Post Comments (Atom)
0 Response to Sequencing with a condition
Post a Comment