Hi,
I am new to stata and need help with the above complaints.
I have data that has a variable for Race_1 categorized into "1 = American Indian or Alaskan Native (AI), 2 =Asian, 3=Black or African American, 4=Multi, 5=Others (O) and 6=White. I have another variable, Ethnicity_1, categorized into 0=Not Hispanic (NH) and 1= Hispanic or Latino.
I want to create a variable race_ethnicity into the following categories 1=NHAI, 2=NHAsian, 3=NHblack, 4=NHmulti, 5=NHOthers, 6=NHwhite and 7=Hispanic or Latino.
I used egen race_ethnicity =group (Race_1 Ethnicity_1), label
tab race_ethnicity
I don't know how to proceed and am unsure if it's the correct code.
Please help out!
Related Posts with Need help combining my race variables into one categorical variable
Creating a loop to generate a new variables in a panel datasetI would be be grateful for any help with my query. I have the following variables chd002_9 chd002_0…
AFT or Cox survival analysis for buy-build strategies in private equity duration analysesHi there, For my research project I am analysing the duration of private equity buy-and-build strat…
How to invert the order of rows in a matrixDear Statalisters Apologies in advance for the simplicity of my question. I am sure the is already …
Exclude certain observations only in one variable?Hello Code: gen gift_group_test = 0 if gift_total < . & gift_received == 1 replace gift_gr…
multi-level/mixed effects vs clustered robust standard errors - which is more appropriate if many of the clusters have 1 individual?Hi. I have a dataset of psychological measures from carers (n=254) of people with mental health pat…
Subscribe to:
Post Comments (Atom)
0 Response to Need help combining my race variables into one categorical variable
Post a Comment