R/mixture.R
vcov.mixture.Rd
Uses the law of total variance: Var(X)=E[Var(X|K)]+Var(E[X|K]).
# S3 method for class 'mixture' vcov(object, ...)
A mixture object.
mixture
Additional arguments (not used).
The variance (scalar for univariate mixtures).
m <- mixture(list(normal(0, 1), normal(10, 1)), c(0.5, 0.5)) vcov(m) #> [1] 26