Learn R Programming

GPArotation (version 2022.10-2)

rotations: Rotations

Description

Optimize factor loading rotation objective.

Usage

oblimin(L, Tmat=diag(ncol(L)), gam=0, normalize=FALSE, eps=1e-5, maxit=1000)
    quartimin(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    targetT(L, Tmat=diag(ncol(L)), Target=NULL, normalize=FALSE, eps=1e-5, maxit=1000)
    targetQ(L, Tmat=diag(ncol(L)), Target=NULL, normalize=FALSE, eps=1e-5, maxit=1000)
    pstT(L, Tmat=diag(ncol(L)), W=NULL, Target=NULL, 
               normalize=FALSE, eps=1e-5, maxit=1000)
    pstQ(L, Tmat=diag(ncol(L)), W=NULL, Target=NULL,
               normalize=FALSE, eps=1e-5, maxit=1000)
    oblimax(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    entropy(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    quartimax(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    Varimax(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    simplimax(L, Tmat=diag(ncol(L)), k=nrow(L), 
               normalize=FALSE, eps=1e-5, maxit=1000)
    bentlerT(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    bentlerQ(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    tandemI(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    tandemII(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    geominT(L, Tmat=diag(ncol(L)), delta=.01, 
               normalize=FALSE, eps=1e-5, maxit=1000)
    geominQ(L, Tmat=diag(ncol(L)), delta=.01, 
               normalize=FALSE, eps=1e-5, maxit=1000)
    cfT(L, Tmat=diag(ncol(L)), kappa=0, normalize=FALSE, eps=1e-5, maxit=1000)
    cfQ(L, Tmat=diag(ncol(L)), kappa=0, normalize=FALSE, eps=1e-5, maxit=1000)
    infomaxT(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    infomaxQ(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    mccammon(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    bifactorT(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    bifactorQ(L, Tmat=diag(ncol(L)), normalize=FALSE, eps=1e-5, maxit=1000)
    
    vgQ.oblimin(L, gam=0)
    vgQ.quartimin(L)
    vgQ.target(L, Target=NULL)
    vgQ.pst(L, W=NULL, Target=NULL)
    vgQ.oblimax(L)
    vgQ.entropy(L)
    vgQ.quartimax(L)
    vgQ.varimax(L)
    vgQ.simplimax(L, k=nrow(L))
    vgQ.bentler(L)
    vgQ.tandemI(L)
    vgQ.tandemII(L)
    vgQ.geomin(L, delta=.01)
    vgQ.cf(L, kappa=0)
    vgQ.infomax(L)
    vgQ.mccammon(L)
    vgQ.bifactor(L)

Value

A list (which includes elements used by factanal) with:

loadings

Lh from GPForth or GPFoblq.

Th

Th from GPForth or GPFoblq.

Table

Table from GPForth or GPFoblq.

method

A string indicating the rotation objective function.

orthogonal

A logical indicating if the rotation is orthogonal.

convergence

Convergence indicator from GPForth or GPFoblq.

Phi

t(Th) %*% Th. The covariance matrix of the rotated factors. This will be the identity matrix for orthogonal rotations so is omitted (NULL) for the result from GPForth.

Arguments

L

a factor loading matrix

Tmat

initial rotation matrix.

gam

0=Quartimin, .5=Biquartimin, 1=Covarimin.

Target

rotation target for objective calculation.

W

weighting of each element in target.

k

number of close to zero loadings.

delta

constant added to Lambda^2 in objective calculation.

kappa

see details.

normalize

parameter passed to optimization routine (GPForth or GPFoblq).

eps

parameter passed to optimization routine (GPForth or GPFoblq).

maxit

parameter passed to optimization routine (GPForth or GPFoblq).

Author

Coen A. Bernaards and Robert I. Jennrich with some R modifications by Paul Gilbert.

Details

These functions optimize a rotation objective. They can be used directly or the function name can be passed to factor analysis functions like factanal. Several of the function names end in T or Q, which indicates if they are orthogonal or oblique rotations (using GPForth or GPFoblq respectively.

The vgQ.* versions of the code are called by the optimization routine and would typically not be used directly, so these methods are not exported from the package namespace. (They simply return the function value and gradient for a given rotation matrix.) You can print these functions, but the package name needs to be specified since they are not exported. For example, use GPArotation:::vgQ.oblimin to view the function vgQ.oblimin. The T or Q ending on function names should be omitted for the vgQ.* versions of the code so, for example, use GPArotation:::vgQ.target to view the target criterion calculation.

Rotations which are available are

obliminobliqueoblimin family
quartiminoblique
targetTorthogonaltarget rotation
targetQobliquetarget rotation
pstTorthogonalpartially specified target rotation
pstQobliquepartially specified target rotation
oblimaxoblique
entropyorthogonalminimum entropy
quartimaxorthogonal
varimaxorthogonal
simplimaxoblique
bentlerTorthogonalBentler's invariant pattern simplicity criterion
bentlerQobliqueBentler's invariant pattern simplicity criterion
tandemIorthogonalTandem Criterion
tandemIIorthogonalTandem Criterion
geominTorthogonal
geominQoblique
cfTorthogonalCrawford-Ferguson family
cfQobliqueCrawford-Ferguson family
infomaxTorthogonal
infomaxQoblique
mccammonorthogonalMcCammon minimum entropy ratio
bifactorTorthogonalJennrich and Bentler bifactor rotation
bifactorQobliqueJennrich and Bentler biquartimin rotation

Also included for convenience are two analytic rotations eiv and echelon which do not require GPForth or GPFoblq.

Note that Varimax defined here uses vgQ.varimax and is not varimax defined in the stats package. stats:::varimax does Kaiser normalization by default whereas Varimax defined here does not.

The argument kappa parameterizes the family for the Crawford-Ferguson method. If m is the number of factors and p is the number of indicators then kappa values having special names are 0=Quartimax, 1/p=Varimax, m/(2*p)=Equamax, (m-1)/(p+m-2)=Parsimax, 1=Factor parsimony.

New rotation methods can be programmed with a name "vgQ.newmethod". The inputs are the matrix L, and optionally any additional arguments. The output should be a list with elements

fthe value of the criterion at L.
Gqthe gradient at L.
Methoda string indicating the criterion.

References

Bernaards, C.A. and Jennrich, R.I. (2005) Gradient Projection Algorithms and Software for Arbitrary Rotation Criteria in Factor Analysis. Educational and Psychological Measurement, 65, 676--696.

Bifactor rotation, bifactorT and bifactorQ are called bifactor and biquartimin in Jennrich, R.I. and Bentler, P.M. (2011) Exploratory bi-factor analysis. Psychometrika, 76.

A discussion of rotation objectives can be found in many references, for example,

Tom Wansbeek and Erik Meijer (2000) Measurement Error and Latent Variables in Econometrics, Amsterdam: North-Holland.

See Also

GPForth, GPFoblq, WansbeekMeijer, eiv, echelon, factanal, varimax, promax

Examples

Run this code
  data(ability.cov)
  factanal(factors = 2, covmat = ability.cov, rotation="oblimin")

  data("Harman", package="GPArotation")
  qHarman  <- GPForth(Harman8, Tmat=diag(2), method="quartimax")
  qHarman2 <- quartimax(Harman8) 

  data("WansbeekMeijer", package="GPArotation")
  fa.unrotated  <- factanal(factors = 2, covmat=NetherlandsTV, rotation="none")

  fa.varimax <- factanal(factors = 2, covmat=NetherlandsTV, 
                rotation="varimax", control=list(rotate=list(normalize=TRUE)))
  fa.oblimin <- factanal(factors = 2, covmat=NetherlandsTV,
                rotation="oblimin", control=list(rotate=list(normalize=TRUE)))
  
  cbind(loadings(fa.unrotated), loadings(fa.varimax), loadings(fa.oblimin))

  

Run the code above in your browser using DataLab