A user-friendly wrapper for any random effect whose covariance is a
user-supplied matrix. Mirrors brms's (1 | gr(species, cov = M)).
Inside a gllvmTMB() formula, this desugars to
propto(0 + group | trait). The actual covariance matrix used by
the engine is whatever is passed to the top-level phylo_vcv =
argument of gllvmTMB(); the optional cov = argument inside the
formula is retained for backward compatibility and as a hint to the
reader, but is not used by the engine. Same convention as
phylo() and phylo_rr().
Arguments
- group
An unquoted column name giving the grouping factor.
- cov
Optional, ignored by the engine. The matrix actually used is whatever is passed to the
phylo_vcvargument ofgllvmTMB().
Examples
if (FALSE) { # \dontrun{
# Recommended:
fit <- gllvmTMB(value ~ 0 + trait + gr(species),
data = df,
trait = "trait",
unit = "species",
cluster = "species",
phylo_vcv = Cphy)
# Also valid (cov = Cphy ignored by engine):
fit <- gllvmTMB(value ~ 0 + trait + gr(species, cov = Cphy),
data = df,
trait = "trait",
unit = "species",
cluster = "species",
phylo_vcv = Cphy)
} # }
