init_param: Initialize EM parameters given group assignments

Description Usage Arguments Value

View source: R/em.R

Description

Initialize EM parameters given group assignments

Usage

1
init_param(counts, groups, psc = 1e-04)

Arguments

counts

an observation by variable matrix of non-negative integer counts.

groups

A character vector or factor, the same length as the number of columns in counts. The assignment of the index in groups corresponds to the group assignment of the column index in counts. Thus, the ordering of groups must be consistent with the column ordering in counts.

psc

Pseudocount to add to the resulting mean for each multinomial mean parameter.

Value

List

mu0

A observation by k matrix of multinomial means.

mc0

A numeric vector of length k of micture coefficients.


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