R/utils.R
rmst_generic.Rd
Generic function to find the restricted mean of a distribution, given the equivalent probability distribution function using numeric intergration.
rmst_generic(pdist, t, start = 0, matargs = NULL, ...)
pdist | Probability distribution function, for example,
|
---|---|
t | Vector of times to which rmst is evaluated |
start | Optional left-truncation time or times. The returned restricted mean survival will be conditioned on survival up to this time. |
matargs | Character vector giving the elements of |
... | The remaining arguments define parameters of the distribution
|
Vector of restricted means survival times of the distribution at
p
.
This function is used by default for custom distributions for which an rmst function is not provided.
This assumes a suitably smooth, continuous distribution.
Christopher Jackson <chris.jackson@mrc-bsu.cam.ac.uk>
#> [1] 237.8849#> [1] 237.8849# must name the arguments