| mr_cML_DP | R Documentation |
This is the main function of MRcML method with data perturbation.
mr_cML_DP(
b_exp,
b_out,
se_exp,
se_out,
K_vec = 0:(length(b_exp) - 2),
random_start = 0,
random_start_pert = 0,
maxit = 100,
num_pert = 200,
random_seed = 0,
n
)
b_exp |
Vector of estimated effects for exposure. |
b_out |
Vector or estimated effects for outcome. |
se_exp |
Vector of standard errors for exposure. |
se_out |
Vector of standard errors for outcome. |
K_vec |
Sets of candidate K's, the constraint parameter representing number of invalid IVs. |
random_start |
Number of random start points for cML, default is 0. |
random_start_pert |
Number of random start points for cML with data perturbation, default is 0. |
maxit |
Maximum number of iterations for each optimization. |
num_pert |
Number of perturbation, default is 200. |
random_seed |
Random seed, an integer. Default is 0, which does not set random seed; user could specify a positive integer as random seed to get replicable results. |
n |
Sample size. |
A list contains full results of cML methods. MA_BIC_theta, MA_BIC_se, MA_BIC_p: Estimate of theta, its standard error and p-value from cML-MA-BIC. Similarly for BIC_theta, BIC_se, BIC_p from cML-BIC; for MA_BIC_DP_theta, MA_BIC_DP_se, MA_BIC_DP_p from cML-MA-BIC-DP; for BIC_DP_theta, BIC_DP_se, BIC_DP_p from cML-BIC-DP. BIC_invalid is the set of invalid IVs selected by cML-BIC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.