# Sensitivity analysis for an unstandardized regression coefficient
# with two correlated predictors. G is kept small here so the example
# runs quickly; raise G for a stable Monte Carlo summary.
set.seed(113)
Sigma_X <- matrix(c(1, 0.3, 0.3, 1), nrow = 2)
rho_YX <- c(0.4, 0.3)
cov_YX <- rho_YX
ss_aipe_rc_sensitivity(
true_var_Y = 1, true_cov_YX = cov_YX, true_cov_XX = Sigma_X,
estimated_var_Y = 1, estimated_cov_YX = cov_YX, estimated_cov_XX = Sigma_X,
which_predictor = 1, w = 0.20, conf_level = 0.95,
G = 20, print_iter = FALSE
)
Run the code above in your browser using DataLab