Learn R Programming

diem (version 1.0)

init_param: Initialize EM parameters given group assignments

Description

Initialize EM parameters given group assignments

Usage

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.