m_step_mn: Maximize multinomial parameters in EM

Description Usage Arguments Value

View source: R/em.R

Description

Given an n x p matrix of count data, as well as a n x k matrix of responsibilities, return the maximum likelihood estimate (MLE) of p for each k group in a p x k matrix.

Usage

1
m_step_mn(x, r, psc = 1e-04)

Arguments

x

An n x p count matrix.

r

An n x k membership prob. matrix.

psc

Pseudocount.

Value

A list with

Mu

An n x k matrix of multinomial means.

Mc

A k-length numeric vector of mixture coefficients.


diem documentation built on Nov. 16, 2019, 1:08 a.m.