estim.hazard {cohorttools} | R Documentation |
Estimates hazard function using Poisson model
estim.hazard(
time,
status,
breaks,
knots,
time.eval = breaks,
alpha = 0.05,
...
)
time |
time variables |
status |
status indicator Lowest value used as sensoring. If only one unique value detected, all are assumed events |
breaks |
time is splitted with these values |
knots |
knots for natural splines used in estimation of hazard function |
time.eval |
in which time points hazard function is evaluate. |
alpha |
significance level for confidence intervals |
... |
parameters for glm |
Returns data frame with time and hazard function values with attribute 'estim.hazard.param' containing estmation parameters (breaks and knots)
Jari Haukka jari.haukka@helsinki.fi
library(survival)
tmp.hz<-estim.hazard(time=lung$time,status=lung$status)
head(tmp.hz,2)
attributes(tmp.hz)$estim.hazard.param # estimation parameters