ForestIV | R Documentation |
This function implements the main ForestIV approach.
ForestIV(
data_test,
data_unlabel,
control,
method,
iterative = TRUE,
ntree,
model_unbias,
family,
diagnostic,
select_method
)
data_test |
Testing dataframe for random forest, must have a column named "actual" that contains the ground truth, and all trees' predictions. |
data_unlabel |
Unlabel dataframe for random forest, must have all trees' predictions. |
control |
A character vector of control variable names. Pass an empty vector if there are no control variables |
method |
"Lasso" for ForestIV method and "IIV" for EnsembleIV method. |
iterative |
Whether to perform iterative IV selection or not, default to TRUE. Only relevant when method = "Lasso" |
ntree |
Number of trees in the random forest. |
model_unbias |
Unbiased estimation. |
family |
Model specification, same as in the family parameter in glm. |
diagnostic |
Whether to output diagnostic correlations for instrument validity and strength, default to TRUE. |
select_method |
method of IV selection. One of "optimal" (LASSO based), "top3", and "PCA". |
ForestIV estimation results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.