Skip to contents

Matches on the propensity score, then applies bias-corrected linear regression adjustment within the matched sample. Standard errors come from a non-parametric bootstrap.

Usage

morie_matching_doubly_robust(
  data,
  outcome,
  treatment,
  covariates,
  ps = NULL,
  n_bootstrap = 200L,
  seed = 42L,
  alpha = 0.05
)

Arguments

data

Data frame.

outcome, treatment

Column names.

covariates

Character vector of covariates.

ps

Optional pre-computed propensity scores.

n_bootstrap

Number of bootstrap replications.

seed

Random seed.

alpha

Significance level.

Value

A list of class morie_te_result with estimand "ATT_DR".

Examples

# \donttest{
set.seed(1)
df <- data.frame(y = rnorm(200), d = rbinom(200, 1, 0.4),
                 x1 = rnorm(200), x2 = rnorm(200))
morie_matching_doubly_robust(df, "y", "d", c("x1", "x2"),
                             n_bootstrap = 50)  # 50 keeps the example fast
#> Warning: 1 of 50 bootstrap resamples had fewer control units than treated; not all treated units in those resamples got a match.
#> $estimand
#> [1] "ATT_DR"
#> 
#> $estimate
#> [1] -0.08345709
#> 
#> $std_error
#> [1] 0.1361091
#> 
#> $ci_lower
#> [1] -0.3502261
#> 
#> $ci_upper
#> [1] 0.1833119
#> 
#> $p_value
#> [1] 0.5397685
#> 
#> $n_obs
#> [1] 174
#> 
#> $details
#> $details$n_bootstrap
#> [1] 50
#> 
#> $details$n_successful_boots
#> [1] 50
#> 
#> 
#> attr(,"class")
#> [1] "morie_te_result" "list"           
# }