| dsumm | R Documentation |
dsumm replicates a residual vsm structure independently for
every level (section) of a grouping variable, such as a trial, location, or
experiment. Each section receives its own variance and its own copy of every
covariance parameter of the inner structure.
dsumm(x, by, levels = NULL)
x |
A residual |
by |
Observation-level grouping variable defining the sections. Missing
values of |
levels |
Optional character vector of |
Direct sum versus Kronecker product. A vsm() term is a Kronecker
product with a single overall variance. Including a diagonal section factor,
\mathrm{vsm}(\mathrm{dsm}(t), \mathrm{ar1m}(r), \mathrm{ar1m}(c), \mathrm{ism}(units)):\quad
R = \sigma^2\, D_t \otimes K_r(\rho_r) \otimes K_c(\rho_c),
gives each section its own variance, but a single correlation shared by all
sections, because each factor of a Kronecker product appears only once. In
contrast, dsumm builds the block-diagonal direct sum
R = \bigoplus_{t} \sigma^2_t\, K_r(\rho_{r,t}) \otimes K_c(\rho_{c,t}),
so every section has its own variance and its own correlations. Sections are mutually independent, so their parameters are estimated only from their own observations; with section-specific fixed effects the joint fit reproduces separate per-section fits.
Choosing between the two. Use the vsm() form when trials are
small or similar and a common spatial correlation is adequate (fewer
parameters). Use dsumm when correlations are expected to differ between
trials. With T sections and p inner covariance parameters,
dsumm estimates T(p+1) residual parameters.
Unlisted levels. Levels omitted from levels are modelled as
\sigma^2_t I. Their observations are retained even when the variables of
the inner structure (for example row or range) are missing, so trials without
spatial coordinates can be analysed together with spatially designed trials.
Computation. Each section is embedded in the rectangle spanned by its
observed levels of the inner factors. Covariance applications use the small
factor inverses, and missing cells (e.g. plots with a missing response) are
absorbed exactly by a Schur complement, so the dense observation-level
covariance matrix is never formed. This requires sections that are close to
complete rectangles and no W weights.
Reporting. covparams_mmes returns one row per parameter
and section, with the section in the section column. The variance rows
belong to the by factor; correlation rows are labelled by their inner
factor, e.g. ar1m(range).
A residual covariance structure, in the same form as a residual vsm()
term, for use in the rcov argument of mmes.
dsumm is currently available only for residual (rcov) structures,
without W weights, and cannot be nested.
vsm, ar1m, dsm, mmes,
covparams_mmes.
## Not run:
mix <- mmes(yield ~ trial,
rcov = ~ dsumm(vsm(ar1m(range), ar1m(row), ism(units)), by = trial),
data = dat)
covparams_mmes(mix)
# Spatial structure only for two trials; remaining trials are iid.
mix2 <- mmes(yield ~ trial,
rcov = ~ dsumm(vsm(ar1m(range), ar1m(row), ism(units)),
by = trial, levels = c("T1", "T2")),
data = dat)
# Site-specific unstructured covariance among environments.
mix3 <- mmes(y ~ site,
rcov = ~ dsumm(vsm(usm(env), ism(units)), by = site),
data = dat2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.