# Sensitivity analysis for a standardized regression coefficient
# with two correlated predictors. A production run uses many more
# generations (G = 1000 is typical); G is reduced here so the
# example runs quickly.
set.seed(113)
Sigma_X <- matrix(c(1, 0.3, 0.3, 1), nrow = 2)
cov_YX <- c(0.4, 0.3)
ss_aipe_src_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 = 50, print_iter = FALSE
)
Run the code above in your browser using DataLab