Next: ulscrit() Up: Multivariate Macros Help File Previous: stepml()   Contents


stepuls(r, psi, m [, print:T]), REAL positive definite symmetric matrix
  r, REAL vector psi or structure with psi[1] a REAL vector, integer m
  > 0

Keywords: factor analysis, iteration
stepuls(r, psi, m) performs one step of an iteration which attempts to
extract m factors in factor analyis.  r is a p by p correlation or
variance-covariance matrix, psi is a REAL vector of trial uniquenesses
of length p with min(psi) > 0 and integer m > 0.

The value returned is structure(psi:newpsi, loadings:L, crit:criterion),
where newpsi is an updated vector of uniquenesses, L a p by m matrix of
factor loadings satisfying L' %*% L is diagonal, and criterion is a
value of the criterion being minimized; see below.

In addition, stepuls() also creates side effect variabls PSI, LOADINGS,
and CRITERION containing newphi, L and criterion.

Actually L is the loadings that minimize the criterion for argument
phi, not the output newphi, and criterion is the criterion assocated
with phi and L.

Each step reduces the unweighted least squares (ULS) criterion =
trace((r - rhat) %*% (r - rhat)), where rhat has the form rhat =
dmat(psi) + V where V is the unique rank m matrix that minimizes this
criterion for given psi.

Argument psi can also have the form structure(psi1, ...) where psi1 is
the vector of uniquenesses.  This means you can do many steps of the
iteration as follows.

  Cmd> psi <- psi0 # psi0 a vector of starting values

  Cmd> for (i,1,500){psi <- stepuls(r,psi,m);;}

stepuls(r, psi, m, print:T) does the same except the updated psi and the
criterion value are printed.  For example,

  Cmd> for (i,1,500){psi <- stepuls(r,psi,m,print:i %% 50 == 0);;}

prints out psi and and the criterion every 50 steps.

The iteration performed by stepuls() is also known as Principal Factor
Iteration.  It is not unusual for it to converge very slowly.  In
addition, it is possible a step to produce a psi with min(psi) < 0 or r
- dmat(psi) not non-negative definite.  When this happens stepuls()
aborts.  You can retrieve the most recent uniquenesses and loadings
from variables PSI and LOADINGS.

It is usually preferable to use a method that more directly minimizes
the criterion, such as macro ulsfactor().  In addition, one of the
function minimization macros, dfp, bfs or broyden could be used to
minimize the criterion as a function of psi or log(psi).

Gary Oehlert 2003-01-15