Description Usage Arguments Details Value
View source: R/regression_functions.R
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
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))
|
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
|
blockvar |
an optional character vector. Name of the block variable if
the randomization inference procedure requires block randomization. The
variable named by |
clustvar |
an optional character vector. Name of the cluster variable if
the randomization inference procedure requires clustered randomization. The
variable named by |
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 |
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
|
qoi |
one of |
estimator |
an optional character string indicating the
estimating method. One of |
unbiased.se |
logical. If |
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
.
An object of class riFit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.