conmed_ind: Perform sensitivity analysis for mediation analysis

View source: R/conmed_ind.R

conmed_indR Documentation

Perform sensitivity analysis for mediation analysis

Description

This command calculates the impact of an omitted variable necessary to invalidate/sustain an inference for a mediation effect.

Usage

conmed_ind(
  est_eff_a,
  std_err_a,
  est_eff_b,
  std_err_b,
  n_obs,
  n_covariates_a = 0,
  n_covariates_b = 1,
  alpha = 0.05,
  tails = 2,
  nu = 0
)

Arguments

est_eff_a

the estimated effect for path a (from treatment to mediator)

std_err_a

the standard error of the estimate of path a (from treatment to mediator)

est_eff_b

the estimated effect for path b (from mediator to outcome)

std_err_b

the standard error of the estimate of path b (from mediator to outcome)

n_obs

the number of observations in the sample

n_covariates_a

the number of covariates in the regression model for estimating path a (from treatment to mediator)

n_covariates_b

the number of covariates in the regression model for estimating path b (from mediator to outcome)

alpha

probability of rejecting the null hypothesis (defaults to 0.05)

tails

integer whether hypothesis testing is one-tailed (1) or two-tailed (2; defaults to 2)

Value

prints the ITCV to invalidate/sustain the inference & show the impact curve

Examples

conmed_ind(est_eff_a = 0.181, std_err_a = 0.087, est_eff_b = 0.432, std_err_b = 0.074, nobs = 123)

linqinyu/ConMed documentation built on March 20, 2023, 5:40 a.m.