The total number of parameters is the sum of component parameters plus the number of mixing weights.

# S3 method for class 'mixture'
nparams(x)

Arguments

x

A mixture object.

Value

An integer count of parameters.

Examples

m <- mixture(list(normal(0, 1), normal(5, 2)), c(0.3, 0.7))
nparams(m)
#> [1] 6