View source: R/treatment_effect.R
coef.causalEffect | R Documentation |
Extract treatment effect estimate
## S3 method for class 'causalEffect'
coef(object, ...)
object |
An object of class causalEffect |
... |
Not used |
A number corresponding to the estimated treatment effect
# set-up data
set.seed(1234)
data <- Hainmueller$new()
data$gen_data()
# calculate quantities
weight <- calc_weight(data, method = "Logistic", estimand = "ATE")
tx_eff <- estimate_effect(causalWeights = weight)
all.equal(coef(tx_eff), c(estimate = tx_eff@estimate))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.