R/muginit.R

muginit <-
function(G,p,x,zmat,ng){
	mug <- matrix(0,G,p)
	for(g in 1:G){
		mug[g,] <- colSums(zmat[,g]*x)/ng[g]
	}
	mug
}

Try the mmtfa package in your browser

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

mmtfa documentation built on May 2, 2019, 1:45 p.m.