as.fmx.mixEM: Convert 'mixEM' Objects to fmx Class

View source: R/as.fmx.R

as.fmx.mixEMR Documentation

Convert mixEM Objects to fmx Class

Description

To convert mixEM objects (from package mixtools) to fmx class.

Currently only the returned value of normalmixEM and gammamixEM are supported

Usage

## S3 method for class 'mixEM'
as.fmx(x, data = x[["x"]], ...)

Arguments

x

mixEM object

data

numeric vector

...

..

Value

Function as.fmx.mixEM() returns an fmx object.

Note

plot.mixEM not plot gammamixEM returns, as of 2022-09-19.

Examples

library(mixtools)
(wait = as.fmx(normalmixEM(faithful$waiting, k = 2)))
hist.default(faithful$waiting, freq = FALSE)
curve(dfmx(x, dist = wait), xlim = range(faithful$waiting), add = TRUE)


fmx documentation built on April 3, 2025, 7:09 p.m.