fn.RF_crossfit_once: Run one complete 5-fold cross-fit for propensity score...

View source: R/other-functions.R

fn.RF_crossfit_onceR Documentation

Run one complete 5-fold cross-fit for propensity score estimation

Description

For each fold, fits a joint (S,Z) ranger probability forest on the training folds and predicts on the held-out fold. Returns out-of-fold joint propensity scores.

Usage

fn.RF_crossfit_once(data, matX2, min.node.size, fold_ids)

Arguments

data

Structured data list

matX2

SVD-preprocessed covariate matrix (N x p)

min.node.size

Minimum node size for the ranger forest

fold_ids

Integer vector of fold assignments (length N)

Value

Array of dim (N, K, J): out-of-fold P(S=s, Z=z | X_i). Columns of the intermediate matrix are ordered by factor level: (s=1,z=1), (s=1,z=2), ..., (s=J,z=K), matching column index (s-1)*K + z.


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