% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/residual_entropy.R
\name{residual_info_gen}
\alias{residual_info_gen}
\title{Residual Entropy Generating Function (REGF)}
\usage{
residual_info_gen(dens_fn, surv_fn = NULL, alpha = 1, t = 0, upper = 100)
}
\arguments{
\item{dens_fn}{Density function \eqn{f(x)}.}

\item{surv_fn}{Survival function \eqn{\bar{F}(x)}; computed by integration
if \code{NULL}.}

\item{alpha}{Positive parameter (default 1).}

\item{t}{Truncation time (default 0).}

\item{upper}{Upper integration limit.}
}
\value{
Scalar numeric.
}
\description{
Computes the residual entropy generating function proposed by Smitha,
Rajesh, and Jayalekshmi (2024):
\deqn{\mathcal{I}_\alpha(X; t) = \int_t^\infty
  \left(\frac{f(x)}{\bar{F}(t)}\right)^\alpha dx, \quad \alpha > 0,\; t \ge 0.}

Note that:
\itemize{
  \item At \eqn{t = 0}, \eqn{\mathcal{I}_\alpha(X;0) = \mathcal{I}_\alpha(f)},
    Golomb's IGF.
  \item \eqn{-\partial \mathcal{I}_\alpha/\partial\alpha|_{\alpha=1} = H(X;t)},
    the residual entropy.
}
}
\examples{
f  <- function(x) dexp(x, 1)
Fb <- function(x) pexp(x, 1, lower.tail = FALSE)

# At t=0, alpha=1: should equal 1
residual_info_gen(f, Fb, alpha = 1, t = 0)

# Dynamic version at t = 0.5
residual_info_gen(f, Fb, alpha = 2, t = 0.5)

# Derivative recovers residual entropy
(residual_info_gen(f, Fb, alpha = 1 + 1e-5, t = 0) -
  residual_info_gen(f, Fb, alpha = 1, t = 0)) / 1e-5   # approx -H(f)

}
\references{
Smitha S., Rajesh G., Jayalekshmi S. (2024). On residual entropy generating
function. *Journal of the Indian Statistical Association*, 62(1), 81--93.
}
\seealso{
\code{\link{info_gen_function}}, \code{\link{residual_entropy}},
  \code{\link{np_residual_info_gen}}
}
