View source: R/diagnose_funs.R
diagnose_roots | R Documentation |
Computes the value of
G_m = sum_i psi(O_i, \hat{\theta})
, i.e., the estimating
equations at theta
. Used to verify that G_m = 0
(or close to 0).
diagnose_roots(GFUN, theta)
GFUN |
a function of theta |
theta |
parameter estimates to use in evaluating the estimating equations. |
a numeric vector
myee <- function(data){
function(theta){
c(data$Y1 - theta[1],
(data$Y1 - theta[1])^2 - theta[2])
}
}
mest <- m_estimate(
estFUN = myee,
data = geexex,
root_control = setup_root_control(start = c(1, 1)))
f <- grab_GFUN(mest@basis)
# Should be close to zero
diagnose_roots(GFUN = f, theta = roots(mest))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.