estimate_GFUN_roots {geex}R Documentation

Estimate roots for a set of estimating equations

Description

Using the rootFUN specified by the user (defaults to multiroot), this function estimates the roots of the equations:

G_m = sum_i psi(O_i, \hat{\theta}) = 0

Usage

estimate_GFUN_roots(.basis)

Arguments

.basis

an object of class m_estimation_basis

Details

This is primilary an internal function used within m_estimate, but it is exported for use in debugging and development.

For an example of how to use a different rootFUN, see the root solver vignette, vignette('geex_root_solvers', package = 'geex').

Value

the output of the rootFUN function

Examples


myee <- function(data){
  function(theta){
    c(data$Y1 - theta[1],
     (data$Y1 - theta[1])^2 - theta[2])
   }
 }

# Start with a basic basis
mybasis <- create_basis(
  estFUN = myee,
  data   = geexex)

# Add a control for the root solver
mycontrol <- new('geex_control', .root = setup_root_control(start = c(1, 1)))
mybasis@.control <- mycontrol

# Now estimate roots of GFUN
roots <- estimate_GFUN_roots(mybasis)
roots


[Package geex version 1.1.1 Index]