getFormulae.asreml: Gets the formulae from an asreml object.

getFormulae.asremlR Documentation

Gets the formulae from an asreml object.

Description

Gets the formulae nominated in the which argument from the call stored in an asreml object.

Usage

## S3 method for class 'asreml'
getFormulae(asreml.obj, which = c("fixed", "random", "residual"), 
            expanded = FALSE, envir = parent.frame(), ...)

Arguments

asreml.obj

An asreml object resulting from the fitting of a model using REML.

which

A character listing the formula(e) to be extracted from the call stored in asreml.obj. it should be some combination of fixed, random, residual, sparse and all. If all is included then all formula(e) will be returned, those not having been specified in the call being NULL.

expanded

A logical indicating whether terms are to be expanded to the sum of a set of individual terms.

envir

The environment in which the formula(e) are to be evaluated. May also be NULL, a list, a data.frame, a pairlist or an integer as specified to sys.call.

...

Arguments passed on to update.formula and ultimately to terms.formula.

Value

A list containing a component with each of the extracted formula(e), the name of a component being the formula that it contains.

Author(s)

Chris Brien

See Also

printFormulae.asreml

Examples

## Not run: 
   data(Wheat.dat)
   current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, 
                         random = ~ Row + Column + units,
                         residual = ~ ar1(Row):ar1(Column), 
                         data=Wheat.dat)
    getFormulae(current.asr)

## End(Not run)

asremlPlus documentation built on Nov. 5, 2023, 5:07 p.m.