loadings_mmes: Extract factor-analytic loadings from a fitted mmes model
Description
Reconstructs the normalized loadings matrix and specific variances of a
fam() or rrm() covariance-shaping factor fitted inside
vsm(), on the same scale as the fitted covariance matrix returned in
object$theta.
Usage
loadings_mmes(object, term = NULL, varianceScale=TRUE, rotation=TRUE)
Value
A list containing:
loadings
a levels-by-factor matrix \(\Lambda\).
specific
a named vector of specific variances \(\Psi\) (identically
zero for every level in a rrm() term).
sigma2
the fitted overall variance scale.
model
"fa" or "rr".
term
the resolved term name.
Arguments
object
a fitted model of class "mmes".
term
character name of the random term (matching a name in
object$covStruct) built with a single fam() or rrm()
covariance-shaping factor. If NULL, the unique such term in the model
is used automatically; an error is raised if none or more than one exist.
varianceScale
Whether to return loadings multiplied by
sqrt(sigma2) and specific variances multiplied by sigma2.
When FALSE, both describe the dimensionless covariance shape.
rotation
a logical value to indicate if loadings should be rotated by its
singular vectors.
Details
fam()/rrm() remove their otherwise redundant internal scale so
that vsm() owns the single overall variance; the loadings and specific
variances reported by loadings_mmes are re-normalized so that
$$\Sigma = \sigma^2(\Lambda\Lambda^{\mathsf T}+\Psi)$$
reproduces object$theta[[term]] exactly when
varianceScale=FALSE, where \(\sigma^2\) is
object$covPar[[term]][1]. With varianceScale=TRUE, the
returned loadings crossproduct plus the diagonal of the returned specific
variances directly reproduces that covariance.