The R Project SVN R

Rev

Rev 27442 | Rev 28897 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27442 Rev 28231
Line 43... Line 43...
43
  }{f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s)}
43
  }{f(x)= 1/(s^a Gamma(a)) x^(a-1) e^-(x/s)}
44
  for \eqn{x > 0}, \eqn{\alpha > 0}{a > 0} and \eqn{\sigma > 0}{s > 0}.
44
  for \eqn{x > 0}, \eqn{\alpha > 0}{a > 0} and \eqn{\sigma > 0}{s > 0}.
45
  The mean and variance are
45
  The mean and variance are
46
  \eqn{E(X) = \alpha\sigma}{E(X) = a*s} and
46
  \eqn{E(X) = \alpha\sigma}{E(X) = a*s} and
47
  \eqn{Var(X) = \alpha\sigma^2}{Var(X) = a*s^2}.
47
  \eqn{Var(X) = \alpha\sigma^2}{Var(X) = a*s^2}.
-
 
48
 
-
 
49
  \code{pgamma()} uses algorithm AS 239, see the references.
48
}
50
}
49
\note{
51
\note{
50
  The S parametrization is via \code{shape} and \code{rate}: S has no
52
  The S parametrization is via \code{shape} and \code{rate}: S has no
51
  \code{scale} parameter.  Prior to 1.4.0 \R only had \code{scale}.
53
  \code{scale} parameter.  Prior to 1.4.0 \R only had \code{scale}.
52
  
54
 
53
  The cumulative hazard \eqn{H(t) = - \log(1 - F(t))}{H(t) = - log(1 - F(t))}
55
  The cumulative hazard \eqn{H(t) = - \log(1 - F(t))}{H(t) = - log(1 - F(t))}
54
  is \code{-pgamma(t, ..., lower = FALSE, log = TRUE)}.
56
  is \code{-pgamma(t, ..., lower = FALSE, log = TRUE)}.
55
}
57
}
56
\references{
58
\references{
57
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
59
  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
58
  \emph{The New S Language}.
60
  \emph{The New S Language}.
59
  Wadsworth \& Brooks/Cole.
61
  Wadsworth \& Brooks/Cole.
-
 
62
 
-
 
63
  Shea, B. L. (1988)
-
 
64
  Algorithm AS 239,  Chi-squared and Incomplete Gamma Integral,
-
 
65
  \emph{Applied Statistics (JRSS C)} \bold{37}, 466--473.
60
}
66
}
61
\seealso{
67
\seealso{
62
  \code{\link{gamma}} for the Gamma function, \code{\link{dbeta}} for
68
  \code{\link{gamma}} for the Gamma function, \code{\link{dbeta}} for
63
  the Beta distribution and \code{\link{dchisq}} for the chi-squared
69
  the Beta distribution and \code{\link{dchisq}} for the chi-squared
64
  distribution which is a special case of the Gamma distribution.
70
  distribution which is a special case of the Gamma distribution.