modelFunctions {asreml} | R Documentation |
This class of special functions constructs model terms with specific properties.
con(obj) lin(obj) pow(obj, p=1, offset=0) pol(obj, t=1, init=NA) leg(obj,t=1,init=NA) spl(obj, k=0, init=NA) dev(obj, init=NA) ma(obj) at(obj,lvls) and(obj, times=1) mbf(obj) grp(obj) dsum(model, levels=NULL, outer=FALSE) C(obj, contr)
obj |
An object in the data frame.
|
p |
The exponent in a power function term ( |
offset |
Constant added to |
t |
|
k |
The number of equally spaced knot points for a cubic smoothing
spline. If zero or omitted, |
init |
Optional initial value for the default identity variance model
( |
lvls |
Vector of levels of the conditioning factor
( |
times |
Multiples (may be non-integer) of the design matrix
for |
model |
A formula of the form |
levels |
A list of length the number of terms in the left hand side of
|
outer |
if |
contr |
An integer vector of contrast coefficients parallel to |
asr_con
: Sum to zero constraints.
asr_lin
: Create a variate from obj
.
asr_pow
: Creates the model term
(obj+offset)
^p.
asr_pol
: Orthogonal polynomials.
asr_leg
: Legendre polynomials.
asr_spl
: Cubic smoothing spline, random component.
asr_dev
: Spline deviations; create a factor
from the variate obj
.
asr_ma
: Construct a term with a moving-average
order 1 design matrix from obj
.
asr_at
: Form a conditioning covariable from
obj
for each level of obj
specified in the
lvls
argument.
asr_and
: Multiply the design matrix for
obj
by times
and add it to the preceeding design
matrix.
asr_mbf
: Create a model term from covariates not
stored in data
.
asr_grp
: Create a model term from covariates held
in columns of data
.
asr_dsum
: Direct sum structures for residual
models.
asr_C
: Treatment contrasts
## Not run: ## separable autoregressive residual model at each level of Site residual = ~ dsum(~ ar1(Column):ar1(Row) | Site) ## different residual models at different levels of site ## the ordinals in the levels list refer to the unique values of ## Site in unique(Site) order. residual = ~ dsum(~ ar1(Column):ar1(Row) + id(Column):ar1(Row) | Site, levels = list(c(1,3), c(2,4))) ## equivalent residual = ~ dsum(~ ar1(Column):ar1(Row) | Site, levels=c(1,3)) + dsum(~ id(Column):ar1(Row) | Site, levels=c(2,4)) ## "biological" Date within Plot residual = ~ dsum(~ ar1(Date) | Plot, outer=TRUE) ## "explicit" times residual = ~ dsum(~ exp(Date) | Plot, outer=TRUE) ## End(Not run)