Re: [R] extracting random effects from model formula

2010-09-23 Thread Darin A. England
I've found using the arm package to be very useful. require(arm) then use ranef(Full_model) and fixef(Full_model) On Wed, Sep 22, 2010 at 05:39:41PM +1000, Lorenzo Cattarino wrote: > Hi again, > > > > Sorry, probably I was not clear enough. > > > > I was wondering if there is a way in R

Re: [R] extracting random effects from model formula

2010-09-22 Thread David Winsemius
: Re: [R] extracting random effects from model formula Am 22.09.2010 09:22, schrieb Lorenzo Cattarino: Hi R-users I would like to extract the random effects ("1|SITE", "1+SPECIES| SITE" and "BA|SITE") from this model formula: > modterm <- attr(terms(F

Re: [R] extracting random effects from model formula

2010-09-22 Thread Lorenzo Cattarino
actually I need to extract the random effect from the formula, not the model any idea? From: Sacha Viquerat [mailto:sacha.v...@googlemail.com] Sent: Wed 22/09/2010 5:55 PM To: Lorenzo Cattarino Subject: Re: [R] extracting random effects from model formula Am

[R] extracting random effects from model formula

2010-09-22 Thread Lorenzo Cattarino
Hi again, Sorry, probably I was not clear enough. I was wondering if there is a way in R to identify (and extract) only the random effects, which, because I am using the lmer function, are the terms with the symbol | on the left side of the grouping variable ("SITE" in my example). Than

[R] extracting random effects from model formula

2010-09-22 Thread Lorenzo Cattarino
Hi R-users I would like to extract the random effects ("1|SITE", "1+SPECIES|SITE" and "BA|SITE") from this model formula: Full_model <- formula (VAR ~ (1|SITE) + (1+SPECIES|SITE) + (BA|SITE) + HEIGHT + COND + NN_DIST) I tried: terms(Full_model) labels(terms(Full_model)) but I c