Announcement

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

  • Coefficient for gender - male or female

    Hi all,

    I want to run a regression with gender.

    For e.g.

    reg depvar indepvar gender

    Once I get the coefficient for gender, how do I know that it's for male or female?

    Is there something I need to do beforehand to know whether it's male or female please?

    Any help is greatly appreciated.

    Thanks,


    N

  • #2
    Assuming gender takes the values 0 or 1, the coefficient is for whichever gender is represented by the value 1. Presumably the documentation for your data can tell you which gender that is.

    Comment


    • #3
      This is exactly why I discourage usage of variable names such as “gender” and “race.” Who knows which group is represented by one versus zero?

      Comment


      • #4
        William Lisowski Thank you for replying.

        Male = 1
        Female = 2

        I dont know how to set the gender to take values of 0 and 1 instead. Please tell me how to do this.

        Comment


        • #5
          I see from your subsequent post at

          https://www.statalist.org/forums/for...0-collinearity

          that you have learned how to use factor variable notation on categorical variables like gender, so that including i.gender in the regression causes the output to tell you that the coefficient is for females.

          Comment


          • #6
            Originally posted by Jeff Wooldridge View Post
            This is exactly why I discourage usage of variable names such as “gender” and “race.” Who knows which group is represented by one versus zero?
            I’ve had students come to me many times. They have a positive coefficient for gender. I ask them if that means men score higher or women score higher. They don’t know.

            Even with continuous variables you have to know if it goes low to high or high to low. I generally recommend low to high, since I think that is what most people expect.

            i think there is a tendency to immediately jump to high tech when you really should just start with descriptive and get a feel for what your data are like. If not careful they will miss basic things like missing data not being coded correctly.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Originally posted by nitu pun View Post
              William Lisowski Thank you for replying.

              Male = 1
              Female = 2

              I dont know how to set the gender to take values of 0 and 1 instead. Please tell me how to do this.
              Nitu, as a side comment, there is a theme of many of your questions which suggests you need to learn the basics of how to work in Stata. I recommend spending some time with the Getting Started manual in life's with your installation of Stata. If you aren't sure how to find it, open Stata and type -help getting started-. You may read guides for Windows, Linux and Mac as appropriate to your situation.

              Comment


              • #8
                I endorse the advice from Leonardo Guizzetti regarding Stata's documentation. When I began using Stata in a serious way, I started - as others here did - by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. All of these manuals are included as PDFs in the Stata installation and are accessible from within Stata - for example, through Stata's Help menu. The objective in doing this was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and manual.

                Stata supplies exceptionally good documentation that amply repays the time spent studying it - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry and to work effectively.

                Comment


                • #9
                  Thank you for the suggestion Leonardo Guizzetti and William Lisowski.

                  Comment

                  Working...
                  X