cML_estimate_random function

Estimate with Regular Likelihood Using Multiple Random Start Points

Estimate with Regular Likelihood Using Multiple Random Start Points

Internal function of mr_cML. Get estimated theta, se of estimated theta and negative log-likelihood, using multiple random starting points.

cML_estimate_random( b_exp, b_out, se_exp, se_out, K, random_start = 0, maxit = 100 )

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.
  • K: Constraint parameter, number of invalid IVs.
  • random_start: Number of random starting points, default is 0.
  • maxit: Maximum number of iteration.

Returns

A list contains: theta is the estimate causal effect, se is standard error of estimated theta, l is negative log-likelihood, r_est is estimated r vector.

Examples

cML_estimate_random(b_exp = ldlc,b_out = chdlodds,se_exp = ldlcse, se_out = chdloddsse, K = 5)
  • Maintainer: Stephen Burgess
  • License: GPL-2 | GPL-3
  • Last published: 2024-04-12

Useful links