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.

# RE: st: Bootstrapping question

 From "Ilian, Henry (ACS)" To "'statalist@hsphsun2.harvard.edu'" Subject RE: st: Bootstrapping question Date Thu, 7 Feb 2013 17:27:30 -0500

```Thanks. That's helpful. If there are zero occurrences of a value, doesn't it mean that the scale has one fewer values: instead of a five-point scale, a four-point scale, etc.? Of course, if the value existed in the population, but didn't appear in the sample, than the sample would be off, and how much off it would be would depend on the prevalence of that value in the population, but isn't always a possibility in sampling.

Could you say more about a model for my generating process? I understand models as consisting of explanatory variables and covariates to predict a response variable. That doesn't seem to be the kind of model you mean.

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Thursday, February 07, 2013 5:02 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Bootstrapping question

Suppose that your ordinal categories are potentially 1 ... 5 but in
any sample there are zero occurrences of 5. Then no bootstrapped
sample (= sampling with replacement) can ever contain 5 and a
confidence interval cannot include positive outcomes. There is likely
to be a device for this problem, but it suggests to me that you need a

Nick

On Thu, Feb 7, 2013 at 9:28 PM, Ilian, Henry (ACS)
<Henry.Ilian@dfa.state.ny.us> wrote:
> I looked at the table of contents. The book is clearly worth having, but it doesn't seem to cover the sample-size problem--which actually may not be a problem, since the sample size is what it is, and there isn't a way to make it any larger. By improved, I meant narrower, although that's such an obvious answer I don't think it was what you were asking me. If bootstrapping won't result in narrower confidence intervals, then I'll have to live with the confidence intervals as they are.
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Thursday, February 07, 2013 3:12 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: Bootstrapping question
>
> This clarifies your situationconsiderably (but still does not explain
> what you mean by "improved"!).
>
> I'd look at Alan Agresti's books e.g.
>
> http://www.amazon.com/Analysis-Ordinal-Categorical-Probability-Statistics/dp/0470082895/
>
> Nick
>
> On Thu, Feb 7, 2013 at 7:57 PM, Ilian, Henry (ACS)
> <Henry.Ilian@dfa.state.ny.us> wrote:
>> Nick, you're right. Some of the potential (and actual) outcomes have observed zeros. I looked everywhere I could think of for the formula to compute sample sizes for multiple categories but couldn't find it. In the process, I read somewhere that the problem of multiple categories reduces to a two-category problem. I asked one statistician about this, and he said not true and suggested I take his on-line advanced sampling class. I certainly am considering that, but for the meanwhile, I still have a sample size that results in very wide confidence intervals. Again, my understanding from reading about bootstrapping is that one of the things bootstrapping was designed to do was to improve estimates of confidence intervals in small samples. My question is, can I use it in this situation, and if I do, what do I report?
>>
>> Many thanks,
>>
>> Henry
>>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
>> Sent: Thursday, February 07, 2013 4:18 AM
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: Bootstrapping question
>>
>> This focuses on intervals for a single (binomial) proportion. Henry's
>> question was about ordinal variables.
>> At a wild guess, he wants simultaneous confidence intervals. It also
>> sounds as if some of his potential outcomes have observed zeros.
>>
>> Nick
>>
>> On Thu, Feb 7, 2013 at 3:24 AM, Steve Samuels <sjsamuels@gmail.com> wrote:
>>>
>>> Lenth's site states that he use the "exact", presumably Clopper-Pearson,
>>> intervals, which is known to be conservative. But this is not
>>> what Stata computes. Since a 50% sample proportion is not possible with
>>> n = 27, the closest one can get to 50% is with k = 13 or 14 events. I'm
>>> not sure what Lenth's applet shows (I don't have Java enabled), but Stata
>>> does not show a 17.3% margin of error, rather a number closer to 20%
>>>
>>> . cii 27 13
>>>                                                       -- Binomial Exact --
>>>  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
>>> ----------+---------------------------------------------------------------
>>>           |         27    .4814815     .096159        .2866725    .6805035
>>>
>>> . cii 27 14
>>>                                                      -- Binomial Exact --
>>>  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
>>> ----------+---------------------------------------------------------------
>>>           |         27    .5185185     .096159        .3194965    .7133275
>>>
>>> You could have skipped the trip to Length's site and used Stata's own -cii- command
>>> with the Wilson intervals, recommended for n < 40 (Brown et al, 2008).
>>>
>>> . cii 27 13, wilson
>>>                                                         ------ Wilson ------
>>>  Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
>>> ----------+---------------------------------------------------------------
>>>           |         27    .4814815     .096159        .3074323    .6601438
>>>
>>> . cii 27 14, wilson
>>>                                                         ------ Wilson ------
>>>   Variable |        Obs        Mean    Std. Err.       [95% Conf. Interval]
>>> ---------+---------------------------------------------------------------
>>>            |         27    .5185185     .096159        .3398562    .6925677
>>>
>>> Brown, L. D., T. T. Cai, and A. DasGupta. 2001. Interval estimation for
>>> a binomial proportion. Statistical Science 16: 101-133
>>>
>>> Steve
>>>
>>> Steven J Samuels
>>> Consulting Statistician
>>> 18 Cantine's Island
>>> Saugerties NY 12477
>>> Voice: 845-246-0774
>>>
>>> On Feb 6, 2013, at 8:08 PM, Nick Cox wrote:
>>>
>>> I don't think I can add usefully to my previous comments. Saying that
>>> you used a particular program does not convey much to me. What does
>>> "improve the confidence intervals" mean?
>>>
>>> Nick
>>>
>>> On Wed, Feb 6, 2013 at 8:53 PM, Ilian, Henry (ACS)
>>> <Henry.Ilian@dfa.state.ny.us> wrote:
>>>> The sample size 1s 27, which is the largest number the case readers can handle in the amount of time allotted. The population the sample is drawn from is 140. To get a confidence interval for proportion I used Lenth's on-line application, http://homepage.cs.uiowa.edu/~rlenth/Power/. Since the items have different proportions, there are several confidence intervals. Using 50% as the proportion (meaning that for a particular item, 50% of the sample were awarded the highest ordinal rating, and the other 50% were awarded other ratings), I got a margin of error of 17.3%. For a proportion of 70%, the margin of error is 16%, etc.
>>>>
>>>> I'm new to the idea of bootstrapping, but it seemed to be a way to improve the confidence intervals.
>>>>
>>>> -----Original Message-----
>>>> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
>>>> Sent: Wednesday, February 06, 2013 2:04 PM
>>>> To: statalist@hsphsun2.harvard.edu
>>>> Subject: Re: st: Bootstrapping question
>>>>
>>>> For once, my line differs slightly from Maarten's.
>>>>
>>>> The crunch is that nowhere did Henry state where his confidence
>>>> intervals come from. If they were based on inappropriate assumptions,
>>>> bootstrapping may do better. But if the confidence intervals one way
>>>> are wide, the expectation is of a similar story from -bootstrap-.
>>>>
>>>> Nick
>>>>
>>>> On Wed, Feb 6, 2013 at 6:55 PM, Maarten Buis <maartenlbuis@gmail.com> wrote:
>>>>> On Wed, Feb 6, 2013 at 5:28 PM, Ilian, Henry (ACS)  wrote:
>>>>>> I am working with samples that result in very large confidence intervals, and there is no way to get larger samples. Therefore bootstrapping is an appealing option.
>>>>>
>>>>> Unfortunately the bootstrap is not going to help. The large confidence
>>>>> intervals mean that there is very little information present in your
>>>>> data, and no statistical technique can add information that was not
>>>>> present in your data to begin with. So it seems that you will just
>>>>> have to live with the very large confidence intervals.

*
*   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/

Confidentiality Notice: This e-mail communication, and any attachments, contains confidential and privileged information for the exclusive use of the recipient(s) named above. If you are not an intended recipient, or the employee or agent responsible to deliver it to an intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please notify me immediately by replying to this message and delete this communication from your computer. Thank you.

*
*   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/
```