A simple function to estimate censoring probabilities given the model object and estimating approach supplied in a model_specification objects

estimate_censoring_prob(
  models,
  data,
  new_data = NULL,
  weights = NULL,
  accumulate = TRUE,
  cens_formula = NULL
)

Arguments

models

A model_specification object

data

Source data used to fit model

new_data

Data where predictions are required (if NULL then prediction are made in source data)

weights

A vector of observation weights

accumulate

Indicates whether to produce one entry per subject rather than one entry per observation

cens_formula

A formula providing the censoring model. If NULL then

Value

A vector of estimated censoring probabilities

Author

M. Alan Brookhart