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 |
George Chioran <george_chioran@yahoo.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: AW: st: RE: Deleting similar observations |

Date |
Wed, 16 Jun 2010 02:54:29 -0700 (PDT) |

Yes, the discussion on the faq was helped me figure out what the problem was. Thank you a lot! ----- Original Message ---- From: Martin Weiss <martin.weiss1@gmx.de> To: statalist@hsphsun2.harvard.edu Sent: Wed, June 16, 2010 11:16:17 AM Subject: AW: st: RE: Deleting similar observations <> I searched the archive for the error message and found things like http://www.stata.com/statalist/archive/2006-11/msg00782.html, hence my suspicion, but only George can put an end to the speculation... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox Gesendet: Mittwoch, 16. Juni 2010 11:11 An: statalist@hsphsun2.harvard.edu Betreff: RE: st: RE: Deleting similar observations My guess differs. Martin's code should work in any recent version of Stata. I suspect a typo, but this remains an open question because George does not disclose precisely what he typed. In addition, note that this problem is only a very small step away from that discussed within an FAQ: FAQ . . . . . . Listing observations in a group that differ on a variable 11/01 How do I list observations in a group that differ on a variable? http://www.stata.com/support/faqs/data/diff.html Nick n.j.cox@durham.ac.uk Martin Weiss That makes me think you have an old version of Stata. Note you are meant to disclose any version other than 11.1. George Chioran I try this, but I keep getting the message: "time-series operators not allowed". Martin Weiss So Account 7 should also be -drop-ped, I guess: *********** clear* inp byte Account str1 Buy_sell 2 b 2 b 2 s 2 b 5 s 5 s 5 s 5 s 7 s 7 s end list, noo bys Account (Buy_sell): drop if Buy_sell[1]==Buy_sell[_N] list, noo *********** George Chioran I have a database that looks like this: Account Buy sell 2 b 2 b 2 s 2 b 5 s 5 s 5 s 5 s 7 s 7 s Taken per account, I would like to know if there is a way to delete all the observations that have the same letter in the Buy sell variable. In my case this would delete all observations from account 5 since they are all only sell. * * 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/ * * 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: Making a local with no assigned value zero***From:*George Chioran <george_chioran@yahoo.com>

**st: RE: Making a local with no assigned value zero***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: Making a local with no assigned value zero***From:*George Chioran <george_chioran@yahoo.com>

**st: Deleting similar observations***From:*George Chioran <george_chioran@yahoo.com>

**st: RE: Deleting similar observations***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**Re: st: RE: Deleting similar observations***From:*George Chioran <george_chioran@yahoo.com>

**AW: st: RE: Deleting similar observations***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**RE: st: RE: Deleting similar observations***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**AW: st: RE: Deleting similar observations***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: st: How to identify siblings** - Next by Date:
**RE: st: How to identify siblings** - Previous by thread:
**AW: st: RE: Deleting similar observations** - Next by thread:
**Re: st: Making a local with no assigned value zero** - Index(es):