estim.hazard {cohorttools} | R Documentation |
Estimates hazard function using Poisson model
Description
Estimates hazard function using Poisson model
Usage
estim.hazard(
formula,
data,
time,
status,
breaks,
knots,
time.eval = breaks,
alpha = 0.05,
use.GAM = FALSE,
print.GAM.summary = FALSE,
...
)
Arguments
formula |
formula with Surv in LHS, NOTE! only one variable in RHS |
data |
data used by formula |
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 |
use.GAM |
logical determining if generalized additive model (GAM) is used |
print.GAM.summary |
logical determining if summary of GAM is printed |
... |
parameters for glm |
Value
Returns data frame with time and hazard function values with attribute 'estim.hazard.param' containing estimation parameters (breaks and knots)
Author(s)
Jari Haukka jari.haukka@helsinki.fi
Examples
library(survival)
tmp.hz<-estim.hazard(time=lung$time,status=lung$status)
head(tmp.hz,2)
attributes(tmp.hz)$estim.hazard.param # estimation parameters
tmp.hz2<-estim.hazard(formula=Surv(time,status)~sex,data=lung)
head(tmp.hz2,2)
[Package cohorttools version 0.1.6 Index]