[R] parse error in GLMM function

Douglas Bates bates at stat.wisc.edu
Tue Feb 17 23:56:29 CET 2004


"CENDOYA, Gabriela" <gcendoya at balcarce.inta.gov.ar> writes:

>  I'm trying to use the function GLMM from lme4 package, (R-1.8.1, Windows
> 98),and I get the following error:
> > pd5 = GLMM(nplant~sitio+
> +                   fert+
> +                   remo+
> +                   sitio:fert+
> +                   remo:sitio+
> +                   remo:fert+
> +                   remo:fert:sitio
> +             data=datos,
> +             family=binomial,
> +             random=~repe:sitio)
> Error in parse(file, n, text, prompt) : parse error

Could you tell us the version of the lme4 package please?

> From GLMM and parse's help pages, I couldn't figure out what I was
> doing wrong.  Also in GLMM's help page say that data is an
> "optional" data frame used as the first place to find variables in
> the formulae, but if I omit data=datos (previously I have done
> attach(datos)), the error changes to:
> 
> > pd5 = GLMM(nplant~sitio+
> +                    fert+
> +                    remo+
> +                    sitio:fert+
> +                    remo:sitio+
> +                    remo:fert+
> +                    remo:fert:sitio,
> +                    family=binomial,
> +                    random=~repe:sitio)
> Error in model.frame.default(formula = formula, data = data,
> drop.unused.levels = TRUE) :
>         Argument "data" is missing, with no default

> This is not what I was expecting for "an optional data frame",

Well if you are going to be picky about it! :-)

I guess the optional data frame is not quite as optional as we had
intended.  Time to add another check.  Thanks for pointing this out.




More information about the R-help mailing list