
Dense-kernel one-shared-variance covariance: kernel_scalar()
Source: R/kernel-keywords.R
kernel_scalar.Rdkernel_scalar() is the dense-kernel analogue of scalar() /
phylo_scalar(): one variance shared by every trait, coupled between
grouping levels by the supplied dense matrix K
(\(\boldsymbol\Sigma = \sigma^2\,\mathbf I_T\),
\(\operatorname{Cov}(b_{gt}, b_{g't}) = \sigma^2 K_{gg'}\)). It uses the
same phylo-equivalent diagonal engine path as kernel_indep(), with the
per-trait variances tied to a single shared parameter, so
extract_Sigma() exposes it under level = name.
Arguments
- unit
Unquoted grouping column whose levels align with
rownames(K). Whenclusteris omitted,gllvmTMB()uses this column, soKis checked against it. An explicitclusteris unchanged.- K
Numeric dense positive-semidefinite covariance or correlation matrix aligned to the grouping levels.
- name
Character scalar used as the extractor level, e.g.
extract_Sigma(fit, level = "cross").