sdatamoments: Finmix 'sdatamoments' constructor

Description Usage Arguments Value See Also Examples

Description

Calling sdatamoments() constructs an object of class sdatamoments or csdatamoments depending on the type slot of the argument value. If this slot is "discrete" an sdatamoments object is returned and if the slot is "continuous", a csdatamoments object is returned.

Usage

1
sdatamoments(value = fdata())

Arguments

value

An fdata object containing the indicators for which moments should be calculated.

Value

If slot type of the argument value is "discrete" an sdatamoments object is returned and if the slot is "continuous", a csdatamoments object is returned.

See Also

Examples

1
2
3
4
5
6
# Define a model of exponential mixtures.
f_model <- model("exponential", par = list(lambda = c(0.3, 0.7)), K = 2)
# Simulate data from the model.
f_data <- simulate(f_model)
# Compute data moments for the indicators.
sdatamoments(f_data)

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