% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lag_handling.R
\name{calibrate_p_to_e}
\alias{calibrate_p_to_e}
\title{P-to-e calibrator}
\usage{
calibrate_p_to_e(p, strategy = "mixture", eps = 1e-16)
}
\arguments{
\item{p}{Numeric vector of p-values in (0, 1].}

\item{strategy}{Character. \code{"mixture"} (default, from Vovk & Wang 2021) or
\code{"simple"}. See Details for the formulas.}

\item{eps}{Numeric. Numerical guard for log(0). Default: 1e-16.}
}
\value{
Numeric vector of e-values >= 0.
}
\description{
Converts anytime-valid p-values to e-values using the mixture or simple
calibrator, as used in CR23 Section 4.4.
}
\details{
Mixture calibrator (default, matches Python comparecast behaviour):
\deqn{f(p) = \frac{1 - p + p\log(p)}{p\,(\log p)^2}}

Simple calibrator (\code{strategy = "simple"}):
\deqn{f(p) = \frac{1}{2\sqrt{p}}}
}
\examples{
p <- c(0.5, 0.1, 0.01)
calibrate_p_to_e(p)
calibrate_p_to_e(p, strategy = "simple")

}
