Parses an ASReml-style fixed / random / residual specification into
a fb_terms object, flexyBayes's backend-agnostic intermediate
representation (IR) of a model. The IR is what every engine emits
from, so building it explicitly lets a power user inspect the parsed
model, cache it, or hand it to a fitting verb. Most users never call
this directly: flexybayes() and fb() build the IR internally from
the same arguments. Argument names and defaults mirror flexybayes()
one-for-one, so this is a drop-in for that function's parsing step.
Usage
fb_from_asreml(
fixed,
random = NULL,
residual = NULL,
data,
family = "gaussian",
link = NULL,
weights = NULL,
known_matrices = list(),
prior = NULL,
prior_fixed_sd = 100,
prior_vc_sd = 1,
rcov
)Arguments
- fixed
Two-sided formula:
response ~ fixed_effects.- random
One-sided formula
~ random_terms(ASReml syntax), orNULL.- residual
One-sided formula
~ residual_structure, orNULL.NULLdefaults to iid residuals (list(list(type = "units"))), matchingflexybayes().- data
A data.frame containing every variable referenced.
- family
Character family name (
gaussian,binomial,binary,poisson,negative_binomial,negbinom,gamma,beta, and, for brms only,hurdle_gammaandlognormal), or a family object, which goes through the same family gate and supplies its own link.- link
Character link override, or
NULLfor the family default.- weights
Optional numeric vector of length
nrow(data). When non-NULL, mapped to a single addition term withtype = "weights".- known_matrices
Named list of known matrices (e.g.
list(Gmat = G)). Names are recorded indata_summary$known_matrices.- prior
An
fb_prior()object, orNULL.NULLfalls back to the scalar priorsprior_fixed_sd/prior_vc_sd.- prior_fixed_sd
Numeric SD for fixed-effect normal priors when
priorisNULL.- prior_vc_sd
Numeric hyperparameter for the variance-component priors when
priorisNULL.- rcov
Defunct in flexyBayes 0.9.0. The ASReml 3 name for the residual-structure argument, renamed to
residualin ASReml 4. supplying it now raises an error. Useresidualinstead.
Deprecated
fb_from_asreml() is deprecated as of 0.13.0. Use fb_plan() to inspect
the backend-neutral model plan without fitting it.
See also
flexybayes() and fb() for the universal fitting entry.
fb_from_brms() for the other ingest dialect.
Other flexyBayes ingest adapters:
fb_from_brms()