View source: R/mr_cML-methods.R
cML_estimate | R Documentation |
Internal function of mr_cML. Estimate theta, b vector, r vector with constrained maximum likelihood.
cML_estimate(
b_exp,
b_out,
se_exp,
se_out,
K,
initial_theta = 0,
initial_mu = rep(0, length(b_exp)),
maxit = 100
)
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 |
Constraint parameter, number of invalid IVs. |
initial_theta |
Starting point for theta. |
initial_mu |
Starting point for mu. |
maxit |
Maximum number of iteration. |
A list contains: theta is the estimate causal effect, b_vec is the estimated vector of b, r_vec is the estimated vector of r.
cML_estimate(b_exp = ldlc,b_out = chdlodds,se_exp = ldlcse,
se_out = chdloddsse, K = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.