\encoding{UTF-8}
\name{NormalizingWeight}
\alias{NormalizingWeight}
\title{Normalizing Weights for Factor Rotation}
\usage{
    NormalizingWeight(A, normalize=FALSE)
}
\arguments{
  \item{normalize}{controls normalization. One of:
    \itemize{
      \item \code{FALSE} (default) --- no normalization
      \item \code{TRUE} or \code{"Kaiser"} --- Kaiser (Horst) normalization:
        rows of \code{A} are scaled to unit norm before rotation and
        rescaled after
      \item \code{"CM"} --- Cureton-Mulaik normalization: rows are
        weighted by a function of their angular distance from the
        equal-loading point (Cureton and Mulaik, 1975)
      \item a numeric vector of length \code{nrow(A)} --- custom weights
      \item a function taking \code{A} and returning a weight vector
    }
  }
}
\value{
  A numeric vector of normalizing weights. This function is not exported
  from the NAMESPACE and is only called internally by the gradient projection
  rotation functions. See \code{\link{GPFRSorth}} for details on the
  \code{normalize} argument.
}
\description{
  Internal utility function that computes normalizing weights for factor
  loading matrices prior to rotation. Called by \code{GPForth},
  \code{GPFoblq}, and the random-start wrappers.
}
\details{
  \code{NormalizingWeight} is not exported from the NAMESPACE and is
  called internally by \code{GPForth}, \code{GPFoblq}, and the
  random-start wrapper functions. For a full description of the
  \code{normalize} argument and its options, see \code{\link{GPFRSorth}}.

  The choice of normalization method can affect the rotation solution
  and its interpretation. For a detailed investigation of the effects
  of normalization on factor rotations, see Nguyen and Waller (2023).
}
\examples{
  data("CCAI", package = "GPArotation")
  # Kaiser normalization
  factanal(factors = 3, covmat = CCAI_R, n.obs = 461, rotation = "oblimin",
           control = list(rotate = list(normalize = TRUE)))

  data(Harman, package = "GPArotation")
  # two ways to do Kaiser normalization
  quartimin(Harman8, normalize = TRUE, randomStarts = 100)
  quartimin(Harman8, normalize = "Kaiser", randomStarts = 100)
  # Cureton-Mulaik normalization
  quartimin(Harman8, normalize = "CM", randomStarts = 100)

}
\references{
  Cureton, E.E. and Mulaik, S.A. (1975). The weighted varimax rotation
    and the promax rotation. \emph{Psychometrika}, \bold{40}(2), 183--195.
    \doi{10.1007/BF02291565}
    
  Nguyen, H.V. and Waller, N.G. (2023). Local minima and factor rotations
    in exploratory factor analysis. \emph{Psychological Methods},
    \bold{28}(5), 1122--1141.
    \doi{10.1037/met0000467}
}
\seealso{
  \code{\link{GPFRSorth}},
  \code{\link{GPForth}}
}
\keyword{internal}