sfa_map: Velicer's Minimum Average Partial for Similarity Matrices

View source: R/retention.R

sfa_mapR Documentation

Velicer's Minimum Average Partial for Similarity Matrices

Description

Applies Velicer's (1976) minimum average partial (MAP) test to an embedding similarity matrix. MAP extracts principal components one at a time and tracks the average squared partial correlation among the residuals; the component count at the minimum is the suggested dimensionality.

Usage

sfa_map(sim_matrix, max_factors = NULL)

Arguments

sim_matrix

Numeric similarity matrix (n_items x n_items), or a fitted "sfa" object.

max_factors

Largest component count to evaluate (default: number of items minus two). The scan also stops early if a residual variance becomes non-positive.

Details

MAP needs no sample size and no null model, so it transfers to similarity matrices without adaptation. Interpret it with care in this setting: on embedding similarity matrices MAP tends to track all reliably estimated structure, including minor components well beyond the interpretable factor count, which is why it is available in sfa_nfactors() but not part of the default method set.

Three guardrails can make the result diverge from Velicer's rule in edge cases, always toward retaining at least one factor: the count is floored at one (Velicer's comparison against the zero-component baseline can recommend retaining none; the baseline is reported as map0 so that comparison remains available), the default scan stops at two below the item count (Velicer evaluates to one below), and the scan ends early when a residual variance turns non-positive (candidate counts whose partial correlations are undefined on a non-positive-semi-definite input are skipped as missing), which can truncate or thin the search before the global minimum.

Value

A list of class "sfa_map" with components:

n_factors

Integer: component count at the minimum average squared partial correlation (floored at one).

map

Numeric vector: the MAP criterion at each evaluated count.

map0

Baseline average squared off-diagonal correlation with no components removed.

References

Velicer, W. F. (1976). Determining the number of components from the matrix of partial correlations. Psychometrika, 41(3), 321–327. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02293557")}

Examples

data(big5)
sim <- sfa_similarity(big5$embeddings, "mean_centered_pearson")
sfa_map(sim)


semanticfa documentation built on Sept. 2, 2026, 1:07 a.m.