plot2fOrthComparison: Algorithm Comparison for Two-Factor Orthogonal Rotation

View source: R/trajectoryPlot.R

plot2fOrthComparisonR Documentation

Algorithm Comparison for Two-Factor Orthogonal Rotation

Description

Produces a 2 \times 3 panel figure comparing the "legacy", "bb", and "cayley" optimization algorithms on a two-factor orthogonal rotation. The top row shows the criterion landscape and the algorithm trajectory for each algorithm; the bottom row shows the corresponding factor migration paths. An optional endgame inset zooms into the convergence region near the global minimum.

Usage

plot2fOrthComparison(A, method = "quartimax", items = NULL,
                     nang = 6000, maxit = 500, magnify = FALSE, 
                     inset_pos = "auto", randomStart = FALSE, ...)

Arguments

A

An unrotated loading matrix with exactly two columns, or a factanal object.

method

Character string naming the rotation criterion. Must be an orthogonal criterion available in GPArotation, for example "quartimax", "Varimax", or "geominT". Default is "quartimax".

items

Integer vector specifying which variables to include in the factor migration path plots. Default NULL includes all variables.

nang

Number of angles at which to evaluate the criterion landscape. Default 6000.

maxit

Maximum number of iterations for each algorithm. Default 500.

magnify

Logical. If TRUE, an endgame inset is added to each landscape panel, zooming into the convergence region near the global minimum. Default FALSE.

inset_pos

Placement of the inset. Options are "topleft", "bottomleft", and the default = "auto"

randomStart

Initiate with random start matrix. Default = FALSE

...

Additional arguments passed to the rotation function, for example normalize = TRUE.

Value

Invisibly returns a list with components legacy, bb, and cayley, each a "GPArotation" object from the corresponding algorithm run.

Note

This function requires a two-factor loading matrix. The criterion landscape visualization is only defined for two-factor orthogonal rotations, where all rotation matrices are parameterized by a single angle \theta \in [0, 2\pi).

See Also

plot.GPArotation, GPForth, rotations

Examples

data("Harman", package = "GPArotation")
plot2fOrthComparison(Harman8, method = "quartimax", magnify = TRUE)

plot2fOrthComparison(Harman8, method = "tandemII", magnify = FALSE)

GPArotation documentation built on June 18, 2026, 9:06 a.m.