fn.RF_tune_nodesize: Select min.node.size for propensity RF via weight-stability...

View source: R/other-functions.R

fn.RF_tune_nodesizeR Documentation

Select min.node.size for propensity RF via weight-stability criteria

Description

Evaluates each candidate in c(10, 25, 50, 100) using 5-fold cross-fitted propensity scores (same fold assignments across candidates) and selects the smallest value that satisfies all three weight-stability criteria. The out-of-fold predictions for the selected candidate are returned directly as the final propensity scores. If no candidate passes, uses 100 and issues a warning.

Usage

fn.RF_tune_nodesize(data, matX2, fold_ids)

Arguments

data

Structured data list

matX2

SVD-preprocessed covariate matrix (N x p)

fold_ids

Integer vector of fold assignments (length N)

Value

Named list with:

  • nodesize - Selected min.node.size (integer)

  • e_sz - Out-of-fold propensity array, dim (N, K, J)

  • crossfit_accuracy - Proportion of subjects correctly classified by argmax of OOF predictions


WMAP documentation built on Oct. 6, 2026, 1:07 a.m.