| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/relsurv.haz_function.R |
| 3 |
\name{haz_function} |
| 4 |
\alias{haz_function} |
| 5 |
\title{Helper function that calculates excess and population hazards for a given transition} |
| 6 |
\usage{ |
| 7 |
haz_function( |
| 8 |
formula = formula(data), |
| 9 |
data, |
| 10 |
ratetable = relsurv::slopop, |
| 11 |
na.action, |
| 12 |
add.times, |
| 13 |
rmap, |
| 14 |
include.all.times = FALSE |
| 15 |
) |
| 16 |
} |
| 17 |
\arguments{ |
| 18 |
\item{formula}{A non-parametric Surv-based formula, e.g. Surv(times, status)~1} |
| 19 |
|
| 20 |
\item{data}{A subset of the msprep object (dataset) where there's |
| 21 |
only data for the chosen transition} |
| 22 |
|
| 23 |
\item{ratetable}{A table of event rates, organized as a ratetable object, such as slopop} |
| 24 |
|
| 25 |
\item{na.action}{A missing-data filter function, applied to the model.frame, after any subset argument has been used. Default is options()$na.action} |
| 26 |
|
| 27 |
\item{add.times}{Additional times at which the hazards should be evaluated} |
| 28 |
|
| 29 |
\item{rmap}{An optional list to be used if the variables are not organized and named in the same way as in the ratetable object} |
| 30 |
|
| 31 |
\item{include.all.times}{Should hazards be evaluated at all times in seq(minimum time, maximum time, by=1). Default is FALSE} |
| 32 |
} |
| 33 |
\value{ |
| 34 |
A list containing the needed hazards. |
| 35 |
} |
| 36 |
\description{ |
| 37 |
A function that calculates the excess and population hazards |
| 38 |
for a given transition. Code is based on function rs.surv from |
| 39 |
the relsurv package. |
| 40 |
} |
| 41 |
\seealso{ |
| 42 |
\code{\link{msfit.relsurv}} |
| 43 |
} |
| 44 |
\author{ |
| 45 |
Damjan Manevski \email{[email protected]} |
| 46 |
} |