R/mstep1.R

Defines functions mstep1

Documented in mstep1

mstep1 <-
function(Y, Tau, Pi, mu, g)
{
  for(i in 1:g)
  {
    Pi[i]<-sum(Tau[,i])/nrow(Y)                                                                          
    mu[,i]<-apply(Y*Tau[,i],2,sum)/sum(Tau[,i])
 }
 return(list(Pi, mu))
}# End mstep1 

Try the MetabolAnalyze package in your browser

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

MetabolAnalyze documentation built on Aug. 31, 2019, 5:05 p.m.