May I please know an R package and code to run fixed effect instrumental variable (IV) regression with available diagnostic tests (e.g., weak instrument test, exogeneity test (using Wu-Hausman), Sargan test)?
I know plm code provides the fixed effect IV regressions but its diagnostic tests are not available unfortunately.
Even if I run the iv_robust code from estimatr package and specify as diagnostics = TRUE, it produces a warning message saying
"In iv_robust(.. : Will not return diagnostics if fixed_effects are used."
So no diagnostics can be run in fixed effect using iv_robust code either.
I also have both x and x^2 endogenous variables. I wonder what is the best way to run the fixed effect IV regression and how to do the diagnostic tests for these as well.