Announcement

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

  • Female values gone in sex variable when doing a regression

    I'm writing my exam and I'm having problems with my variable "sex". When I tab my variable, all seems right with the variabel as male and female has values.
    But when I use it for a regression, my sex variable only contains male. Female is lost here.

    What can i do?
    Attached Files

  • #2
    You can't see it, but female has the value 0 and male has the value 1, as a dummy variabel

    Comment


    • #3
      I will say that there is nothing obviously wrong here and you should go back to your regression text and pay attention to categorical variable predictors and how to interpret these coefficients. Perhaps start with a single variable in the model, if that helps understanding. Also note that we have a strict no homework policy here.

      Comment


      • #4
        Sigrid:
        as Leonardo wisely pointed out, there's nothing strange in the way Stata managed your categorical variable -sex-. As you're surely aware of, one level of a given categorical variable should be omitted to shelter your results from the so called dummy trap (https://blogs.ubc.ca/datawithstata/h...y-least-square).
        That said, I'd be much more concerned about the way your regression model is specified; even though you did not use CODe delimiters to share what you tyoed and what Stata gave you back, it seems that you may have overfitting problem and/or a misspecified regression model.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          As Leonardo says, nothing wrong here. There are two relevant prametrisations here:

          1. You can include a constant, and then you can include the dummy only for male. This is what you have done.

          2. Or you can exclude the constant (-reg, nocons-), and then you will be able to see the estimate on both the male, and the female dummies.

          Comment

          Working...
          X