R/Mixture.R

Defines functions Mixture

Mixture=function(data,pre)
{
  resultall=0
  for(i in 1:length(pre$mean))
  {
    resultall=resultall+pre$pro[i]/sum(pre$pro)*stats::dnorm(data,mean=pre$mean[i],sd=pre$sd[i])
  }
  return(resultall)
}

Try the BANFF package in your browser

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

BANFF documentation built on May 29, 2017, 11:59 a.m.