Learn R Programming

PanelMatch (version 3.0.0)

extract.PanelMatch: Extract matched.set objects from PanelMatch results

Description

Extract matched.set objects from PanelMatch results

Usage

# S3 method for PanelMatch
extract(pm.object, qoi = NULL)

Value

a matched.set object

Arguments

pm.object

PanelMatch obect

qoi

character, specifying the qoi. Valid inputs include "att", "atc", "art", and NULL. If NULL, function extracts att, art, or atc results if possible. Otherwise, throws an error if ate is specified.

Examples

Run this code
dem.sub <- dem[dem[, "wbcode2"] <= 100, ]
dem.sub.panel <- PanelData(dem.sub, "wbcode2", "year", "dem", "y")
# create subset of data for simplicity
PM.results <- PanelMatch(panel.data = dem.sub.panel,
                         lag = 4, 
                         refinement.method = "mahalanobis",
                         match.missing = TRUE,
                         covs.formula = ~ I(lag(tradewb, 1:4)) + I(lag(y, 1:4)),
                         size.match = 5, qoi = "att",
                         lead = 0:4, forbid.treatment.reversal = FALSE)
extract(PM.results, qoi = "att")
extract(PM.results) # valid since att is specified

Run the code above in your browser using DataLab