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()
Interaction term of a global variable list with a factor variableHi, I am using Stata 14.0 and trying to obtain full interaction of my variable list with a factor va…
graph with mean along 90% confidence interval?Dear All, I have the following data Code: * Example generated by -dataex-. To install: ssc install …
Extract p-value of independent variable ologitHello, I am trying to extract the p-value of an independent variable after an ologit. It seems like…
Behavior of tempvar within ML programSuppose I know the mean of a normal variable and I want to estimate its standard deviation using MLE…
A guide on understanding, calculating and using weights in STATAHello everyone. Today I have one very humble question: can someone suggest me a guide to understand…
Subscribe to:
Post Comments (Atom)
0 Response to nesting cond()
Post a Comment