km_fun function

Helper Function to get Kaplan-Meier Estimate

Helper Function to get Kaplan-Meier Estimate

km_fun(resp, status, data, times)

Arguments

  • resp: (string)

    the response variable name.

  • status: (string)

    only for "survival" resptype, the status variable name in survival data.

  • data: (data.frame)

    data to use.

  • times: (numeric)

    time points to use.

Returns

Numeric vector with Kaplan-Meier estimates at times.