Learn R Programming

OutcomeWeights (version 0.1.1)

prep_cf_mat: 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)

Value

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

Arguments

n

Number of observations.

cf

Number of cross-fitting folds.

w_mat

Optional logical matrix of treatment indicators (N x T+1). If specified, cross-fitting folds will preserve the treatment ratios from full sample.

cl

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