Commit 9c110536 authored by Radford Neal's avatar Radford Neal

fix to doc on distributions

parent 51a59aa9
......@@ -21,6 +21,10 @@
\subsection{BUG FIXES}{
\itemize{
\item Fixed the misleading/ambiguous/incorrect/incomprehensible documentation
on the \code{log}, \code{log.p}, and \code{lower.tail} arguments of
all the density, distribution, and quantile functions for standard
distributions (eg, \code{dgeom}, \code{pgeom}, \code{qgeom}, etc.).
\item Fixed a bug involving the "scalar stack" that could affect evaluation
of arithmetic operations when deep recursion has occurred.
}}
......
Fixes immediately after pqR-2018-11-18.
Includes doc fixes for standard distributions.
% File src/library/stats/man/Beta.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2011 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Beta}
......@@ -29,8 +30,11 @@ rbeta(n, shape1, shape2, ncp = 0)
is taken to be the number required.}
\item{shape1, shape2}{positive parameters of the Beta distribution.}
\item{ncp}{non-centrality parameter.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
......
% File src/library/stats/man/Binomial.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Binomial}
......@@ -28,8 +29,11 @@ rbinom(n, size, prob)
is taken to be the number required.}
\item{size}{number of trials (zero or more).}
\item{prob}{probability of success on each trial.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Chisquare.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Chisquare}
......@@ -29,8 +30,11 @@ rchisq(n, df, ncp=0)
is taken to be the number required.}
\item{df}{degrees of freedom (non-negative, but can be non-integer).}
\item{ncp}{non-centrality parameter (non-negative).}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Exponential.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Exponential}
......@@ -27,8 +28,11 @@ rexp(n, rate = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{rate}{vector of rates.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Fdist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{FDist}
......@@ -28,8 +29,11 @@ rf(n, df1, df2, ncp)
is taken to be the number required.}
\item{df1, df2}{degrees of freedom. \code{Inf} is allowed.}
\item{ncp}{non-centrality parameter. If omitted the central F is assumed.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/GammaDist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{GammaDist}
......@@ -32,9 +33,11 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
\item{rate}{an alternative way to specify the scale.}
\item{shape, scale}{shape and scale parameters. Must be positive,
\code{scale} strictly.}
\item{log, log.p}{logical; if \code{TRUE}, probabilities/densities \eqn{p}
are returned as \eqn{log(p)}.}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Geometric.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Geometric}
......@@ -27,8 +28,11 @@ rgeom(n, prob)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{prob}{probability of success in each trial. \code{0 < prob <= 1}.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
......
% File src/library/stats/man/Hypergeometric.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Hypergeometric}
......@@ -30,8 +31,11 @@ rhyper(nn, m, n, k)
\item{p}{probability, it must be between 0 and 1.}
\item{nn}{number of observations. If \code{length(nn) > 1}, the length
is taken to be the number required.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Logistic.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Logistic}
......@@ -29,8 +30,11 @@ rlogis(n, location = 0, scale = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{location, scale}{location and scale parameters.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
......
% File src/library/stats/man/Lognormal.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Lognormal}
......@@ -28,8 +29,11 @@ rlnorm(n, meanlog = 0, sdlog = 1)
is taken to be the number required.}
\item{meanlog, sdlog}{mean and standard deviation of the distribution
on the log scale with default values of \code{0} and \code{1} respectively.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/NegBinomial.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{NegBinomial}
......@@ -32,8 +33,11 @@ rnbinom(n, size, prob, mu)
Must be strictly positive, need not be integer.}
\item{prob}{probability of success in each trial. \code{0 < prob <= 1}.}
\item{mu}{alternative parametrization via mean: see \sQuote{Details}.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability. Does not alter the meaning of \code{prob}.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\details{
......
% File src/library/stats/man/Normal.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Normal}
......@@ -34,8 +35,11 @@ rnorm(n, mean = 0, sd = 1)
is taken to be the number required.}
\item{mean}{vector of means.}
\item{sd}{vector of standard deviations.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]} otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/SignRank.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{SignRank}
......@@ -28,8 +29,11 @@ rsignrank(nn, n)
is taken to be the number required.}
\item{n}{number(s) of observations in the sample(s). A positive
integer, or a vector of such integers.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/TDist.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2010 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{TDist}
......@@ -32,8 +33,11 @@ rt(n, df, ncp)
\item{ncp}{non-centrality parameter \eqn{\delta}{delta};
currently except for \code{rt()}, only for \code{abs(ncp) <= 37.62}.
If omitted, use the central t distribution.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Weibull.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2009 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Weibull}
......@@ -27,8 +28,11 @@ rweibull(n, shape, scale = 1)
\item{n}{number of observations. If \code{length(n) > 1}, the length
is taken to be the number required.}
\item{shape, scale}{shape and scale parameters, the latter defaulting to 1.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
% File src/library/stats/man/Wilcoxon.Rd
% Part of the R package, http://www.R-project.org
% Copyright 1995-2007 R Core Team
% Modifications for pqR Copyright (c) 2019 Radford M. Neal.
% Distributed under GPL 2 or later
\name{Wilcoxon}
......@@ -28,8 +29,11 @@ rwilcox(nn, m, n)
is taken to be the number required.}
\item{m, n}{numbers of observations in the first and second sample,
respectively. Can be vectors of positive integers.}
\item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
\item{lower.tail}{logical; if TRUE (default), probabilities are
\item{log}{logical; if TRUE, the log of the density is returned.}
\item{log.p}{logical; if TRUE, the quantile function takes the
log of the tail probability, or the distribution function returns the
log of the tail probability.}
\item{lower.tail}{logical; if TRUE (default), tail probabilities are
\eqn{P[X \le x]}, otherwise, \eqn{P[X > x]}.}
}
\value{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment