Announcement

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

  • Choosing the base outcome when dependant variable has 2 categories (panel data command)

    Dear All,
    I am working with an unbalanced panel data and my model contains two categories of dependant variable and a list around 15 independent variables (all binary)
    Category 1= firms that applied for finance.
    Category 2= firms that did not apply for finance.
    I want to declare the 1st category as the base outcome but I am unable to find the right command/ model.

    I am familiar with the gsem command when I can set the base outcome providing the dep variable has more than two outcomes but I cannot find the right command if dep variable has only two outcomes.

    Thank you so much in advance!

  • #2
    Welcome to Statalist!

    You don't tell us what command you are trying to use. In general, though, logit, xtlogit and similar commands that model dichotomous variables generally follow the practice described by help logit
    Code:
    depvar equal to nonzero and nonmissing (typically depvar equal to one) indicates a positive outcome,
    whereas depvar equal to zero indicates a negative outcome
    So if your dependent variable is coded 1 or 2, you will need to create a new variable to use as your dependent variable.
    Code:
    . generate category2 = depvar==2
    
    . replace category2 = depvar if missing(depvar)
    (1 real change made, 1 to missing)
    
    . list
    
         +-------------------+
         | depvar   catego~2 |
         |-------------------|
      1. |      1          0 |
      2. |      2          1 |
      3. |      .          . |
         +-------------------+

    Comment


    • #3
      Thank you

      Comment

      Working...
      X