Announcement

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

  • Restricting Observations

    Hi all, hoping this has an easy answer. I have different models which have different variables in them. I want to only use the respondents who answered all of the questions I am using. For example, Model 1 has a, b & c, and model 2 has a, b, c, d, e & f. How do I get model 1 to only use respondents who answered A through F?

    I have tried googling this and searching on this forum, but I must not be using the correct keywords. Thanks in advance!

  • #2
    there are several ways but one easy one here is to estimate model 2 first; one of the elements it leaves in memory is an indicator of which observations were included in the model (called "e(sample)"); I would then make a new variable of this (e.g., gen byte inmodel2=e(sample)) and then just use an "if inmodel2" when estimating model 1 as a standard if condition

    Comment

    Working...
    X