check_survival_probability_fcn: Check that a survival probability function is well-behaved

View source: R/checkinputs.R

check_survival_probability_fcnR Documentation

Check that a survival probability function is well-behaved

Description

Survival probabilities accumulated from a fixed origin can never increase as the horizon moves forward in time, and must always lie in the closed interval [0,1]. This routine evaluates the supplied survival_probability_fcn on the ordered time_pts. Emits a warning whenever the probabilities are increasing or fall outside [0,1].

Usage

check_survival_probability_fcn(survival_probability_fcn, time_pts)

Arguments

survival_probability_fcn

A function for computing survival probabilities, with arguments T, t, returning the probability of survival from time t to time T

time_pts

A vector of time points at which to test the behavior of survival_probability_fcn

Value

TRUE if the survival probabilities are nonincreasing and within [0,1] across time_pts, otherwise FALSE

See Also

Other Input Checking: check_discount_factor_fcn(), check_variance_cumulation_fcn(), warn_once_negative_default_intensity()


ragtop documentation built on June 20, 2026, 5:06 p.m.