Hello,
I wanted to create an indicator variable combining two or more categorical variable. So for one of my variables i want to combine the variable gender (female=1 and male=0) and race (white=1, black=2, Hispanic=3 and other=4) to create 12 variables. Generally, when i create indicator variables using one categorical variable, i usually do one of the three options: manually generate variable or tabulate with generate ( ) or make a loop with the generate command. I tried to do this using 2 variables using the second or third method, but i kept getting an error from STATA. Is there an easy way to generate indicator variables using 2 or more categorical variables?
Related Posts with Creating indicator variables from multiple categorical variable
decision on whether to weight regression modelI am studying the impact of a particular policy on the number of hospitalizations of 1 year old chil…
Panel regression - including fixed effects AND clustering standard errorsHi everyone, I am running a panel regression on industry returns (49 Fama French industries) over t…
how to deal with duplicates when creating propoprtionsDear all, I need your valuable help and advice in the following please: I have the following data , …
PVARSOC error(2001)Dear all, I'm using stata 15 for estimate a PVAR model on 88 observations of 8 countries. I would l…
Access to stataHello! How export data from access to stata with codes and labels. Thanks …
Subscribe to:
Post Comments (Atom)
0 Response to Creating indicator variables from multiple categorical variable
Post a Comment