ForestIV: ForestIV Main Function

View source: R/ForestIV.R

ForestIVR Documentation

ForestIV Main Function

Description

This function implements the main ForestIV approach.

Usage

ForestIV(
  data_test,
  data_unlabel,
  control,
  method,
  iterative = TRUE,
  ntree,
  model_unbias,
  family,
  diagnostic,
  select_method
)

Arguments

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

Value

ForestIV estimation results


mochenyang/ForestIV documentation built on Aug. 30, 2023, 2:08 p.m.