[R] GLMM

Douglas Bates bates at stat.wisc.edu
Fri Aug 27 00:14:01 CEST 2004


Bossarte, Robert wrote:
> I am trying to use the LME package to run a multilevel logistic model
> using the following code:
> 
>  
> 
> ------------------------------------------------------------------------
> -------------------------------------------
> 
>  
> 
> Model1 = GLMM(WEAP ~ TSRAT2 , random = ~1 | GROUP , family = binomial,
> na.action = na.omit )
> 
>  
> 
> ------------------------------------------------------------------------
> -------------------------------------------
> 
>  
> 
> Where WEAP is a dichotomous outcome measure, TSRAT2 is a group level
> covariate, and GROUP is the grouping variable.
> 
>  
> 
> I do not have significant missing data and the dataset is over 15000
> cases.
> 
>  
> 
> I have tried changing the outcome measure(s) and predictor(s) with the
> same result. Each time R fails and returns the following message:
> 
>  
> 
> ------------------------------------------------------------------------
> ------------------------------------------------
> 
>  
> 
> structure(list( : flist must be a non-empty list of factors
> 
>  
> 
> ------------------------------------------------------------------------
> ------------------------------------------------
> 
>  
> 
> This appears to be problem with the grouping variable, yet there are no
> missing values and the data were sorted on this variable prior to being
> read into R.

Is the grouping variable a factor?  Check with

str(GROUP)

If it isn't a factor then convert it a factor using

GROUP <- factor(GROUP)

> 
>  
> 
> Any suggestions would be greatly appreciated.




More information about the R-help mailing list