Announcement

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

  • list if conditions

    I used the following code to list the observations in a variable if the binary "check" is 0. But in the "Fruit" variable, some observations are empty so the "check" is also == 0, but I don't want to list them. Can I insert another condition so that I only list items with strings?

    Code:
    list Fruit if check == 0

  • #2
    Vicky:
    if the "empty cells" are misssing values, Stata will not consider them by default.
    That said, an example/excerpt of your dataset (via -dataex-, please) can help interested listers to help you out. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Code:
      list Fruit if !missing(Fruit) & check == 0
      may be what you seek.

      Comment

      Working...
      X