Learn R Programming

ivDiag (version 1.0.6)

eff_F: Effective F

Description

Computes the effective F statistic.

Usage

eff_F(data, Y, D, Z, controls = NULL, FE = NULL, cl = NULL, 
  weights = NULL, prec = 4)

Value

the effective F statistic.

Arguments

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).

References

Olea, José Luis Montiel, and Carolin Pflueger. 2013. "A Robust Test for Weak Instruments."" Journal of Business & Economic Statistics 31 (3): 358–69.

See Also

ivDiag

Examples

Run this code
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)
})

Run the code above in your browser using DataLab