Estimates the average treatment effect as the difference between the mean outcome of the treated and the mean outcome of the controls. This estimator is unbiased only when the treatment is randomised; under confounding it is typically biased and serves as a baseline for the adjusted estimators (ate_ipw(), ate_dr(), ate_dml()).

ate_naive(data, outcome = "y", treatment = "t")

Arguments

data

A data.frame with the outcome, treatment and covariates.

outcome

Name of the outcome column. Default "y".

treatment

Name of the binary (0/1) treatment column. Default "t".

Value

An object of class "causalmlr_ate" with elements estimate, se (standard error), n and method. Use coef() to extract the point estimate and confint() for a confidence interval.

Examples

data(sodium)
ate_naive(sodium, outcome = "bp", treatment = "sodium")
#> ATE estimate - Naive (difference in means) 
#>   Estimate:  5.18
#>   Std. error: 0.1948 
#>   95% CI:    [4.798, 5.561]
#>   N:         10000