Skip to contents

The default path fits a univariate Gaussian animal model by REML: y ~ sex + age + animal(1 | id, pedigree = ped). Fitting needs a local Julia and HSquared.jl. Preview the same call with control = hs_control(engine = "validate").

Usage

hsquared(
  formula,
  data,
  family = stats::gaussian(),
  REML = TRUE,
  control = hs_control(),
  ...
)

Arguments

formula

A model formula. The default path is y ~ fixed + animal(1 | id, pedigree = ped). animal(1 | id) is also accepted when data is an hs_data() object with a pedigree.

data

A data frame of model variables, or an hs_data() object whose phenotypes component holds them. Formula arguments such as pedigree = pedigree can name components of the bundle.

family

A response family. The default path accepts gaussian(). Opt-in experimental paths accept poisson() and binomial(); the bounded genetic GLLVM route accepts three complete Poisson traits. See formula_status().

REML

Logical; REML estimation. The default path supports REML only (TRUE). REML = FALSE (ML) is rejected.

control

An object created by hs_control().

...

Reserved for future arguments.

Value

A "hsquared_fit" object from a successful default-path fit. Missing Julia produces an install-guidance error. When engine = "validate", the validated model spec is returned invisibly as a named list (not the classed object from model_spec()).

Details

What you may report is listed on Can I fit and report this? – not in validation_status(). Other routes live in formula_status() and on that limits page.