Reads the structure, repeated records, a time axis, missing observations, and
returns the modeling suggestions that structure implies, each with its reason.
The classic trap it guards first: repeated records without a permanent-environment
term load the within-animal covariance onto the additive variance, and the
heritability comes out inflated with no warning from the fit itself.
Usage
suggest_model(data, trait, animal, time = NULL, missing_code = NULL)
Arguments
- data
data.frame
- trait
name of the observation column
- animal
name of the animal id column
- time
optional name of a time column (age, day); with repeated records it
triggers the serial-correlation suggestions
- missing_code
optional missing-value code used in trait
Value
character vector of suggestions (empty when the shape asks for nothing),
invisibly; they are also printed