View source: R/estimate_funs.R
estimate_GFUN_roots | R Documentation |
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, theta) = 0
estimate_GFUN_roots(.basis)
.basis |
an object of class |
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')
.
the output of the rootFUN
function
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.