prep_cf_mat: Creates matrix of binary cross-fitting fold indicators (n x #...

View source: R/utils_effects.R

prep_cf_matR Documentation

Creates matrix of binary cross-fitting fold indicators (n x # cross-folds)

Description

Creates matrix of binary cross-fitting fold indicators (n x # cross-folds)

Usage

prep_cf_mat(n, cf, w_mat = NULL, cl = NULL)

Arguments

n

Number of observations.

cf

Number of cross-fitting folds.

w_mat

Optional logical matrix of treatment indicators (n x T+1). For example created by prep_w_mat. If specified, cross-fitting folds will preserve the treatment rations from full sample.

cl

Optional vector of cluster variable if cross-fitting should account for clusters.

Value

Logical matrix of cross-fitting folds (n x # folds).


MCKnaus/causalDML documentation built on Aug. 19, 2023, 5:47 p.m.