% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{plot_regf}
\alias{plot_regf}
\title{Plot Residual Entropy Generating Function}
\usage{
plot_regf(
  dens_fn,
  surv_fn = NULL,
  alpha = 2,
  t = 0,
  grid = NULL,
  vary = c("t", "alpha"),
  upper = 100,
  col = "purple",
  lwd = 2,
  main = NULL
)
}
\arguments{
\item{dens_fn}{Density function.}

\item{surv_fn}{Survival function; computed if \code{NULL}.}

\item{alpha}{Positive parameter (used when \code{vary = "t"}).}

\item{t}{Truncation time (used when \code{vary = "alpha"}).}

\item{grid}{Numeric vector of the varying quantity values.}

\item{vary}{One of \code{"t"} (plot as function of \eqn{t}) or
\code{"alpha"} (plot as function of \eqn{\alpha}).}

\item{upper}{Integration upper bound.}

\item{col}{Line colour.}

\item{lwd}{Line width.}

\item{main}{Plot title.}
}
\value{
Invisibly returns the data frame used for plotting.
}
\description{
Plots the REGF \eqn{\mathcal{I}_\alpha(X;t)} as a function of \eqn{t} for
given \eqn{\alpha}, or as a function of \eqn{\alpha} for given \eqn{t}.
}
\examples{
f  <- function(x) dexp(x, 1)
Fb <- function(x) pexp(x, 1, lower.tail = FALSE)
plot_regf(f, Fb, alpha = 2, vary = "t")
plot_regf(f, Fb, t = 0.5, vary = "alpha")

}
