Skip to contents

Matches treated and control units on the basis of their pre-treatment covariate values.

Usage

morie_matching_longitudinal(
  data,
  treatment,
  covariates,
  unit,
  time,
  treatment_time,
  n_pre_periods = 1L,
  method = "nearest_neighbor"
)

Arguments

data

Panel data frame.

treatment

Binary treatment indicator column.

covariates

Character vector of covariates.

unit

Column name identifying units.

time

Column name identifying time.

treatment_time

Column giving the (per-unit) start of treatment; non-finite values indicate never-treated.

n_pre_periods

Number of pre-treatment periods to summarise.

method

One of "nearest_neighbor" or "mahalanobis".

Value

A list of class morie_match_result.

Examples

if (FALSE) { # \dontrun{
morie_matching_longitudinal(panel, "d", c("x1"), unit = "id",
                            time = "t", treatment_time = "t0")
} # }