# Re: [R] Confidence Interval

From: <Bill.Venables_at_csiro.au>
Date: Mon, 4 Feb 2008 13:38:41 +1000

Sorry, but the paper is wrong, or at least the language is very loose. It does speak about a 'confidence interval' for a statistic, but that makes no sense. The author apparently means a confidence interval for the parameter for which the statistic is an estimate, and nominates the profile likelihood interval. This starts to make some sense.

Profile likelihood intervals are often calculated using R, but require the low-level optimisation tools to do it. It's easy enough, but there is no magic button to push to get them. At best it gets fiddly. (Some standard problems are supported with R software, such as mixed effect models, non-linear regressin and generalized linear models, but not this one.)

In this game there is no way around formulating your problem very carefully and if you want to communicate with others about it you really need to use the language in a careful, even pedantic way. The territory comes with many bear traps and quicksand pits.

Bill Venables.

-----Original Message-----
From: Jacques Wagnor [mailto:jacques.wagnor_at_gmail.com] Sent: Monday, 4 February 2008 12:59 PM
To: Venables, Bill (CMIS, Cleveland)
Cc: r-help_at_stat.math.ethz.ch
Subject: Re: [R] Confidence Interval

The motivation for the question comes from Figure 3 of this paper http://www.ma.hw.ac.uk/~mcneil/ftp/cad.pdf, which shows that a confidence interval for a statistic is possible. Does there exist a function in R for such a calculation? If not, how would one go about doing it in R?

Any pointers would be greatly appreciated.

On Feb 3, 2008 12:21 AM, <Bill.Venables_at_csiro.au> wrote:
> Your question is not clear. Confidence intervals apply to parameters.
> What you set out below is a simulation strategy. x is a simulated
> sample and y is a statistic based on it. There is no 'model' in any
> statistical sense.
>
> What is the parameter for which you want a confidence interval?
>
> What data set, or sets, will you have available to do it?
>
> Do you want to make parametric assumptions (in which case the
Likelihood
> Ratio interval may be possible) or do you want to use a non-parametric
> interval, keeping the assumptions as weak as possible (in which case,
> inverting the sign test might be appropriate)?
>
> Finally, what has this got to do with R-help?
>
>
>
>
> -----Original Message-----
> From: r-help-bounces_at_r-project.org
[mailto:r-help-bounces_at_r-project.org]
> On Behalf Of Jacques Wagnor
> Sent: Sunday, 3 February 2008 12:42 PM
> To: r-help_at_stat.math.ethz.ch
> Subject: [R] Confidence Interval
>
> I have a model as follows:
>
> x <- replicate(100, sum(rlnorm(rpois(1,5), 0,1)))
> y <- quantile(x, 0.99)
>
> How would one go about estimating the boundaries of a 95% confidence
> interval for y?
>
> Any pointers would be greatly appreciated.
>
> > version
> _
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 5.1
> year 2007
> month 06
> day 27
> svn rev 42083
> language R
> version.string R version 2.5.1 (2007-06-27)
>
> Jacques
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 04 Feb 2008 - 03:42:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Feb 2008 - 06:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.