Announcement

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

  • Heckman model

    Hello every one
    first: i know two ways to use Heckman test, (1) by generate dummy variable as follows:
    HTML Code:
    generate dy = dependent_var > 0
    then run Heckman command
    but in case the dependent variable is dummy we got this message (dependent variable collinear with _cons)
    my question is
    can we use heckman model with dummy dependent variable?


    (2) in case i want to use Heckman step by step
    I will use a probit model
    HTML Code:
    probit indp_pay_log board_ind loss_total eps1 Fem_indep , robust cluster(code)
    i got this error message
    HTML Code:
    outcome does not vary; remember:
                                      0 = negative outcome,
            all other nonmissing values = positive outcome
    please do you know the reason and how to fix it

  • #2
    Alkebsee:
    as far as your second question is concerned, you should inspect your outcome:
    Code:
    tab indp_pay_log
    It may be that, due, say, to missing values, your outcome does not vary.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Hello Carlo Lazzaro
      thanks for replying

      there is no missing value in my independent variable at all.
      but the minimum value of this variable is 1.35
      kind regards
      alkebsee R

      Comment


      • #4
        Alkebsee:
        I see the issue now.
        The values of your dependent variable should be 0 or 1, as required by -probit-:
        Code:
        . use "C:\Program Files (x86)\Stata15\ado\base\a\auto.dta"
        (1978 Automobile Data)
        
        . probit price mpg
        
        outcome does not vary; remember:
                                          0 = negative outcome,
                all other nonmissing values = positive outcome
        r(2000);
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Carlo Lazzaro
          So Heckman model can not be used for my dataset , am i right ?
          because I used the another way as follows:
          1
          HTML Code:
            generate dy = dependent_var > 0
          2-
          HTML Code:
          heckman dep_var indep_vars, select(dy = indep_vars) twostep.
          But I got a message that my dependent variable collinear with _cons.

          Finally:
          I think Heckman model is not suitable to my topic.

          thank you so much

          Comment

          Working...
          X