R/f_mlta_nstarts_wfix.R

f_mlta_nstarts_wfix <- function(S, counts, G, D, nstarts, tol, maxiter, pdGH)
{
  out <- f_mlta_wfix(S, counts, G, D, tol, maxiter, pdGH)
  
  if(nstarts > 1){ 
    for(i in 2:nstarts){
      out1 <- f_mlta_wfix(S, counts, G, D, tol, maxiter, pdGH)
      if(out1$LL > out$LL) out <- out1
    }
  }
  return(out)
}
igollini/lvm4net documentation built on June 20, 2019, 4:48 p.m.