Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


TrialEmulation (version 0.0.4.2)

fit_weights_model: Method for fitting weight models

Description

Method for fitting weight models

Usage

fit_weights_model(object, data, formula, label)

Value

An object of class te_weights_fitted

Arguments

object

The object determining which method should be used, containing any slots containing user defined parameters.

data

data.frame containing outcomes and covariates as defined in formula.

formula

formula describing the model.

label

A short string describing the model.

Examples

Run this code
fitter <- stats_glm_logit(tempdir())
data(data_censored)
# Not usually called directly by a user
fitted <- fit_weights_model(
  object = fitter,
  data = data_censored,
  formula = 1 - censored ~ x1 + age_s + treatment,
  label = "Example model for censoring"
)
fitted
unlink(fitted@summary$save_path$path)

Run the code above in your browser using DataLab