Skip to contents

When the same set of items is administered to several groups – age bands, treatment arms, translated versions of a questionnaire – a natural question is whether the items measure the same factors in each group. efa_group() answers it by fitting an exploratory factor analysis in every group at a common number of factors, bringing the per-group solutions into one shared orientation, and then comparing their loadings.

The comparison is not as simple as extracting a solution in each group and reading the loadings side by side. A factor solution is identified only up to a rotation of its factors, so two groups can have identical factor structures yet return loading matrices that look nothing alike – the factors may be reflected, reordered, or rotated relative to one another. Before the loadings can be compared they must be brought into a common orientation. That alignment is what efa_group() does for you, on top of the per-group fits, and it is the reason a dedicated function is worth having.

Two groups with a known difference

To see the tools work we need groups whose factor structures we already know, so we can check that the analysis recovers the difference we built in. We simulate two groups from a three-factor model with efa_simulate(). Both groups share the same simple structure – three items per factor – except in how factor 3 is built: in the control group item V7 is that factor’s strongest indicator, whereas in the treatment group V7 nearly drops off it and V9 becomes the strongest instead. Factor 3 is therefore defined by a different item in each group, which should lower its cross-group congruence and light up the per-item difference flags – while factors 1 and 2, whose items are untouched, stay highly congruent.

# Common simple structure: three items per factor.
Lambda_control <- matrix(0, nrow = 9, ncol = 3,
                         dimnames = list(paste0("V", 1:9), paste0("F", 1:3)))
Lambda_control[1:3, 1] <- c(.70, .65, .60)
Lambda_control[4:6, 2] <- c(.70, .65, .60)
Lambda_control[7:9, 3] <- c(.70, .65, .60)

# The treatment group is identical, except factor 3 is anchored by a different item:
# V7 nearly drops off it and V9 becomes its strongest indicator.
Lambda_treatment <- Lambda_control
Lambda_treatment["V7", 3] <- .20   # was .70
Lambda_treatment["V9", 3] <- .75   # was .60

Lambda_control
#>      F1   F2   F3
#> V1 0.70 0.00 0.00
#> V2 0.65 0.00 0.00
#> V3 0.60 0.00 0.00
#> V4 0.00 0.70 0.00
#> V5 0.00 0.65 0.00
#> V6 0.00 0.60 0.00
#> V7 0.00 0.00 0.70
#> V8 0.00 0.00 0.65
#> V9 0.00 0.00 0.60
Lambda_treatment
#>      F1   F2   F3
#> V1 0.70 0.00 0.00
#> V2 0.65 0.00 0.00
#> V3 0.60 0.00 0.00
#> V4 0.00 0.70 0.00
#> V5 0.00 0.65 0.00
#> V6 0.00 0.60 0.00
#> V7 0.00 0.00 0.20
#> V8 0.00 0.00 0.65
#> V9 0.00 0.00 0.75

Each group is drawn with its own seed so the example is fully reproducible.

control   <- efa_simulate(N = 300, Lambda = Lambda_control,   seed = 1)$data
treatment <- efa_simulate(N = 300, Lambda = Lambda_treatment, seed = 2)$data

# efa_group() requires the same items, in the same order, in every group.
colnames(control)   <- rownames(Lambda_control)
colnames(treatment) <- rownames(Lambda_treatment)

groups <- list(control = control, treatment = treatment)

Groups can be supplied either as a single raw data set together with a groups vector (one value per row) or the name of its grouping column, or – as here – as a named list of per-group data sets. The list may also hold per-group correlation matrices instead of raw data, in which case you pass their sample sizes through N.

Fitting at a common number of factors

efa_group() fits each group with efa_fit() at the common n_factors, forwarding any estimation and rotation settings unchanged to every group. Here we extract three factors with a varimax rotation.

mg <- efa_group(groups, n_factors = 3, rotation = "varimax")
mg
#> ── Multigroup exploratory factor analysis ──────────────────────────────────────
#> 
#> 2 groups (control, treatment) · 3 factors · PAF extraction · varimax rotation
#> Aligned to a symmetric consensus target.
#> N: control = 300, treatment = 300
#> 
#> ── Factor congruence ───────────────────────────────────────────────────────────
#> 
#> Tucker's congruence between the aligned group loadings (matched factors):
#> 
#>                        F1    F2    F3
#> control vs treatment  .974  .979  .863
#> 
#> ── Loading differences ─────────────────────────────────────────────────────────
#> 
#> Absolute loading differences by group pair:
#> 
#>                       mean   max  rmse  flagged
#> control vs treatment  .089  .469  .129     9/27
#> 
#> Flagged cells (|Δ| ≥ .1):
#> 
#>                       item  factor   diff
#> control vs treatment    V7      F3   .469
#> control vs treatment    V9      F3  -.251
#> control vs treatment    V5      F2   .161
#> control vs treatment    V9      F1  -.141
#> control vs treatment    V8      F3  -.132
#> control vs treatment    V3      F1   .125
#> control vs treatment    V6      F1   .122
#> control vs treatment    V5      F1   .117
#> control vs treatment    V8      F2  -.114

