[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: identifying obs actually used in a Logit model |

Date |
Thu, 23 Apr 2009 12:42:20 +0100 |

See also SJ-7-2 dm0030 . . . . . . . . . . Stata tip 44: Get a handle on your sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B. Jann Q2/07 SJ 7(2):266--267 (no commands) tip on how to keep track of the observations that make up your estimation sample Nick n.j.cox@durham.ac.uk Eva Poen I should add that -browse if e(sample)- works just as well, as long as you haven't fitted another model in the meantime. e(sample) (like all e() results) always refers to the most recently fitted model. Therefore, if you want to compare which observations were used in two different models, you have to generate an indicator variable along the lines of -gen inmodel = e(sample)- before fitting the second model. Eva Poen > After estimation: > gen inmodel = e(sample) > browse if inmodel > > The function e(sample) returns 1 if the observation was used and 0 otherwise. Jiang, Frank <fjiang@ivey.uwo.ca>: >> I am having difficulty identifying observations used in a logit model. >> The model includes several sets of dummy variables. Some observations >> were automatically dropped because some dummy variables perfectly >> predict failures, i.e. DV==0. As a result, the number of obs used by >> the logit model is smaller than the number of obs in the dataset. >> However, I don't know which obs were excluded. Is there a way to >> identify the obs that were actually used in the model? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: re: propensity score estimation***From:*Kit Baum <kitbaum@mac.com>

**st: identifying obs actually used in a Logit model***From:*"Jiang, Frank" <fjiang@ivey.uwo.ca>

**Re: st: identifying obs actually used in a Logit model***From:*Eva Poen <eva.poen@gmail.com>

**Re: st: identifying obs actually used in a Logit model***From:*Eva Poen <eva.poen@gmail.com>

- Prev by Date:
**RE: st: identifying obs actually used in a Logit model** - Next by Date:
**Re: st: -stripplot- updated on SSC** - Previous by thread:
**RE: st: identifying obs actually used in a Logit model** - Next by thread:
**st: AW: identifying obs actually used in a Logit model** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |