Learn R Programming

PanelMatch (version 3.0.0)

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

Description

Extract the weights of matched control units

Usage

# S3 method for matched.set
weights(object)

Value

list of named vectors. Each list element corresponds to a particular treated observation and contains the matched control units, along with their weights. These correspond to the "weights" attribute, which are calculated in the PanelMatch refinement process.

Arguments

object

matched.set object, extracted using the get.PanelMatch() method

Examples

Run this code
dem.panel <- PanelData(dem, "wbcode2", "year", "dem", "y")
PM.results <- PanelMatch(panel.data = dem.panel, lag = 4,
                        refinement.method = "ps.match",
                        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 <- weights(r1)

Run the code above in your browser using DataLab