[R-sig-eco] random factor in glmmPQL

Ben Bolker bbolker at gmail.com
Wed Feb 2 16:07:12 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11-02-02 08:19 AM, Vilisics Ferenc wrote:
> Dear List,
> 
> I use glmmPQL (MASS package).
> 
> I want to give forest sites nested in certain cities and use this as random factor like this: 
> 
> random=list(forest=~1/city)
> 
> I'd be appreciated is anyone could confirm, or either correct me. 
> 
>

  I believe you want random=~1|city/forest

  There is lots of confusion about the random effects syntax in both
nlme and lme4; the bottom line is that the elements to the LEFT of the
bar describes the *variables* that are changing across groups (intercept
only in this case); the elements to the RIGHT describe the grouping.

  Ben Bolker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1JcyAACgkQc5UpGjwzenNELwCfYyDui/0UrmgT71G8yKNmVSqx
G1AAnRU/IDmwo1+UG5aja1wG2NtM3vfc
=Joko
-----END PGP SIGNATURE-----



More information about the R-sig-ecology mailing list