Learn R Programming

causal.decomp (version 0.2.0)

ind.sens: Sensitivity Analysis for Causal Decomposition with Individualized Interventions

Description

‘ind.sens’ is used to assess the sensitivity of estimates from the individualized causal decomposition to potential omitted confoudners between the risk factor M and the outcome Y, using a benchmarking approach based on the relative strength of an unmeasured confounder compared to a specified covariate. The function employs a stochastic EM algorithm to simulate the distribution of the unobserved confounder and generate bias-adjusted estimates.

Usage

ind.sens(k.y, k.m, Iternum, outcome, group, group.ref, intermediates, moderators,
  benchmark, risk.factor, covariates, data, B, cluster = NULL, nsim, mc.cores)

Value

A matrix containing the adjusted point estimates for:

  1. the initial disparity, the proportion recommended for treatment,

  2. the disparity remaining and percent reduction based on individualized conditional effects,

  3. the disparity remaining, disparity reduction, and percent reduction based on individualized intervention effects.

It also returns the adjusted nonparametric bootstrap confidence intervals for each estimate.

Arguments

k.y

scales the association of the unmeasured confounder with the outcome (numeric). A value of 1 means a one-unit change in the unmeasured confounder shifts the mean of the outcome by the same amount as a one-unit change in the benchmark covariate—conditional on the social-group indicator, intermediate confounder(s), and baseline covariate(s). Default is 1.

k.m

scales the association of the unmeasured confounder with the log-odds of risk.factor = 1 (numeric). A value of 1 means a one-unit change in the unmeasured confounder changes the log-odds of the risk factor by the same amount as the benchmark covariate, conditional on the social-group indicator, intermediate confounder(s), and baseline covariate(s). Default is 1.

Iternum

Number of iterations in the stochastic EM algorithm for generating the unmeasured confounder. default is 10.

outcome

a character string indicating the name of the outcome.

group

a character string indicating the name of the social group indicator such as race or gender.

group.ref

reference group of the social group indicator.

intermediates

vector containing the name of intermediate confounders.

moderators

a character string indicating the name of variables that have heterogeneous effects on the outcome based on the risk factor.

benchmark

a vector containing the name of the benchmark covariate used to scale k.y and k.m.

risk.factor

a character string indicating the name of the risk factor.

covariates

a vector containing the name of baseline covariate variable(s).

data

The data set for analysis (data.frame).

B

Number of bootstrapped samples in the causal decomposition analysis.

cluster

a vector of cluster indicators for the bootstrap. If provided, the cluster bootstrap is used. Default is 'NULL'.

nsim

Number of random draws of the unmeasured confounder per observation. default is 15. Increase the number for more smooth curves.

mc.cores

Number of cores to use. Must be exactly 1 on Windows. Default is 1.

Author

Soojin Park, University of California, Riverside, soojinp@ucr.edu; Suyeon Kang, University of Central Florida, suyeon.kang@ucf.edu; Karen Xu, University of California, Riverside, karenxu@ucr.edu.

Details

This function returns the adjusted point estimates and confidence intervals after accounting for a simulated unmeasured confounder \(U\). We employ an approach that compares the coefficient of the unmeasured confounder \(U\) with that of an observed covariate \(X_j\), after controlling for the remaining observed covariates (\(R\), \(X_{-j}\), and \(C\)).

Specifically, \(k_y\) indicates the extent to which the outcome \(Y\) is associated with a one unit increase in \(U\) relative to how much it is associated with a one unit change in \(X_j\), after controlling for \(R\), \(X_{-j}\), and \(C\). Likewise, \(k_m\) indicates the extent to which the odds of \(M = 1\) are explained by unmeasured confounder \(U\) relative to how much they are explained by \(X_j\), after controlling for \(R\), \(X_{-j}\), and \(C\). These parameters (\(k_m\) and \(k_y\)) should be specified by researchers based on the assumed strength of \(U\) relative to that of the given observed covariate \(X_j\).

References

Park, S., Kang, S., & Lee, C. (2025). Simulation-Based Sensitivity Analysis in Optimal Treatment Regimes and Causal Decomposition with Individualized Interventions. arXiv preprint arXiv:2506.19010.

See Also

ind.decomp

Examples

Run this code
data(idata)

results_adj <- ind.sens(k.y = 1, k.m = 1, Iternum = 5, outcome = "Y", group = "R", group.ref = "0",
                       intermediates = c("X1", "X2", "X3"), moderators = c("X1", "X2"),
                       benchmark = "X1", risk.factor = "M", covariates = "C", data = idata,
                       B = 50, cluster = NULL, nsim = 10, mc.cores = 1)
results_adj

Run the code above in your browser using DataLab