distances.matched.set: Extract the distances of matched control units

View source: R/matched_set_obj.R

distances.matched.setR Documentation

Extract the distances of matched control units

Description

Extract the distances of matched control units

Usage

## S3 method for class 'matched.set'
distances(object)

Arguments

object

a matched.set object

Value

A named list of named vectors. Each element corresponds to a matched set and will be a named vector, where the names of each element will identify a matched control unit and its distance from the treated observation within a particular matched set. These correspond to the "distances" attribute, which are calculated and included when the verbose option is set to TRUE in PanelMatch.

Examples

dem.panel <- PanelData(dem, "wbcode2", "year", "dem", "y")
PM.results <- PanelMatch(panel.data = dem.panel, lag = 4,
                         refinement.method = "mahalanobis",
                         verbose = TRUE,
                         match.missing = TRUE,
                         covs.formula = ~ tradewb,
                         size.match = 5, qoi = "att",
                         lead = 0:4,
                         forbid.treatment.reversal = FALSE)
r1 <- extract(PM.results, qoi = "att")
lt <- distances(r1)

PanelMatch documentation built on April 3, 2025, 6:34 p.m.