Adds a column with the number of events: on the label rows the events in
the model, on the level rows the events at each level. Available for
logistic and Poisson glm models and for coxph models, the models with
an event count.
See also
Other regression tables:
add_glance_table(),
add_global_p(),
add_n_regression,
add_significance_stars(),
add_vif(),
combine_terms(),
glance_fun_s3(),
global_pvalue_fun(),
tbl_regression(),
tbl_uvregression()
Examples
# Example 1 ----------------------------------
glm(response ~ age + grade, trial, family = binomial) |>
tbl_regression(exponentiate = TRUE) |>
add_nevent()
# Example 2 ----------------------------------
glm(response ~ age + grade, trial, family = binomial) |>
tbl_regression(exponentiate = TRUE) |>
add_n(location = "level") |>
add_nevent(location = "level")