Skip to contents

animal() marks planned pedigree or additive-relatedness animal-model syntax. It is the biological front door for questions such as whether among-individual additive genetic variance appears in the location mu, residual scale sigma, shape or skewness, inflation, or a bivariate covariance. The first fitted route will be Gaussian mu, for example animal(1 | id, pedigree = pedigree) or the same model with a precomputed additive relationship matrix.

Usage

animal(term, pedigree = NULL, A = NULL, Ainv = NULL)

Arguments

term

Structured random-effect term, such as 1 | id.

pedigree

Planned pedigree input from which an additive relationship matrix or sparse inverse will be built.

A

Planned additive relatedness or covariance matrix.

Ainv

Planned sparse or dense inverse additive relatedness matrix.

Value

A formula marker; never evaluated by users.

Details

This marker is parsed and documented so examples, design notes, and error messages can use the final reader-facing grammar now. It does not fit a model yet; current fits should use implemented ordinary random effects, phylo(), or spatial() where those paths match the scientific question.

Examples

# Planned: additive genetic variance in body size from a wild pedigree.
bf(body_size ~ age + sex + animal(1 | id, pedigree = pedigree),
  sigma ~ habitat
)
#> <drm_formula>
#> body_size ~ age + sex + animal(1 | id, pedigree = pedigree)
#> sigma ~ habitat

# Planned later: distributional animal model for residual predictability.
bf(activity ~ treatment + animal(1 | id, Ainv = Ainv),
  sigma ~ treatment
)
#> <drm_formula>
#> activity ~ treatment + animal(1 | id, Ainv = Ainv)
#> sigma ~ treatment