Learn R Programming

GPArotation (version 2026.8-1)

plot2fOrthComparison: 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, ...)

Value

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

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.

See Also

plot.GPArotation, GPForth, rotations

Examples

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

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

Run the code above in your browser using DataLab