Announcement

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

  • Creat Opposite Variable

    Hello

    I generated a variable to identify zombie firms with this coomand "gen Zombie = (l2.icr <1 & l1.icr < 1 & icr < 1 & age >= 10)".
    How can I generate a variable for the rest of the firms, like nonZombie firms?

    Thanks in advance!

  • #2
    It appears that nonZombie firms will have a 0 for the Zombie variable, presuming your logical expression is as you intend, so I don't think you'd need any variable to identify the non-Zombies. Perhaps I misunderstand.

    Comment


    • #3
      I need a variable for nonZombie because I want to use it in a regression.

      Comment


      • #4
        Hi Lucian,

        Mike is completely right. The variable you generated can easily identify non-zombie firms. Below is an example code
        Code:
        gen nonZombie = (Zombie == 0)
        Alternatively, you can use the code
        Code:
        gen nonZombie= !(l2.icr <1 & l1.icr < 1 & icr < 1 & age >= 10)
        Thanks

        Comment

        Working...
        X