Is there a command to split a categorical variable into binary variables? For example, splitting a "race" variable with values "white, black, hispanic" to three variables: race1, race2, race3 where race1 = 1 if race = "white" etc.
Just wondering if someone created a command like this since it would save a lot of time!
Related Posts with Is there a command for quickly splitting a categorical variable into multiple binary variables?
General question about Cox regressionI have a group of patients that have stopped taking treatment at one health facility (say Facility A…
Working with Dates in Panel DataI'm trying to compute and incidence case based on test_1. So an incident case will be a positive tes…
Create stata time variableHi Stata Users, I have data in the form 01.01.2019 and want Stata to use it as time variable I tri…
XTREGs and XTSUR differencesHi, I am wondering why equation by equation XTREG with random effects (same vars in each equation) …
Listing the var name in a specified field rather than the value - Syntax help?Hello fellow Stata Users! I am a new user and am in need of some help. I have several race variable…
Subscribe to:
Post Comments (Atom)
0 Response to Is there a command for quickly splitting a categorical variable into multiple binary variables?
Post a Comment