% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/0-base-distributions.R
\name{base_lowercase}
\alias{base_lowercase}
\alias{dgpd}
\alias{pgpd}
\alias{qgpd}
\alias{rgpd}
\alias{dinvgauss}
\alias{pinvgauss}
\alias{qinvgauss}
\alias{rinvgauss}
\alias{damoroso}
\alias{pamoroso}
\alias{qamoroso}
\alias{ramoroso}
\alias{dcauchy_vec}
\alias{pcauchy_vec}
\alias{qcauchy_vec}
\alias{rcauchy_vec}
\title{Lowercase vectorized distribution functions (base kernels)}
\usage{
dgpd(x, threshold, scale, shape, log = FALSE)

pgpd(q, threshold, scale, shape, lower.tail = TRUE, log.p = FALSE)

qgpd(p, threshold, scale, shape, lower.tail = TRUE, log.p = FALSE)

rgpd(n, threshold, scale, shape)

dinvgauss(x, mean, shape, log = FALSE)

pinvgauss(q, mean, shape, lower.tail = TRUE, log.p = FALSE)

qinvgauss(
  p,
  mean,
  shape,
  lower.tail = TRUE,
  log.p = FALSE,
  tol = 1e-10,
  maxiter = 200
)

rinvgauss(n, mean, shape)

damoroso(x, loc, scale, shape1, shape2, log = FALSE)

pamoroso(q, loc, scale, shape1, shape2, lower.tail = TRUE, log.p = FALSE)

qamoroso(p, loc, scale, shape1, shape2, lower.tail = TRUE, log.p = FALSE)

ramoroso(n, loc, scale, shape1, shape2)

dcauchy_vec(x, location, scale, log = FALSE)

pcauchy_vec(q, location, scale, lower.tail = TRUE, log.p = FALSE)

qcauchy_vec(p, location, scale, lower.tail = TRUE, log.p = FALSE)

rcauchy_vec(n, location, scale)
}
\arguments{
\item{x}{Numeric vector of quantiles.}

\item{threshold, scale, shape, mean, loc, shape1, shape2, location}{Distribution parameters (scalars).}

\item{log}{Logical; if \code{TRUE}, return log-density.}

\item{q}{Numeric vector of quantiles.}

\item{lower.tail}{Logical; if \code{TRUE} (default), probabilities are
\eqn{P(X \le x)}.}

\item{log.p}{Logical; if \code{TRUE}, probabilities are on log scale.}

\item{p}{Numeric vector of probabilities.}

\item{n}{Integer number of observations to generate.}

\item{tol, maxiter}{Tolerance and max iterations for numerical inversion.}
}
\value{
Numeric vector of densities, probabilities, quantiles, or random variates.
}
\description{
Vectorized R wrappers around the scalar base-kernel functions defined in this file. These
helpers are intended for interactive R use, examples, testing, and checking numerical behavior
outside compiled NIMBLE code.
}
\details{
The wrappers preserve the same parameterizations as the uppercase scalar functions, but accept
vector inputs for \code{x}, \code{q}, or \code{p} and allow \code{n > 1} for random generation.

Each lowercase helper is a vectorized R wrapper around the corresponding
uppercase scalar routine documented in this file. The wrapper keeps the same
parameterization and applies the scalar kernel repeatedly over the supplied
evaluation points or simulation index. These helpers are therefore
appropriate for interactive analysis, testing, and examples, whereas the
uppercase functions are the building blocks used inside NIMBLE model code.

The wrappers do not change the underlying theory. For example, \code{qgpd()} still uses the
closed-form GPD inverse, \code{qinvgauss()} still performs numerical inversion of the inverse
Gaussian CDF, and \code{qamoroso()} still maps a gamma quantile through the Amoroso
transformation. Random-generation wrappers call the corresponding scalar RNG repeatedly when
\code{n > 1}.
}
\section{Functions}{
\itemize{
\item \code{dgpd()}: GPD density (vectorized)

\item \code{pgpd()}: GPD distribution function (vectorized)

\item \code{qgpd()}: GPD quantile function (vectorized)

\item \code{rgpd()}: GPD random generation (vectorized)

\item \code{dinvgauss()}: Inverse Gaussian density (vectorized)

\item \code{pinvgauss()}: Inverse Gaussian distribution function (vectorized)

\item \code{qinvgauss()}: Inverse Gaussian quantile function (vectorized)

\item \code{rinvgauss()}: Inverse Gaussian random generation (vectorized)

\item \code{damoroso()}: Amoroso density (vectorized)

\item \code{pamoroso()}: Amoroso distribution function (vectorized)

\item \code{qamoroso()}: Amoroso quantile function (vectorized)

\item \code{ramoroso()}: Amoroso random generation (vectorized)

\item \code{dcauchy_vec()}: Cauchy density (vectorized)

\item \code{pcauchy_vec()}: Cauchy distribution function (vectorized)

\item \code{qcauchy_vec()}: Cauchy quantile function (vectorized)

\item \code{rcauchy_vec()}: Cauchy random generation (vectorized)

}}
\examples{
# GPD
dgpd(c(1.5, 2.0, 2.5), threshold = 1, scale = 0.8, shape = 0.2)
pgpd(c(1.5, 2.0), threshold = 1, scale = 0.8, shape = 0.2)
qgpd(c(0.5, 0.9), threshold = 1, scale = 0.8, shape = 0.2)
rgpd(5, threshold = 1, scale = 0.8, shape = 0.2)

# Inverse Gaussian
dinvgauss(c(1, 2, 3), mean = 2, shape = 5)
rinvgauss(5, mean = 2, shape = 5)

# Amoroso
damoroso(c(1, 2), loc = 0, scale = 1.5, shape1 = 2, shape2 = 1.2)
ramoroso(5, loc = 0, scale = 1.5, shape1 = 2, shape2 = 1.2)

# Cauchy
dcauchy_vec(c(-1, 0, 1), location = 0, scale = 1)
rcauchy_vec(5, location = 0, scale = 1)

}
\seealso{
\code{\link[=gpd]{gpd()}}, \code{\link[=InvGauss]{InvGauss()}}, \code{\link[=amoroso]{amoroso()}}, \code{\link[=cauchy]{cauchy()}}, \code{\link[=build_nimble_bundle]{build_nimble_bundle()}},
\code{\link[=kernel_support_table]{kernel_support_table()}}.

Other vectorized kernel helpers: 
\code{\link{amoroso_lowercase}},
\code{\link{cauchy_mix_lowercase}},
\code{\link{gamma_lowercase}},
\code{\link{invgauss_lowercase}},
\code{\link{laplace_lowercase}},
\code{\link{lognormal_lowercase}},
\code{\link{normal_lowercase}}
}
\concept{vectorized kernel helpers}
