Learn R Programming

geex (version 1.1.1)

nobs,geex-method: Extract the number observations

Description

Extract the number observations

Usage

# S4 method for geex
nobs(object)

# S4 method for geex_summary nobs(object)

Arguments

object

a geex object

Examples

Run this code
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