estimate_rates is an internal helper function that estimates crude event rates.

estimate_rates(data, models)

Arguments

data

The input data frame

models

A model_specification object describing the incoming data, including the names of the variables containing the outcome (as a time-to-event), treatment, censoring, and associated models. The outcome and censoring times should be NA if they are censored).

Value

A data.frame with n, person time, event count, and crude event rate.

Author

M. Alan Brookhart