| asr_dsum {asreml} | R Documentation |
Model term constructor functions
Description
This class of special functions constructs model terms with specific
properties to be used with asreml syntax.
Usage
dsum(model, levels = NULL, outer = FALSE)
C(obj, contr)
con(obj)obj
lin(obj)
pow(obj, p = 1, offset = 0)
pol(obj, t = 1, init = NA)
leg(obj,t = 1, init = NA)
spl(obj, k = 50, init = NA)
dev(obj, init = NA)
ma(obj)
at(obj, lvls)
and(obj, times = 1)
mbf(obj)
grp(obj)
Arguments
model |
A formula of the form |
levels |
A list of the length of the number of terms in the left-hand side of
|
obj |
An object in the data frame.
|
contr |
An integer vector of contrast coefficients parallel to |
p |
The exponent in a power function term ( |
offset |
Constant added to |
t |
A value.
|
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 |
It multiplies (may be non-integer) of the design matrix
for |
Functions
-
asr_dsum(): Direct sum structures for residual models. -
asr_C(): Defines specific contrasts for a factor. -
asr_con(): Sum to zero constraints. -
asr_lin(): Create a variate fromobj(usually factors). -
asr_pow(): Create 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 variateobj. -
asr_ma(): Construct a term with a moving-average of order 1 design matrix fromobj. -
asr_at(): Form a conditioning covariate fromobjfor each level ofobjspecified in thelvlsargument. -
asr_and(): Multiply the design matrix forobjbytimesand add it to the preceding design matrix. -
asr_mbf(): Create a model term from covariates not stored indata. -
asr_grp(): Create a model term from covariates held in specific columns ofdata.
Examples
## 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)))
## Equivalent
residual = ~dsum(~ar1(Column):ar1(Row) | Site, levels = c("Site1", "Site3")) +
dsum(~id(Column):ar1(Row) | Site, levels = c("Site2"))
## "biological" Date (as factor) within Plot
residual = ~dsum(~ar1(Date) | Plot)
## "explicit" times (Date as variate)
residual = ~dsum(~exp(Date) | Plot)
## End(Not run)