The printed report recaps the groups and the shared model, then summarises the two things we came for: the factor congruence between the aligned groups, and the size of their loading differences. The aligned per-group loading matrices are in $loadings, sharing one column order and sign so they can be read against each other directly.

lapply(mg$loadings, round, 2)
#> $control
#>       F1    F2    F3
#> V1  0.00  0.67 -0.03
#> V2 -0.04  0.68  0.05
#> V3  0.09  0.61 -0.05
#> V4  0.67  0.00 -0.03
#> V5  0.75  0.02  0.08
#> V6  0.63  0.02 -0.03
#> V7 -0.02 -0.05  0.68
#> V8  0.04 -0.04  0.52
#> V9  0.02  0.02  0.59
#> 
#> $treatment
#>       F1    F2    F3
#> V1 -0.04  0.65 -0.01
#> V2 -0.08  0.65  0.14
#> V3 -0.04  0.65  0.01
#> V4  0.73 -0.04 -0.04
#> V5  0.63 -0.15  0.05
#> V6  0.50  0.03  0.04
#> V7 -0.06  0.05  0.21
#> V8  0.00  0.07  0.65
#> V9  0.16  0.05  0.85

Factors 1 and 2 line up closely across the groups. Factor 3 does not: V7 and V9 have swapped prominence, exactly as we built in.

Alignment: consensus versus reference

efa_group() has two alignment strategies, and the report tells you which one it used.

  • Consensus (the default) builds a single symmetric target from all groups by generalized Procrustes analysis of their unrotated loadings. The requested rotation is then applied to this target. With an orthogonal rotation, every group gets the same orthogonal transformation. With an oblique rotation, every group is rotated to the target by oblique Procrustes rotation, so each group keeps its own factor correlations. An unrotated solution uses the principal axes of the target. The result, and thus the congruences and flags below, does not depend on the order of the groups. The fit above used this strategy.
  • Reference keeps the loadings of one group fixed and rotates every other group to them. This strategy is used when you name a reference_group.

The default rotation of efa_group() is the oblique oblimin rotation. It also uses the consensus target, and each group has its own factor correlations in $Phi:

mg_obl <- efa_group(groups, n_factors = 3, rotation = "oblimin")
mg_obl$settings$alignment
#> [1] "consensus"
lapply(mg_obl$Phi, round, 2)
#> $control
#>      F1    F2    F3
#> F1 1.00  0.05  0.00
#> F2 0.05  1.00 -0.06
#> F3 0.00 -0.06  1.00
#> 
#> $treatment
#>       F1    F2   F3
#> F1  1.00 -0.15 0.08
#> F2 -0.15  1.00 0.11
#> F3  0.08  0.11 1.00

Supplying reference_group selects the reference strategy and the group – by name or by position:

mg_ref <- efa_group(groups, n_factors = 3, rotation = "varimax",
                    reference_group = "control")
mg_ref$settings$alignment
#> [1] "reference"

Factor congruence with bootstrap intervals

Tucker’s congruence coefficient between the aligned loadings gives the cross-group factor similarity – one value per matched factor, per group pair. A congruence near 1 means that the same items, in the same relative proportions, define the factor in both groups.

With raw data, b_boot adds a bootstrap confidence interval to each congruence. The bootstrap resamples cases in each group, fits the model again, aligns every replicate to the frozen target, and calculates the congruences again. Sampling error in the replicates makes their congruences lower than the estimate. A percentile interval would therefore be too low, so efa_group() gives the basic bootstrap interval, which corrects for this. The interval can thus lie above the estimate, and its upper limit is often 1. A seed makes the bootstrap reproducible and independent of a parallel backend. If some replicate fits do not converge, a warning gives their number and the group. As in efa_fit(), these replicates are kept.

mg_ci <- efa_group(groups, n_factors = 3, rotation = "varimax",
                   b_boot = 500, seed = 2026, invariance = TRUE)
#> Warning: 7 of 500 bootstrap replicates did not converge.
#> ℹ Their bootstrap standard errors and confidence intervals may be unreliable.
#> ℹ Raised in 1 of 2 groups: treatment.
mg_ci
#> ── Multigroup exploratory factor analysis ──────────────────────────────────────
#> 
#> 2 groups (control, treatment) · 3 factors · PAF extraction · varimax rotation
#> Aligned to a symmetric consensus target.
#> N: control = 300, treatment = 300
#> 
#> ── Factor congruence ───────────────────────────────────────────────────────────
#> 
#> Tucker's congruence between the aligned group loadings (matched factors), with
#> 95% bootstrap confidence intervals (500 replicates):
#> 
#>                               F1                  F2                  F3
#> control vs treatment  .974 [.963, 1.000]  .979 [.971, 1.000]  .863 [.800, 1.000]
#> 
#> ── Loading differences ─────────────────────────────────────────────────────────
#> 
#> Absolute loading differences by group pair:
#> 
#>                       mean   max  rmse  flagged
#> control vs treatment  .089  .469  .129     1/27
#> 
#> Flagged cells (|Δ| ≥ .1 and Benjamini-Hochberg adjusted bootstrap p < .05):
#> 
#>                       item  factor  diff
#> control vs treatment    V7      F3  .469
#> 
#> ── Factor similarity ───────────────────────────────────────────────────────────
#> 
#> Congruence bands (Lorenzo-Seva & ten Berge, 2006: ≥ .95 equal, ≥ .85 fair):
#> 
#>                         F1     F2    F3
#> control vs treatment  equal  equal  fair

