haz_function: Helper function that calculates excess and population hazards...

Description Usage Arguments Value Author(s) See Also

Description

A function that calculates the excess and population hazards for a given transition. Code is based on function rs.surv from the relsurv package.

Usage

1
2
3
4
5
6
7
8
9
haz_function(
  formula = formula(data),
  data,
  ratetable = relsurv::slopop,
  na.action,
  add.times,
  rmap,
  include.all.times = FALSE
)

Arguments

formula

A non-parametric Surv-based formula, e.g. Surv(times, status)~1

data

A subset of the msprep object (dataset) where there's only data for the chosen transition

ratetable

A table of event rates, organized as a ratetable object, such as slopop

na.action

A missing-data filter function, applied to the model.frame, after any subset argument has been used. Default is options()$na.action

add.times

Additional times at which the hazards should be evaluated

rmap

An optional list to be used if the variables are not organized and named in the same way as in the ratetable object

include.all.times

Should hazards be evaluated at all times in seq(minimum time, maximum time, by=1). Default is FALSE

Value

A list containing the needed hazards.

Author(s)

Damjan Manevski damjan.manevski@mf.uni-lj.si

See Also

msfit.relsurv


mstate documentation built on Nov. 8, 2021, 5:06 p.m.