Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Goldstein <[email protected]> |
To | [email protected] |
Subject | Re: st: ci for a standard deviation |
Date | Wed, 26 Feb 2014 08:35:51 -0500 |
Steve, thanks for this I note, however, that (1) the bootstrap CI is narrower than the normal CI; (2) since I am using this as a "sensitivity" analysis for a sample size estimation, I prefer the broader CI :-) Best, Rich On 2/25/14, 7:11 PM, Steve Samuels wrote: > Alan's advice is valid only for normally distributed data. For a general approach, use > the bootstrap or jackknife: > > *************CODE BEGINS************* > sysuse auto, clear > set seed 49891 > bootstrap r(sd) : sum mpg > estat bootstrap, all > **************CODE ENDS************** > > Steve > [email protected] > > > On Feb 25, 2014, at 10:08 AM, Richard Goldstein <[email protected]> wrote: > > Alan, > > thank you > > Best, > Rich > > On 2/25/14, 9:57 AM, Alan Neustadtl wrote: >> Rich, >> >> >> How about: >> Assuming sd=15 and n=1,000 >> >> di 15*sqrt((1000-1)/invchi2((1000-1), .05/2)) >> di 15*sqrt((1000-1)/invchi2((1000-1), 1-(.05/2))) >> >> Best, >> Alan >> >> On Tue, Feb 25, 2014 at 9:49 AM, Richard Goldstein >> <[email protected]> wrote: >>> Hi, >>> >>> I want to calculate a CI for a standard deviation; anyone have Stata >>> code for this? >>> >>> And, no, it is not the CI given by sdtest (that is a CI for the mean for >>> some reason) >>> >>> Rich * * 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/