Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

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

Subject |
st: AW: RE: AW: Exclude some observations from a sample in a regression |

Date |
Wed, 7 Apr 2010 11:33:21 +0200 |

<> "-if foreign- would also include any missings on -foreign-" True, though the example was carefully chosen not to run into the problem... "rep78" would be an entirely different beast in this respect... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox Gesendet: Mittwoch, 7. April 2010 11:29 An: statalist@hsphsun2.harvard.edu Betreff: st: RE: AW: Exclude some observations from a sample in a regression But be careful. -if foreign- would also include any missings on -foreign-. -if foreign != 1- would do that too. Nick n.j.cox@durham.ac.uk Martin Weiss In the case of a binary variable, you could use the shortcuts sysuse auto, clear regress price weight length if foreign regress price weight length if !foreign to include all foreign (first case) or domestic (second case) cars. Claude Francoeur Doing a regression, I would like to exclude a series of observations that are identified with a binary variable (=1). Could you let me know what the syntax would be, if it's doable? * * 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/ * * 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: Exclude some observations from a sample in a regression***From:*Claude Francoeur <claude.francoeur@hec.ca>

**st: AW: Exclude some observations from a sample in a regression***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: RE: AW: Exclude some observations from a sample in a regression***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: error message: initial values not feasible** - Next by Date:
**RE: st: RE: RE: RE: Undocumented limitation of describe (and hence -ds-) in Stata 10?** - Previous by thread:
**st: RE: AW: Exclude some observations from a sample in a regression** - Next by thread:
**st: Is there a way to combine Hausman-Taylor estimator and Panel IV estimator?** - Index(es):