GE_nleqslv_old: GE_nleqslv_old.R #' Uses package nleqslv to get a numerical...

View source: R/GE_nleqslv_old.R

GE_nleqslv_oldR Documentation

GE_nleqslv_old.R #' Uses package nleqslv to get a numerical solution to the score equations, which we can use to check our direct solution from GE_bias_old().

Description

GE_nleqslv_old.R #' Uses package nleqslv to get a numerical solution to the score equations, which we can use to check our direct solution from GE_bias_old().

Usage

GE_nleqslv_old(beta_list, cov_list, cov_mat_list, mu_list, HOM_list)

Arguments

beta_list

A list of the effect sizes in the true model. Use the order beta_0, beta_G, beta_E, beta_I, beta_Z, beta_M. If Z or M is a vector, then beta_Z and beta_M should be vectors. If Z and/or M/W do not exist in your model, then set beta_Z and/or beta_M = 0.

cov_list

A list of expectations (which happen to be covariances if all covariates are centered at 0) in the order specified by GE_enumerate_inputs_old(). If Z and/or M/W do not exist in your model, then treat them as constants 0. For example, set cov(EZ) = 0 and cov(ZW) = 0.

cov_mat_list

A list of matrices of expectations as specified by GE_enumerate_inputs_old().

mu_list

A list of means as specified by GE_enumerate_inputs_old().

HOM_list

A list of higher order moments as specified by GE_enumerate_inputs_old().

Value

A list of the fitted coefficients alpha

Examples

solutions <- GE_bias_normal_squaredmis_old( beta_list=as.list(runif(n=6, min=0, max=1)), 
						rho_list=as.list(rep(0.3,6)), prob_G=0.3)
GE_nleqslv_old(beta_list=solutions$beta_list, solutions$cov_list, solutions$cov_mat_list, 
					solutions$mu_list, solutions$HOM_list)

ryanrsun/GEint documentation built on May 20, 2022, 3:07 a.m.