riwfe: Randomization Inference on Treatment Effect using Weighted...

Description Usage Arguments Details Value

View source: R/regression_functions.R

Description

Estimates of the treatment effect using Weighted Fixed Effects Regression through the wfe function in the wfe package, then conducts inference using randomization inference by permuting the treatment vector to obtain the sharp null distribution

Usage

1
2
3
4
5
riwfe(data, outcome, treatment, covs, perm = NULL, blockvar = NULL,
  clustvar = NULL, maxiter = 1000, unit.index, time.index, method,
  qoi = "ate", estimator = NULL, unbiased.se = TRUE,
  covs_control = list(method = "Euclidean", tol_quantile = 0.05, tol_function
  = function(x) 0.25 * sd(x), tol_value = NULL))

Arguments

data

a data frame containing the variables in the model

outcome

a character. Name of the outcome variable.

treatment

a character. Name of the treatment variable.

covs

a character vector. Names of the covariates to be used in the model.

perm

a matrix containing permutations of the treatment variable (for rireg or riSynth) or the outcome variable (for riwfe). When perm is supplied the call to genperms will not be made and the arguments blockvar, clustvar and maxiter will be ignored

blockvar

an optional character vector. Name of the block variable if the randomization inference procedure requires block randomization. The variable named by blockvar will be used as input for the genperms function.

clustvar

an optional character vector. Name of the cluster variable if the randomization inference procedure requires clustered randomization. The variable named by clustvar will be used as input for the genperms function.

maxiter

a positive integer. The maximum number of permutations to be included in the permutation matrix for the randomization distribution. Used as input for the genperms function.

unit.index

a character string indicating the name of unit variable used in the models. The index of unit should be factor.

time.index

a character string indicating the name of time variable used in the models. The index of time should be factor.

method

method for weighted fixed effects regression, either unit for unit fixed effects; time for time fixed effects. The default is unit. For two-way weighted fixed effects regression models, set method to the default value unit.

qoi

one of "ate" or "att". The default is "ate". If set to "att" in implementing "fd" and "did" estimators, the comparison of the treated observation is restricted to the control observation from the previous time period but not with the control observation from the next time period.

estimator

an optional character string indicating the estimating method. One of "fd", "did", or "Mdid". "fd" is for First-Difference Design. "did" is for multi-period Difference-in-Differences design. The default is NULL. Setting estimator to be "Mdid" implements the Difference-in-Differences design with Matching on the pretreatment outcome variables.

unbiased.se

logical. If TRUE, bias-asjusted heteroskedasticity-robust standard errors are used. See Stock and Watson (2008). Should be used only for balanced panel. The default is FALSE.

Details

Estimates of the treatment effects are obtained by OLS regression. When covariates are included, the randomization distribution is obtained by permuting the outcome vector. This is equivalent to permuting the treatment vector and all associated covariates. Unlike rireg, the riwfe function does not make use of the partialling-out method because the function wfe from the wfe package that riwfe calls does not allow the treatment variable to be omitted. Internally, riwfe makes call to genperms. The variable whose names are given by blockvar and clustvar will be coerced into input vectors for the block and clus arguments of the genperms function. The arguments unit.index, time.index, method, qoi, estimator, unbiased.se are input directly into the call for wfe.

Value

An object of class riFit


mdtrinh/vietnamdata documentation built on May 3, 2019, 11:49 p.m.