Learn R Programming

diem (version 1.0)

m_step_mn: Maximize multinomial parameters in EM

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

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.