get_hazard_offset_weights: Compute the (Cumulative) Baseline Hazard from Cox Model with...

View source: R/general_markov_model.R

get_hazard_offset_weightsR Documentation

Compute the (Cumulative) Baseline Hazard from Cox Model with Offsets

Description

Compute the Breslow type baseline hazard and cumulative baseline hazard at each event time from a weighted Cox model with offsets.

Usage

get_hazard_offset_weights(fit,data,time1= NULL,time2,w)

Arguments

fit

The results of a weighted coxph fit.

data

The original data for fitting the weighted Cox model.

time1

The default is NULL. For left truncation data, which refers to transition rate for terminal event following non-terminal events, this argument is the time to non-terminal event.

time2

For right censored data, this is the event time or censoring time. For left truncation data, the argument is the time to terminal event or the censoring time.

w

IP weights.

Details

See also get_hazard, handles the offset term in coxph for predicting the baseline hazard.

Value

A list contains two dataframes.

Lambda

See also get_hazard, returns a step function for cumulative baseline hazard.

lambda

Returns a dataframe for baseline hazard.

cum_base_haz

Returns a dataframe for cumulative baseline hazard.

See Also

get_hazard, basehaz


semicmprskcoxmsm documentation built on April 30, 2022, 1:08 a.m.