getsurv: get survival values from icfit object

getsurvR Documentation

get survival values from icfit object

Description

For a vector of times, getsurv gets the associated survival values. The MLE is not uniquely defined for times inbetween the first and second row on the same column of the intmap. If there is not a unique MLE for a specific time, then either use, interpolation: (default), which basically finds the point on the line connecting the two points bounding the non-unique MLE interval, or, left: take the left side of the non-unique MLE interval (smallest value) or, right: take the right side of the non-unique MLE interval. The LRin attribute is ignored (see warning).

If icfit has more than one strata, then performs the operations on each stratum.

Usage

getsurv(times, icfit, nonUMLE.method = "interpolation")

Arguments

times

numeric vector of times

icfit

icfit object used to define the survival function

nonUMLE.method

character vector, either "interpolation", "left" or "right". Method for finding survival when times element is not at a unique MLE time.

Value

if there is only one stratum, then creates a LIST,with elements

S

vector of survival function values at each element of times

times

vector of times for which need survival function

unique.mle

logical denoting whether associated survival value is a unique MLE

nonUMLE.method

character vector describing non-unique MLE method

if there are k>1 strata, then creates a list with k+1 elements, the elements 1:k are lists of results for each strata, and element k+1 is called strataNames and is a character vector of strata names.

Warning

The getsurv function does not use LRin attributes, so values exactly on the intmap values may only represent the limit approaching that value, not the survival at that value.


interval documentation built on Aug. 25, 2023, 1:08 a.m.