The plot() method shows the matched congruences against the Lorenzo-Seva and ten Berge (2006) similarity bands – .95 and above is “equal”, .85 to .95 is “fair” – with their confidence intervals.

plot(mg_ci, type = "congruence")

Factors 1 and 2 are near the top of the scale. Factor 3, whose indicators we changed, is in the “fair” band. Its interval is wide: it goes from below this band to 1.

Loading differences: salient and significant

Congruence summarises a whole factor. To see which items cause a difference, efa_group() also compares the aligned loadings cell by cell. $diffs gives a summary per pair, and $flags gives the signed difference for every item on every factor.

Without a bootstrap, a cell is flagged when the aligned loadings of the groups differ by at least delta (default 0.1) in absolute value. This is a descriptive salience threshold, and at usual sample sizes many differences of this size come from sampling error alone. The first fit above flags nine of the 27 cells.

With a bootstrap, a flagged cell must also have a significant difference: its p-value, from the bootstrap standard error, must be below 1 - ci after the Benjamini-Hochberg adjustment over all cells. The adjustment is necessary because many cells are tested at the same time. $flags also gives the percentile interval of each difference and whether it excludes zero, without the adjustment.

fl <- mg_ci$flags
fl[fl$abs_diff >= 0.1, c("indicator", "factor", "diff", "ci_excludes_0", "p_adjusted",
                         "flagged")]
#>    indicator factor       diff ci_excludes_0   p_adjusted flagged
#> 3         V3     F1  0.1253052         FALSE 0.4301170375   FALSE
#> 5         V5     F1  0.1165165         FALSE 0.5078552137   FALSE
#> 6         V6     F1  0.1219350         FALSE 0.4301170375   FALSE
#> 9         V9     F1 -0.1409243          TRUE 0.3246397069   FALSE
#> 14        V5     F2  0.1607774          TRUE 0.2413569703   FALSE
#> 17        V8     F2 -0.1137431         FALSE 0.4539175374   FALSE
#> 25        V7     F3  0.4687179          TRUE 0.0002073458    TRUE
#> 26        V8     F3 -0.1318978         FALSE 0.6512252418   FALSE
#> 27        V9     F3 -0.2511814          TRUE 0.4301170375   FALSE

Of the nine salient cells, four have an interval that excludes zero, and only the factor-3 cell of V7 stays significant after the adjustment. This is the largest difference that we built in. The "differences" plot shows the signed differences as a heatmap, one panel per group pair, and outlines the flagged cells.

plot(mg_ci, type = "differences")

A similarity verdict

For a short summary, invariance = TRUE (as in the bootstrap fit above) grades the congruence of each factor with the same bands and returns a verdict per factor: "equal", "fair", or "below fair" (congruence below .85).

mg_ci$invariance
#>   group_1   group_2 factor       phi phi_lower phi_upper verdict
#> 1 control treatment     F1 0.9741244 0.9634078         1   equal
#> 2 control treatment     F2 0.9792535 0.9713599         1   equal
#> 3 control treatment     F3 0.8626227 0.7996893         1    fair

The verdict comes from the congruence itself; the bootstrap limits are given in phi_lower and phi_upper. The bands describe the size of the congruence. They are not a test, and they are not a test of measurement invariance – a confirmatory multigroup model remains the tool for that.

Where to next

efa_group() carries several further controls: delta to tune the salience threshold, ci to set the interval level, and any efa_fit() argument (estimator, cor_method, an estimate_control() or rotate_control()) to configure the per-group estimation. See ?efa_group for the full argument list and the structure of the returned object, and the EFAtools vignette for the single-group workflow the per-group fits build on.

References

Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B, 57, 289-300.

Gower, J. C. (1975). Generalized Procrustes analysis. Psychometrika, 40, 33-51.

Lorenzo-Seva, U., Kiers, H. A. L., & ten Berge, J. M. F. (2002). Techniques for oblique factor rotation of two or more loading matrices to a mixture of simple structure and optimal agreement. British Journal of Mathematical and Statistical Psychology, 55, 337-360.

Lorenzo-Seva, U., & ten Berge, J. M. F. (2006). Tucker’s congruence coefficient as a meaningful index of factor similarity. Methodology, 2, 57-64.