Announcement

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

  • Help with Logit in panel data and measuring a time invariant independent variable.

    HI statalist,

    I'm trying to run a panel data regression where the dependent variable is a binary variable and I need to measure the effect of an independent variable which is time invariant.
    Please consider the following:
    Code:
     input HM Age gender income caste
    
                HM        Age     gender     income      caste
      1. 0 45 0 4000 0
      2. 1 23 1 2500 1
      3. 1 56 1 3000 1
      4. 1 38 1 3000 0
      5. 0 60 1 1000 1
      6. 1 65 0 5000 1
      7. 0 50 0 6000 1
      8. end
    
    . list
    
         +------------------------------------+
         | HM   Age   gender   income   caste |
         |------------------------------------|
      1. |  0    45        0     4000       0 |
      2. |  1    23        1     2500       1 |
      3. |  1    56        1     3000       1 |
      4. |  1    38        1     3000       0 |
      5. |  0    60        1     1000       1 |
         |------------------------------------|
      6. |  1    65        0     5000       1 |
      7. |  0    50        0     6000       1 |
         +------------------------------------+
    dependent variable is HM. I need to find effect of gender and caste on HM. But since gender and caste are time invariant I'm unable to figure out how to obtain the coefficient.
    I'm struggling terribly with this regression and am completely lost. Any help would be greatly appreciated.
    Thanks.

  • #2
    You can use -xtreg, be-.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      You can use -xtreg, be-.
      thank you for your response. I just have a small query, since the outcome variable is binary, do we not need a different code in stata? or the standard xtreg can be used irrespective of that?

      Comment


      • #4
        Another option is xthybrid which can estimate within and across-panel parameters at the same time. And, yes, with a binary dv, many would recommend xtlogit or xtprobit.

        Comment


        • #5
          Originally posted by Phil Bromiley View Post
          Another option is xthybrid which can estimate within and across-panel parameters at the same time. And, yes, with a binary dv, many would recommend xtlogit or xtprobit.
          thank you. I'm presently running these.

          Comment

          Working...
          X