The R Project SVN R

Rev

Rev 90146 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90146 Rev 90152
Line 25... Line 25...
25
    You can specify just the initial letter.}
25
    You can specify just the initial letter.}
26
  \item{conf.level}{confidence level for the returned confidence
26
  \item{conf.level}{confidence level for the returned confidence
27
    interval.}
27
    interval.}
28
  \item{two.sided.method}{a character string specifying the method for
28
  \item{two.sided.method}{a character string specifying the method for
29
    computing two-sided p-values, must be one of \code{"minlike"}
29
    computing two-sided p-values, must be one of \code{"minlike"}
30
    (default) or \code{"central"}, or an abbrevation thereof.
30
    (default) or \code{"central"}, or an abbreviation thereof.
31
    See \sQuote{Details}.}
31
    See \sQuote{Details}.}
32
}
32
}
33
\details{
33
\details{
34
  Confidence intervals are obtained by a procedure first given in
34
  Confidence intervals are obtained by a procedure first given in
35
  \bibcitet{R:Clopper+Pearson:1934}.
35
  \bibcitet{R:Clopper+Pearson:1934}.
Line 44... Line 44...
44
  two-sided alternative that \eqn{\theta \ne \theta_0}, the 
44
  two-sided alternative that \eqn{\theta \ne \theta_0}, the 
45
  \emph{central} p-value \bibcitep{R:Fay:2010} is
45
  \emph{central} p-value \bibcitep{R:Fay:2010} is
46
  \deqn{\min(2 \min(P(T \le t | \theta_0), P(T \ge t | \theta_0)), 1)}
46
  \deqn{\min(2 \min(P(T \le t | \theta_0), P(T \ge t | \theta_0)), 1)}
47
  (this is called the twice the smaller tail method in
47
  (this is called the twice the smaller tail method in
48
  \bibcitet{R:Hirji:2005}).
48
  \bibcitet{R:Hirji:2005}).
49
  The \emph{minlike} p-value is the probability of observing a value of
49
  The \emph{\I{minlike}} p-value is the probability of observing a value of
50
  \eqn{T} not more likely than the one observed, i.e., 
50
  \eqn{T} not more likely than the one observed, i.e., 
51
  \deqn{\sum_{s: P(T = s | \theta_0) \le P(T = s | \theta_0)} P(T = s | \theta_0)}
51
  \deqn{\sum_{s: P(T = s | \theta_0) \le P(T = s | \theta_0)} P(T = s | \theta_0)}
52
  (this is called the probability based method by Hirji).
52
  (this is called the probability based method by \I{Hirji}).
53
  
53
  
54
  For the exact binomial test, \eqn{T} is the number of successes and
54
  For the exact binomial test, \eqn{T} is the number of successes and
55
  \eqn{\theta = p} is the probability of success.
55
  \eqn{\theta = p} is the probability of success.
56
 
56
 
57
  Inverting the two-sided test which rejects when the central p-value is
57
  Inverting the two-sided test which rejects when the central p-value is
58
  at most \eqn{\alpha} gives central confidence intervals with
58
  at most \eqn{\alpha} gives central confidence intervals with
59
  confidence level at least \eqn{1 - \alpha} where both lower and upper
59
  confidence level at least \eqn{1 - \alpha} where both lower and upper
60
  tails have probability at most \eqn{\alpha / 2}.  For the exact
60
  tails have probability at most \eqn{\alpha / 2}.  For the exact
61
  binomial test, these are the Clopper-Pearson intervals.
61
  binomial test, these are the \I{Clopper}-\I{Pearson} intervals.
62
 
62
 
63
  It is intended to change the default method for computing two-sided
63
  It is intended to change the default method for computing two-sided
64
  p-values from minlike to central to make these match the confidence
64
  p-values from \I{minlike} to central to make these match the confidence
65
  intervals.
65
  intervals.
66
}
66
}
67
\value{
67
\value{
68
  A list with class \code{"htest"} containing the following components:
68
  A list with class \code{"htest"} containing the following components:
69
  \item{statistic}{the number of successes.}
69
  \item{statistic}{the number of successes.}