Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Dropping observations in relation to mean and standarddeviation


From   daniel klein <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Dropping observations in relation to mean and standarddeviation
Date   Tue, 21 Jan 2014 17:34:24 +0100

This a cross-posting

http://www.stata-forum.de/stata-syntax-f18/drop-bei-bestimmten-wert-abhanging-vom-mittelwert-t662.html

Please see the FAQ concerned with cross-postings:
http://www.stata.com/support/faqs/resources/statalist-faq/#crossposting

and Nick Coxs' discussion of the issue on Statalist:
http://www.stata.com/statalist/archive/2013-06/msg00817.html

Concerning your question, there have been lots of interesting
discussions on the list about so-called 'outliers' and it seems the
general advice is to think twice, whether these are really coding
errors or the like, before deleting them automatically based on some
rule of thumb (e.g. larger than two or three SDs).

I have no exact idea about the structure of your data, but you might
want to -rehsape- rather than -stack-? Probably -egen-'s -sd- function
combined with a -by- prefix is a way to go from there.

Best
Daniel

-- 
Hi,
I tested 144 people and now I need to drop observation that are more
than three standarddeviations away from the mean of two variables for
one subject.

[...]
Is there a special command for that?
Otherwise I would just calculate the mean and standarddeviation for
every subject and then calculate three standard deviations away from
the mean and use the drop command.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index