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()
Would using the Wald Chi2 be appropriate to choose between xtprobit and xtlogit results?I've run xtlogit and xtprobit regressions that yield very similar results. Would it be fine if I use…
Interpretation of mlogit regressionHey there, I'm trying to interpret multinomial logistic regression where my dependent variable is fo…
why xtile nq(3) only builds two groups, instead of three groups?I would like to build three groups (terciles) by using xtile. However, it turned out that xtile nq(3…
tab command in Stata 17Hi everybody, just a quick general question: the new Stata 17 modifies the command table, suppressi…
Tracking executive changes in datasetHi, I'm doing a tracking analysis of executive changes. In the dataset, I divide the positions into …
Subscribe to:
Post Comments (Atom)
0 Response to nesting cond()
Post a Comment