\encoding{UTF-8}
\name{print.GPArotation}
\alias{print.GPArotation}
\alias{summary.GPArotation}
\alias{print.summary.GPArotation}
\alias{.sortGPALoadings}
\title{Print and Summary Methods for GPArotation Class Objects}
\usage{
    \method{print}{GPArotation}(x, digits=3, sortLoadings=TRUE, rotateMat=FALSE, Table=FALSE, ...)
    \method{summary}{GPArotation}(object, digits=3, Structure=TRUE, ...)
    \method{print}{summary.GPArotation}(x, ...)
}
\arguments{
    \item{x}{a \code{GPArotation} or \code{summary.GPArotation} object to print.}
    \item{object}{a \code{GPArotation} object to summarize.}
    \item{digits}{precision of printed numbers.}
    \item{sortLoadings}{logical; if \code{TRUE} (default) factors are sorted
         by descending variance explained and factor signs are adjusted so
         that the sum of loadings per factor is positive. Adapted from
         \code{factanal} sorting conventions. Use \code{sortLoadings = FALSE}
         to display the raw unsorted solution, for example when the factor
         order is meaningful as in bifactor rotation.}
    \item{rotateMat}{logical; if \code{TRUE} the rotation matrix is displayed.}
    \item{Table}{logical; if \code{TRUE} the iteration table is displayed.}
    \item{Structure}{logical; if \code{TRUE} (default) the structure matrix
         (\code{loadings \%*\% Phi}) is displayed for oblique rotations in
         \code{summary}.}
    \item{...}{further arguments passed to other methods.}
}
\value{
  \code{print.GPArotation} returns the sorted \code{GPArotation}
  object invisibly when \code{sortLoadings = TRUE}, or the unsorted
  object when \code{sortLoadings = FALSE}.
  \code{summary.GPArotation} returns a \code{summary.GPArotation} object
  with sorted loadings and, for oblique rotations, the structure matrix.
  \code{print.summary.GPArotation} returns the object invisibly.
}
\description{
Print and summary methods for objects returned by \code{GPFRSorth},
\code{GPFRSoblq}, \code{GPForth}, or \code{GPFoblq}.

Both \code{print.GPArotation} and \code{summary.GPArotation} apply
consistent factor sorting and sign correction via the internal helper
\code{.sortGPALoadings} when \code{sortLoadings = TRUE}. Factors are
ordered by descending variance explained and signs are adjusted so that
the sum of loadings per factor is positive. This convention matches
that used by \code{\link[stats]{factanal}}.

For oblique rotations, \code{summary.GPArotation} displays both the
pattern matrix (regression coefficients of items on factors, controlling
for factor intercorrelations) and the structure matrix
(\code{loadings \%*\% Phi}, correlations between items and factors)
when \code{Structure = TRUE}. The two matrices coincide for orthogonal
rotations where \eqn{\Phi = I}{Phi = I}.

Output includes contributions of factors via \code{SS loadings}
(sum of squared loadings); see Harman (1976), sections 2.4 and 12.4.
}
\details{
Factor sorting and sign correction are applied consistently in both
\code{print} and \code{summary} via the internal function
\code{.sortGPALoadings}, adapted from \code{factanal} sorting
conventions (R Core Team). This ensures that the pattern matrix shown
by \code{summary} is consistent with the loadings shown by
\code{print}.

The \code{digits} argument controls the number of decimal places
shown in the loadings, structure matrix, and Phi.

For examples see \code{\link{GPFRSorth}} and the package vignettes:
\code{vignette("GPA1guide", package = "GPArotation")}.
}
\references{
  Harman, H.H. (1976). \emph{Modern Factor Analysis}.
    The University of Chicago Press.
}
\seealso{
  \code{\link{GPFRSorth}},
  \code{\link{GPForth}},
  \code{\link[stats]{factanal}},
  \code{\link[base]{summary}}
}
\examples{
  data(Harman, package = "GPArotation")
  res <- oblimin(Harman8, normalize = TRUE, randomStarts = 100)

  # Print sorted loadings (default)
  print(res)

  # Print unsorted loadings
  print(res, sortLoadings = FALSE)

  # Summary with pattern and structure matrices
  summary(res, Structure = TRUE)

  # Summary without structure matrix
  summary(res, Structure = FALSE)

  # Print with iteration table
  print(res, Table = TRUE)
}
\concept{rotation}
\keyword{multivariate}