Next: jackknife() Up: Multivariate Macros Help File Previous: hotell2val()   Contents


result <- mlcrit(logpsi, k, structure(r, nfact [, del])), REAL vector
  logpsi, integer scalar k, integer nfact > 0, small REAL scalar del

Keywords: factor analysis
mlcrit() is used by facanal() with method:"mle" to compute the maximum
likelihood ML criterion F_ml(x), x = log(psi) being minimized, its
gradient dF_ml(x)/dx and the current loadings and eigenvalues.

result <- mlcrit(logpsi, k, structure(r, nfact [,del]) computes a
scalar, vector or structure, depending on the value of integer k.

r is a REAL symmetric covariance or correlation matrix, nfact > 0 is the
number of factors, and del >= 0 is a small REAL scalar (default is 1e-5)
controlling how the gradient is computed.

When del = 0 (value used by facanal()), the gradient is computed

When del > 0, the gradient vector has elements gradient[i] = (F_ml(x) +
del*(run(p)==i)) - F_ml(x))/del.

The result computed is as follows:
   k           result
   0           scalar F_ml(x), x = logpsi
   1           vector gradient dF_ml(x)/dx
  -2           structure(loadings, eigenvals)

When r is not positive definite, MISSING (k = 0) or rep(MISSING,
nrows(s)) (k = 1) is returned.

No argument checking is done.

See also facanal(), glscrit(), ulscrit()

Gary Oehlert 2003-01-15