R/likelihoodcluster.R

likelihoodcluster <-
function(param, paramnames, zeroset, listdata, fMP, PointsW, cl) {
  d1 = length(param);
  d2 = length(zeroset);
  paramlist = vector('list',length=(d1+d2));
  names(paramlist) = c(paramnames, zeroset);
  for (i in 1:d1)  paramlist[[i]] = param[i];
  if(d2>0) { for (j in 1:d2)  paramlist[[d1+j]] = 0; }
  fmp = parLapply(cl=cl, X=listdata, fun=fMP, param=paramlist, PointsW=PointsW);
  return(sum(unlist(fmp)));
}

Try the GxM package in your browser

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

GxM documentation built on May 2, 2019, 3:38 p.m.