Uses the law of total variance: \(Var(X) = E[Var(X|K)] + Var(E[X|K])\).

# S3 method for class 'mixture'
vcov(object, ...)

Arguments

object

A mixture object.

...

Additional arguments (not used).

Value

The variance (scalar for univariate mixtures).

Examples

m <- mixture(list(normal(0, 1), normal(10, 1)), c(0.5, 0.5))
vcov(m)
#> [1] 26