Learn R Programming

SMMAL (version 0.0.5)

compute_parameter: Estimate Nuisance Parameters for Semi-Supervised ATE Estimation

Description

Computes nuisance functions including conditional expectations and propensity scores using cross-fitting, separately for labelled and unlabelled data. These estimates are essential inputs for doubly robust or semi-supervised average treatment effect (ATE) estimators.

Usage

compute_parameter(nfold, Y, A, X, S, W, foldid, R, cf_model, custom_model_fun)

Value

A named list of estimated nuisance parameters (each a numeric vector):

pi1.bs

Estimated propensity score \(P(A = 1 \mid X)\).

pi0.bs

Estimated propensity score \(P(A = 0 \mid X)\) (computed as 1 - pi1.bs).

mu1.bs

Estimated outcome regression \(E[Y \mid A = 1, X]\).

mu0.bs

Estimated outcome regression \(E[Y \mid A = 0, X]\).

cap_pi1.bs

Estimated imputed propensity score \(P(A = 1 \mid W)\).

cap_pi0.bs

Estimated imputed propensity score \(P(A = 0 \mid W)\) (computed as 1 - cap_pi1.bs).

m1.bs

Estimated imputed outcome regression \(E[Y \mid A = 1, W]\).

m0.bs

Estimated imputed outcome regression \(E[Y \mid A = 0, W]\).

Arguments

nfold

Integer. Number of cross-fitting folds.

Y

Numeric vector. Outcome variable. Can contain NAs for unlabelled observations.

A

Numeric vector. Treatment assignment indicator (0 or 1). Can contain NAs.

X

Matrix or data frame. Covariates used for outcome and propensity score models.

S

Matrix or data frame. Additional covariates used only in imputation models.

W

Matrix or data frame. Combined set of covariates (typically cbind(X, S)).

foldid

Integer vector. Fold assignments for cross-fitting.

R

Binary vector. Label indicator: 1 = labelled (observed A and Y), 0 = unlabelled.

cf_model

Function. A user-supplied cross-fitting wrapper function (e.g., based on Super Learner or other learners).

custom_model_fun

A logical or function. If NULL or FALSE, bypasses adaptive-LASSO feature selection. Otherwise, enables two-stage tuning inside compute_parameter().

Details

This function applies cross-fitting to estimate all required nuisance functions for semi-supervised or doubly robust ATE estimators. Separate models are fit for the labelled dataset and the full dataset (for imputation).

See Also

cf