library(geepack)
data('ohio')
glmfit <- glm(resp ~ age, data = ohio,
family = binomial(link = "logit"))
example_ee <- function(data, model){
f <- grab_psiFUN(model, data)
function(theta){
f(theta)
}
}
z <- m_estimate(
estFUN = example_ee,
data = ohio,
compute_roots = FALSE,
units = 'id',
roots = coef(glmfit),
outer_args = list(model = glmfit))
nobs(z)
Run the code above in your browser using DataLab