Hi all,
I'm new to Stata and am running into trouble with setting up a dataset for use.
The issue is that I have a composite categorical variable, with multiple entries per observation that are separated by commas (e.g., "A,B,C"). Each entry is a single word, but as answers were written in, there are a great many different entries. My goal is to convert this variable into a series of binary variables, each taking the name of an entry, and taking a value of 1 if the particular word was present in the original variable.
I have tried following the advice given for a similar topic here, but have been unable to successfully adapt it to my case.
Any advice would be greatly appreciated!
Best,
Ben
0 Response to Converting Composite Categorical Variables to Binary Variables
Post a Comment