Adds slope-only deviations across the response columns of a long-format
Gaussian model. If B is the response-column by predictor coefficient
matrix and Sigma is the fitted covariance among its predictor columns,
this helper uses
$$\mathrm{Cov}(\mathrm{vec}(B^\mathsf{T})) = I \otimes \Sigma.$$
Write x1 + x2 | trait for a full predictor covariance or
x1 + x2 || trait for a diagonal predictor covariance. Both spellings
give the same one-variance model when there is only one predictor. The
term never adds a random intercept; keep response-column intercepts in the
main formula with 0 + trait.
Examples
if (FALSE) { # \dontrun{
set.seed(1); dat <- expand.grid(unit = factor(1:12), trait = factor(paste0("sp", 1:4)))
dat$lat <- rnorm(nrow(dat)); dat$temp <- rnorm(nrow(dat)); dat$value <- rnorm(nrow(dat))
fit <- gllvmTMB(value ~ 0 + trait + slope(lat + temp | trait), data = dat,
trait = "trait", unit = "unit", family = gaussian())
extract_Sigma(fit, level = "column_slope")
} # }
