Skip to contents

Specifies the functional form and estimation engine for a treatment previously specified by set_treatment().

Usage

treat_model(object, formula, engine, separate = TRUE, include_past = TRUE, ...)

Arguments

object

A cde_estimator object that contains output from a previous call to set_treatment().

formula

A formula specifying the design matrix of the covariates. Passed to fitting engine or used with stats::model.frame() and stats::model.matrix() to create the design matrix for fitting engines that do not take formulas.

engine

String indicating the name of the fitting engine.

separate

Logical indicating whether the fitting algorithm should be applied separately to each history of the treatment variables up to this point (default) or not.

include_past

A logical value where TRUE indicates that formulas passed to previous treat_model calls should be appended to the formula given.

...

Other arguments to be passed to the engine algorithms.

Author

Matthew Blackwell