% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/residual_entropy.R
\name{regf_characterise}
\alias{regf_characterise}
\title{Characterise a Distribution via the REGF}
\usage{
regf_characterise(
  dens_fn,
  surv_fn = NULL,
  alpha = 2,
  t_grid = seq(0, 2, by = 0.2),
  upper = 100
)
}
\arguments{
\item{dens_fn}{Density function.}

\item{surv_fn}{Survival function.}

\item{alpha}{REGF parameter.}

\item{t_grid}{Grid of truncation times.}

\item{upper}{Integration upper bound.}
}
\value{
A data frame with columns \code{t}, \code{REGF}, \code{log_REGF},
  and the fitted linear-in-\eqn{t} slope \code{slope} (log-linear
  characterisation).
}
\description{
Checks whether the functional form of \eqn{\mathcal{I}_\alpha(X;t)} over a
grid of \eqn{t} values is consistent with an exponential distribution.  For
\eqn{X \sim \text{Exp}(\lambda)},
\eqn{\mathcal{I}_\alpha(t) / \mathcal{I}_\alpha(0) = e^{(\alpha-1)\lambda t}},
a pure exponential in \eqn{t}.
}
\examples{
f  <- function(x) dexp(x, 1)
Fb <- function(x) pexp(x, 1, lower.tail = FALSE)
regf_characterise(f, Fb, alpha = 2)

}
\references{
Smitha S., Rajesh G., Jayalekshmi S. (2024), Section 3.
}
