Hello!
I am conducting an honors thesis in sociology and need help with creating categories within a nominal variable. I have a nominal variable (called primarybc), which includes a list of about 20 birth control options (ex: abstinence, withdrawal, condoms, spermicide, IUD, patch, etc). I am trying to run analyses, however, I do not have enough observations in each option to give meaningful results. As such, I am trying to create classes, or categories, within primarybc to group some of the birth control options. For example, I want to create a subgroup called "barrier methods" which would include condoms and spermicides, and another subgroup called "hormonal self-administered methods" which would include pills and the patch.
How do I go about doing this? I have tried to do the following: gen classbc = 4 if primarybc == 7 | primarybc == 10 | primarybc == 13 |
No luck. Any thoughts?
Related Posts with Creating categories within a nominal variable
plotting confidence intervals in stataDear All, i have risk ratios for a disease with their confidence intervals by age group and i am plo…
Marginal Effects for Bivariate Random Effects ProbitHi, I am in the process of trying to run a Bivariate Random Effects Probit (Plum, 2016) to analyse …
Threshold, Gaps Not allowedI am working with threshold regression: I have quarterly data (strongly balanced) Stock_return=const…
Fixed Effects & Ordered Probit (RE) for same panel?Hey Folks! I hope I am not getting too annoying with my questions. I have encountered the following…
Panel threshold regressionDear all, I am trying to do panel threshold regression developed by Hansen(1999). Our dependent vari…
Subscribe to:
Post Comments (Atom)
0 Response to Creating categories within a nominal variable
Post a Comment