Extract Means of Mixture Components
mix_means(x)
numeric or list object
If a distributional object that is a mixture of two or more normal distributions is read in, the function will return a numeric object with the means of each normal component. If the distributional object is a mixture of two or more multivariate normal distributions, the function will return a list with the mean vectors of each multivariate normal component.
library(distributional)
mix_norm <- dist_mixture(comp1 = dist_normal(1, 10),
comp2 = dist_normal(1.5, 12),
weights = c(.5, .5))
mix_means(mix_norm)
#> comp1 comp2
#> 1.0 1.5