Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Re: RE: Re: eliminate negative values and their positivecounterpart


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Re: RE: Re: eliminate negative values and their positivecounterpart
Date   Tue, 06 Mar 2007 17:17:25 -0500

I thought of mentioning that as a possibility to see if the original post was concerned about that possibility. It actually would not be too hard to change my code to only eliminate matched pairs if that is required.

Michael Blasnik

----- Original Message ----- From: "Sergiy Radyakin" <Radyakin@aoek.uni-hannover.de>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, March 06, 2007 4:53 PM
Subject: st: Re: RE: Re: eliminate negative values and their positive counterpart



Sorry, (my mistake) this line should be simply omitted. Both npos and nneg are defined later on.
I guess the solution proposed by Mr Blasnik will exclude observations if the sum
over a group is zero, but should it be a necessary condition?

30
-30
30

(with all other variables being same) -- e.g. bought apples for 30, than returned them to the cashier, than decided to buy them again :)
This should simplify to 30, but the sum over the group is not 0.

it is a pity that I can't do as I have written, i.e. -count if- after -egen-

Sincerely yours,
Sergiy Radyakin
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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