% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pc_utils.R
\name{pc-utils}
\alias{pc-utils}
\alias{pcParamCheck}
\alias{pclrange}
\alias{pcrange}
\title{Internal functions to check PC-prior parameters.}
\usage{
pcParamCheck(npars, reference, probability)

pclrange(lrange, lam, d = 2, log = FALSE)

pcrange(range, lam, d = 2, log = FALSE)
}
\arguments{
\item{npars}{number of parameters.}

\item{reference}{numeric vector to set the reference
for each parameter for its PC-prior.}

\item{probability}{numeric vector with to
set the probability statement of the PC prior for each
parameter. For \code{sigma} probability statement is
P(sigma > \code{reference}) = p whereas for \code{range} it is
P(range < \code{reference}). If  NA, 0 or 1, the corresponding
\code{reference} will be used as fixed. If missing, all the
parameters considered as known (fixed) and equal the
corresponding reference value.}

\item{lrange}{numeric with the log of the (practical) range}

\item{lam}{numeric with the prior parameter}

\item{d}{integer to specify the domain dimention}

\item{log}{logical indicating if the density
is to be returned in the log scale}

\item{range}{numeric with the of the (practical) range.}
}
\description{
Internal functions to check PC-prior parameters.
}
\section{Functions}{
\itemize{
\item \code{pcParamCheck()}: Check the PC-prior arguments.

\item \code{pclrange()}: Penalized Complexity (PC) prior for the log of the practical range.

\item \code{pcrange()}: Penalized Complexity (PC) prior for the practical range.

}}
\examples{
# P(range < 2.0) = 0.1
 lam <- -log(0.1) * 2.0
 plot(function(x) pcrange(x, lam), 1/100, 10, n = 100)
}
