Standard Error of Estimated Theta
Internal function of mr_cML. Get the standard error of estimated theta from constrained maximum likelihood.
cML_SdTheta(b_exp, b_out, se_exp, se_out, theta, b_vec, r_vec)
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.theta
: Estimated theta from cML.b_vec
: Estimated vector of b from cML.r_vec
: Estimated vector of r from cML.Standard error of theta.
# First get estimates: MLE_result = cML_estimate(b_exp = ldlc,b_out = chdlodds,se_exp = ldlcse, se_out = chdloddsse, K = 5) # Calculate standard error: cML_SdTheta(b_exp = ldlc,b_out = chdlodds,se_exp = ldlcse, se_out = chdloddsse, theta = MLE_result$theta, b_vec = MLE_result$b_vec, r_vec = MLE_result$r_vec)
Useful links