Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ensuring race variable is a categorical variable

    Hi all,
    I am having trouble creating a race categorical variable. As it stands, this is what my race variable looks like:
    Click image for larger version

Name:	Screen Shot 2024-05-08 at 6.16.36 PM.png
Views:	1
Size:	390.6 KB
ID:	1752766

    I was told that I need to create a categorical variable because they are currently being added to my logit model as linear variables. It seems that because my race variable is linear, it is making it so that the interaction variables I create with the race variable are causing problems. For example, I use the following code to create an interaction variable
    Code:
    egen racefemdom =group (race femdom), label
    tab racefemdom
    The following output becomes:
    Click image for larger version

Name:	Screen Shot 2024-05-08 at 6.20.18 PM.png
Views:	1
Size:	411.7 KB
ID:	1752767

    Click image for larger version

Name:	Screen Shot 2024-05-08 at 6.20.23 PM.png
Views:	1
Size:	258.7 KB
ID:	1752768

    As such, I believe that creating the categories for the race variable would be beneficial and may help with my logit models. Can anyone help with a code I can use to put these into proper Race categories? Please let me know if you need additional information/screenshots/code. Thank you!
    Attached Files
Working...
X