groupmoments: Finmix 'groupmoments' class constructor

Description Usage Arguments Value See Also Examples

Description

Calling groupmoments() creates an object holding various component-specific moments. These moments can only constructed if the fdata object contains in addition to observations also indicators defining from which component a certain observation stems.

Usage

1
groupmoments(value = fdata())

Arguments

value

An fdata object containing observations in slot y and indicators in slot S.

Value

A groupmoments object containing component-specific moments of the fdata object.

See Also

Examples

1
2
3
4
5
6
# Define a mixture model with exponential components.
f_model <- model("exponential", par = list(lambda = c(0.3, 0.7)), K = 2)
# Simulate data from the mixture model.
f_data <- simulate(f_model)
# Create group moments of the data.
groupmoments(f_data)

simonsays1980/finmix documentation built on Dec. 23, 2021, 2:25 a.m.