Bookmark and Share

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, is already up and running.

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

Re: st: Bootstrapping question

From   "JVerkuilen (Gmail)" <>
Subject   Re: st: Bootstrapping question
Date   Fri, 8 Feb 2013 09:00:20 -0500

I think you might get a lot of benefit out of either a full likelihood
or Bayesian analysis, but these aren't necessarily easy.

Here's an example if you had binomial data with N = 10, with y = 0 successes.

     L(p) = (1 - p)^10

It turns out that L(p) is maximized at p = 0.0 (as one would expect),
but this is of course a silly estimate for a probability, and the Wald
interval is even sillier. Try

cii 10 0, wald

To determine 95% confidence interval from the likelihood function,
find the p such that L(p) = 0.15, which is equivalent to -2 LL(p) =
3.84, for the .05 cutoff for a chi square(1). This can be done
analytically with the likelihood above, but in general you need to
solve it numerically. If you read off the table of values you find
that the upper limit of the likelihood based confidence interval is

(One intermediate step is to normalize the likelihood such that the
maximum value is scaled to equal 1. It's not needed here because the
maximum value is 1.) In Stata the easiest way to do this is simply to
generate p and the relevant likelihood (or equivalently -2
log-likelihood) and plot.


set obs 101
range temp 1 101
gen p = (temp - 1)/100
drop temp
gen L = (1 - p)^10
quietly sum L
gen L0 = L/r(max)
twoway (connected L0 p, sort)

(Try all the other cii options such as wilson, agresti, jeffreys, too.
Jeffreys is a Bayesian method that's very close to what I show.) Your
problem is more complicated because it's multinomial, but this general
approach might help.

See Yudi Pawitan. (2001), In All Likelihood, Oxford.
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index