Learn R Programming

psc (version 1.2.0)

surv_fpm: A function to obtain survival estimates from a flexible parametric model

Description

This function provides basic survival estimates from a flexible parametric survival model

Usage

surv_fpm(DC_clean, beta = 0, s = NULL)

Value

a list of times and assoicated survival probabilities

Arguments

DC_clean

a cleaned dataset ontained using dataComb().

beta

a parameter to determine if the survival probabilities should be adjusted by some (log) hazard ratio. Defaults to beta=0, i.e. no adjustment.

s

if specified will return the time at which some threshold is passed (e.g. s=0.5 for median survival time)

Details

A fucntion which extracts survival probabilities from a flexsurvreg object

Examples

Run this code
library(psc)
library(survival)
data("surv.mod")
data("data")
dc <- dataComb(surv.mod,data)
s_est <- surv_fpm(dc)

Run the code above in your browser using DataLab