[R-sig-ME] adding objects into "glmerMod" fits

Ben Bolker bbolker at gmail.com
Wed Oct 4 00:41:04 CEST 2017


  Unfortunately for you, S4 classes are much fussier than S3 classes
about their composition.  Your only choices, I think, are

(1) modify the definition of a glmerMod (by copying the entire code of
the package, or forking it on Github)
(2) construct a class that extends the glmerMod  (i.e with
setClass("myGlmerMod", contains="glmerMod"))

e.g.

 setClass("myGlmerMod",contains="glmerMod",representation(new="data.frame"))

seems to work - at least it doesn't complain.

(3) add the additional information as one or more attributes

On Tue, Oct 3, 2017 at 5:39 PM, Vito Michele Rosario Muggeo
<vito.muggeo at unipa.it> wrote:
> dear all,
> for some reasons I would like to add some new components (vectors, matrices)
> to a "glmerMod" fit. I am not familiar with S4, so borrowing from S3 classes
> my first tentative was
>
> o <- glmer(y ~ ..)
> o at new<-1:3
>
> But it clearly does not work. Is there any solution?
> thanks in advance for your time,
> best,
> vito
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list