eff_F | R Documentation |
Computes the effective F statistic.
eff_F(data, Y, D, Z, controls = NULL, FE = NULL, cl = NULL,
weights = NULL, prec = 4)
data |
name of a dataframe. |
Y |
a string indicating the outcome variable. |
D |
a string indicating the treatment variable. |
Z |
a vector of strings indicating the instrumental variables. |
controls |
a vector of strings indicating the control variables. |
FE |
a vector of strings indicating the fixed effects variables. |
cl |
a string indicating the clustering variable. |
weights |
a string indicating the variable that stores weights. |
prec |
precision of results (4 by default). |
the effective F statistic.
Olea, José Luis Montiel, and Carolin Pflueger. 2013. "A Robust Test for Weak Instruments."" Journal of Business & Economic Statistics 31 (3): 358–69.
ivDiag
effF <- eff_F(data = rueda, Y = "e_vote_buying", D = "lm_pob_mesa",
Z = "lz_pob_mesa_f", controls = c("lpopulation", "lpotencial"),
cl = "muni_code")
library(testthat)
test_that("Check effective F", {
expect_equal(floor(as.numeric(effF)), 8598)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.