Running examples in 'mmm2-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mmm2
> ### Title: Function to fit multivariate marginal models with shared
> ###   regression parameters
> ### Aliases: mmm2
> ### Keywords: generalized estimationg equations multivariate marginal
> ###   models
> 
> ### ** Examples
> 
> ## binary data application
> data(Kenya_morbidity)
> fit1 <- mmm2(cbind(poor_appetite, headache) ~ visit_num + age_at_onset + boy + 
+              as.factor(treatment), id = ~ ID, data = Kenya_morbidity, interaction = 1 : 6, 
+              family = binomial(link = logit), corstr = "unstructured")
Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27
running glm to get initial regression estimate
     (Intercept)         visitnum       ageatonset              boy 
      0.26974273      -0.14793973      -0.18489897      -0.10823588 
      treatment1       treatment2       treatment3            rtype 
     -0.10307332      -0.19466170      -0.26489300      -0.12709492 
  visitnum:rtype ageatonset:rtype        boy:rtype treatment1:rtype 
      0.05996963       0.07435218      -0.00828866      -0.09473492 
treatment2:rtype treatment3:rtype 
      0.17982662      -0.13402811 
> summary(fit1)$coef
                    Estimate  Naive S.E.     Naive z Robust S.E.   Robust z
(Intercept)       0.06021717 0.404358355   0.1489203  0.48974042  0.1229573
visitnum         -0.14083516 0.013052760 -10.7896840  0.01541761 -9.1346965
ageatonset       -0.16130361 0.053535215  -3.0130376  0.06709058 -2.4042661
boy              -0.20889380 0.111429243  -1.8746767  0.13051353 -1.6005529
treatment1       -0.12908866 0.153495441  -0.8409934  0.17704572 -0.7291261
treatment2       -0.20070230 0.158283798  -1.2679902  0.18113539 -1.1080237
treatment3       -0.22976119 0.152857850  -1.5031036  0.17942429 -1.2805467
rtype             0.26198418 0.304589030   0.8601235  0.45809526  0.5718989
visitnum:rtype    0.05203895 0.009116759   5.7080533  0.01673728  3.1091644
ageatonset:rtype  0.02201024 0.040168114   0.5479531  0.06189644  0.3555979
boy:rtype         0.11957853 0.084046664   1.4227635  0.11981425  0.9980326
treatment1:rtype -0.04730872 0.116136346  -0.4073550  0.16245190 -0.2912168
treatment2:rtype  0.19834628 0.117922838   1.6820005  0.16981538  1.1680112
treatment3:rtype -0.19710071 0.116789521  -1.6876575  0.16058204 -1.2274145
> 
> ## count data application
> data(mlcd)
> fit2<-mmm2(formula=cbind(mlcd$resp1,mlcd$resp2)~mlcd$X+mlcd$time+
+ mlcd$X.time,id=mlcd$ID,rtype=TRUE,interaction=1:3,family=poisson,corstr="unstructured")
Error in model.frame.default(formula = formula, data = data) : 
  'data' must be a data.frame, environment, or list
Calls: mmm2 -> model.frame -> model.frame.default
Execution halted