hi All,
I was reading the stata journal version: The Stata Journal (2005) 5, Number 3, pp. 413–420 in order to become familiar with the cond() command, especially to categorize some variables.
In section 4, page 415 , the authors talk about do it yourself categorization using nested cond() command... im just wondering if anyone can share the syntax for this with me, i ve tried everything and couldnt get it to work.
i want to create a variable that is 0 if a=0 & b=0 ; 1 if a=1 & b=0 ; 2 if a==0 & b==1 ; 3 if a==1 & b==1 .. a and b are binary variables i have coded already.
i could use generate and replace commands, but i would like to use the cond() if possible
thanks!
Related Posts with nesting cond()
Parametric survival analysis Good morning. I am doing parametric survival analysis through streg. After streg, I got the followi…
How to model "Sparial Variability" or "Choice of Location"I have a survey data on 10000 delivery person. I have number of delivery they made in 49 neighborhoo…
Question about diff-in-diff with multiple control groups and one treatment groupHello! I am running a Difference in Difference (DD) regression to see whether the introduction of a…
Venn diagramHi I'm trying to do a Venn diagram with 4 variables but the code pvenn allows only 3 variables maxim…
How to Handle Heterogeneity in Panel Data using Systems GMM approachDear Stata Users, I am currently researching on Foreign direct investment in Africa using the Syste…
Subscribe to:
Post Comments (Atom)
0 Response to nesting cond()
Post a Comment