pcbic.stepwise function

Choosing a good pattern

Choosing a good pattern

Uses the stepwise procedure described in Section 13.1.4 to find a pattern for a set of observed eigenvalues with good BIC value.

pcbic.stepwise(eigenvals, n)

Arguments

  • eigenvals: The QQ-vector of eigenvalues of the covariance matrix, in order from largest to smallest.
  • n: The degrees of freedom in the covariance matrix.

Returns

A list with the following components:

  • Patterns: A list of patterns, one for each value of length KK.
  • BICs: A vector of the BIC's for the above patterns.
  • BestBIC: The best (smallest) value among the BIC's in BICs.
  • BestPattern: The pattern with the best BIC.
  • lambdaHat: A QQ-vector containing the MLE's for the eigenvalues for the pattern with the best BIC.

Examples

# Build cars1 require("mclust") mcars <- Mclust(cars) cars1 <- cars[mcars$classification == 1, ] xcars <- scale(cars1) eg <- eigen(var(xcars)) pcbic.stepwise(eg$values, 95)

See Also

pcbic, pcbic.unite, and pcbic.subpatterns.

  • Maintainer: James Balamuta
  • License: MIT + file LICENSE
  • Last published: 2020-10-31