powered by
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 )
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.
Vector of estimated effects for exposure.
Vector or estimated effects for outcome.
Vector of standard errors for exposure.
Vector of standard errors for outcome.
Constraint parameter, number of invalid IVs.
Starting point for theta.
Starting point for mu.
Maximum number of iteration.
cML_estimate(b_exp = ldlc,b_out = chdlodds,se_exp = ldlcse, se_out = chdloddsse, K = 5)
Run the code above in your browser using DataLab