Statalist


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

Re: st: confidence interval for median


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: confidence interval for median
Date   Sat, 9 Aug 2008 15:46:48 +0100 (BST)

--- moleps islon <moleps2@gmail.com> wrote:
> I need to find the confidence interval for my mean. I thought to use
> a jackknife command, but I cant get it to work: Jknife: sum age. 

What do you want, the median (subject title) or the mean (the
question)? The jacknife is not appropriate for the median. For the mean
you can use -mean-, and for the median you can use -centile-. If you
want to use a resampling method you can use -bootstrap-, which is
appropriate for both the mean and the median. See the example below and
the helpfiles of these commands:

*--------------------- begin example ------------------
sysuse auto, clear

mean mpg 
centile mpg
bootstrap mean=r(mean) median=r(p50): sum mpg, detail
*---------------------- end example -------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
*
*   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/



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