cML_SdTheta: Standard Error of Estimated Theta

View source: R/mr_cML-methods.R

cML_SdThetaR Documentation

Standard Error of Estimated Theta

Description

Internal function of mr_cML. Get the standard error of estimated theta from constrained maximum likelihood.

Usage

cML_SdTheta(b_exp, b_out, se_exp, se_out, theta, b_vec, r_vec)

Arguments

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.

Value

Standard error of theta.

Examples

# 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)

MendelianRandomization documentation built on May 29, 2024, 11:36 a.m.