plotConvergence.mnem: Plot convergence of EM

View source: R/mnems.r

plotConvergence.mnemR Documentation

Plot convergence of EM

Description

This function plots the convergence of the different EM iterations (four figures, e.g. par(mfrow=(2,2))).

Usage

## S3 method for class 'mnem'
plotConvergence(x, col = NULL, type = "b", convergence = 0.1, ...)

Arguments

x

mnem object

col

vector of colors for the iterations

type

see ?plot.default

convergence

difference of when two log likelihoods are considered equal; see also convergence for the function mnem()

...

additional parameters for the plots/lines functions

Value

plot of EM convergence

Author(s)

Martin Pirkl

Examples

sim <- simData(Sgenes = 3, Egenes = 2, Nems = 2, mw = c(0.4,0.6))
data <- (sim$data - 0.5)/0.5
data <- data + rnorm(length(data), 0, 1)
result <- mnem(data, k = 2, starts = 1)
par(mfrow=c(2,2))
plotConvergence(result)

cbg-ethz/mnem documentation built on Nov. 7, 2024, 7:35 p.m.