| estimate | R Documentation |
Causal effect estimation via plug-in g-computation.
estimate(
data,
formula,
model = NULL,
treatment = NULL,
estimand = c("ATE", "ATT", "CATE", "IATE"),
newdata = NULL,
treatment_level = NULL,
control_level = NULL,
spec = NULL,
type = NULL,
interval = c("normal", "bootstrap"),
conf_level = 0.95,
n_boot = 200,
seed = NULL,
fit = NULL,
...
)
data |
Data frame. |
formula |
Outcome model formula. The first term on the right-hand side
is treated as the treatment variable unless |
model |
Learner id (ignored if |
treatment |
Optional treatment variable name. |
estimand |
One of |
newdata |
Optional target population for |
treatment_level |
Optional treated level for binary treatment. |
control_level |
Optional control level for binary treatment. |
spec |
Hyperparameter list passed to |
type |
Prediction type override for the outcome model. |
interval |
Interval method: |
conf_level |
Confidence level for uncertainty intervals. |
n_boot |
Number of bootstrap resamples used when |
seed |
Optional seed. |
fit |
Optional preconfigured |
... |
Passed to |
A funcml_estimand object.
causal_data <- mtcars
causal_data$am <- factor(causal_data$am, labels = c("auto", "manual"))
ate <- estimate(
data = causal_data,
formula = mpg ~ am + wt + hp,
model = "glm",
treatment = "am",
estimand = "ATE"
)
ate$estimate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.