rireg: Randomization Inference on Treatment Effect using Linear...

Description Usage Arguments Details Value

View source: R/regression_functions.R

Description

Estimates of the treatment effect using linear models through lm, then conducts inference using randomization inference by permuting the treatment vector to obtain the sharp null distribution

Usage

1
2
3
4
rireg(data, outcome, treatment, covs, perm = NULL, blockvar = NULL,
  clustvar = NULL, maxiter = 10000, 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.

Details

Estimates of the treatment effects are obtained by OLS regression. When covariates are included, the randomization distribution is obtained by permuting the "partialled-out" treatment vector i.e. the vector of residuals from a regression of treatment on covariates. Internally rireg 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.

Value

An object of class riFit


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