View source: R/estimate_ATE_FIRC.R
estimate_ATE_FIRC | R Documentation |
This method fits the FIRC model to estimate (1) ATE across sites and (2) cross site treatment variation.
estimate_ATE_FIRC(
Yobs,
Z,
B,
siteID = NULL,
control_formula = NULL,
data = NULL,
include_testing = FALSE,
REML = !include_testing,
anova = FALSE,
pool = FALSE,
keep_EB_estimates = TRUE
)
Yobs |
Name of outcome variable (assumed to exist in data) |
Z |
vector of assignment indicators (1==treated) |
B |
Name of the block indicator. |
siteID |
If not null, name of siteID that has randomization blocks |
control_formula |
The control_formula argument must be of the form ~ X1 + X2 + ... + XN. (nothing on left hand side of ~) |
data |
Dataframe with all needed variables. |
include_testing |
Logical Include likelihood ratio test for cross-site treatment variation. |
REML |
Logical, Restricted maximum likelihood or maximum likelihood estimation. Default of TRUE if include_testing = FALSE and FALSE otherwise. Note that FIRC can fail badly in estimating cross-site variation when REML=FALSE. |
anova |
Use the anova() method to do the test for significance between the models. FALSE means do the modified chi-squared test. |
pool |
TRUE means tx and co have same reBual variance. FALSE gives seperate estimates for each (recommended, default). |
keep_EB_estimates |
TRUE means returned object has EB estimates. FALSE means do not keep them. |
Warning: If you want to test for cross-site variation you need REML = FALSE to allow for likelihood ratio testing. If you want to estimate this variation, REML = TRUE is recommended as the ML estimate tends to be wildly biased towards 0 when modest amounts of cross-site variation are present.
Acknowledgement: Unpooled version taken and adapted from Catherine's weiss.tau() method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.