R/pm_em_decompsigma.r

Defines functions decompsigma

### This file contains functions for decomposition of SIGMA of MVN.
### These will be majorly used in m.step() to update PARAM$U and PARAM$U.check.

decompsigma <- function(SIGMA){
  U <- chol(SIGMA)
  u <- diag(U)
  U.check <- TRUE
  if(any(u < .pmclustEnv$CONTROL$U.min | u > .pmclustEnv$CONTROL$U.max)){
    U.check <- FALSE
  }

  list(value = U, check = U.check)
} # End of decompsigma().

Try the pmclust package in your browser

Any scripts or data that you put into this service are public.

pmclust documentation built on Feb. 11, 2021, 5:05 p.m.