estimate: Fit a specified CDE estimator

View source: R/estimate.R

estimateR Documentation

Fit a specified CDE estimator

Description

Fit a CDE estimator with the engines specified in the model_spec object.

Usage

estimate(
  object,
  formula,
  data,
  subset,
  crossfit = TRUE,
  n_folds,
  n_splits = 1L
)

Arguments

object

A cde_estimator object that has already been passed to at least one call to set_treatment.

formula

A formula object with describing the outcome of interest on the left-hand side and the treatment variables the user wants to estimate effects for (which might be a subset of the treatment variables specified).

data

A data.frame containing all variables, including treatment variables and covariates specified.

subset

Anan optional vector specifying a subset of observations to be used in the fitting process.

crossfit

A logical indicator for if cross-fitting should be used in estimating the effects.

n_folds

The number of folds to use within a given instance of the cross-fitting algorithm.

n_splits

The number of times the cross-fitting procedure should be repeated. Overall estimates use the median value of these repeated estimates.


mattblackwell/DirectEffects documentation built on Dec. 16, 2024, 6:14 p.m.