R/f_lca_nstarts.R

f_lca_nstarts <- function(S, counts, G, nstarts, tol, maxiter) {
  
  out <- f_lca(S, counts, G, tol, maxiter)
  
  for(i in 2:nstarts){
    out1 <- f_lca(S, counts, G, tol, maxiter)
    if(out1$LL > out$LL) out <- out1
  }
  out
}

Try the lvm4net package in your browser

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

lvm4net documentation built on June 13, 2019, 5:03 p.m.