Announcement

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

  • Multiple Regression

    Hello guys, I will run the multiple regression and calculate the expected number of children EVER BORN for a white, non-Hispanic woman in each age group, holding all other variables constant.
    I have Hispanic and black variables as dummy variables.

    I do this code :
    regress EVER_BORN FAM_INCOME HISPANIC FEM_AGE2 FEM_AGE3 FEM_AGE4 FEM_AGE5 Married Divorced HSGRAD SOMECOL COLGRAD PROFDEG SHAREARNINGS BLACK

    I think my code is not enough to calculate the expected number.
    Does anyone have an idea?
    How can I calculate the expected number of children EVER_BORN for a white, non-Hispanic woman in each age group?

  • #2
    You will benefit greatly from learning about Stata's factor-variable notation. Read -help fvvarlist-. Specifically, you need to get rid of those FEM_AGE* variables and replace them with a single FEM_AGE variable coded 1, 2, 3, 4, and 5. Similarly, you should have a single marital_status variable coded 0 for never married, 1 for married, and 2 for divorced. Similary you need an education variable: 0 for < HS graduate, 1, for HS Graduate, etc. Then you can run your regression using these new variables, and follow-up with -margins- to get predicted numbers.

    Code:
    regress EVER_BORN FAM_INCOME i.HISPANIC i.FEM_AGE i.marital_status i.education ///
        SHAREARNINGS i.BLACK
    margins FEM_AGE, at(HISPANIC = 0 BLACK = 0)
    I did not put i. in front of FAM_INCOME and SHAREARNINGS because I'm guessing from their names that these are continuous rather than categorical variables.

    That said, I question the choice of linear regression for this model. The reason is that your outcome variable, number of children ever born, is typically going to be a small non-negative integer, and so I think a Poisson regression would likely be more appropriate here.

    Comment

    Working...
    X