Learn R Programming

PanelMatch (version 3.0.0)

prepare_data: prepare_data The calculation of point estimates and standard errors first requires the calculation of a variety of different weights, parameters, and indicator variables. This function prepares the data within PanelEstimate() such that the estimates can be calculated easily. In practical terms, the function calls the lower level helpers to calculate W_its and D_its as described in Imai et al. (2023) and merges those results together with the original data to facilitate calculations.

Description

prepare_data The calculation of point estimates and standard errors first requires the calculation of a variety of different weights, parameters, and indicator variables. This function prepares the data within PanelEstimate() such that the estimates can be calculated easily. In practical terms, the function calls the lower level helpers to calculate W_its and D_its as described in Imai et al. (2023) and merges those results together with the original data to facilitate calculations.

Usage

prepare_data(
  data.in,
  lead,
  sets.att = NULL,
  sets.atc = NULL,
  qoi.in,
  dependent.variable
)

Value

data.frame with the results of the lower level calculations

Arguments

data.in

data.frame: the data to be used in the analysis

lead

See PanelMatch() documentation

sets.att

matched.set object containing ATT or ART matched sets.

sets.atc

matched.set object containing ATC matched sets.

qoi.in

See PanelMatch() documentation

dependent.variable

string specifying the outcome/dependent variable.