plotConvergence.nempi: Plot convergence of EM

View source: R/nempi_main.r

plotConvergence.nempiR Documentation

Plot convergence of EM

Description

Produces different convergence plots based on a nempi object

Usage

## S3 method for class 'nempi'
plotConvergence(x, type = "b", ...)

Arguments

x

nempi object

type

see ?plot.default

...

additional parameters for plot

Value

plot

Author(s)

Martin Pirkl

Examples

D <- matrix(rnorm(1000*100), 1000, 100)
colnames(D) <- sample(seq_len(5), 100, replace = TRUE)
Gamma <- matrix(sample(c(0,1), 5*100, replace = TRUE, p = c(0.9, 0.1)), 5,
100)
Gamma <- apply(Gamma, 2, function(x) return(x/sum(x)))
Gamma[is.na(Gamma)] <- 0
rownames(Gamma) <- seq_len(5)
result <- nempi(D, Gamma = Gamma)
par(mfrow=c(2,3))
plotConvergence(result)

cbg-ethz/nempi documentation built on Nov. 5, 2024, 11:27 p.m.