Skip to contents

Mean, variance, standard deviation, median, mode, and covariance of a mvdist_normal() and friends. Not every family defines every moment upstream; unsupported combinations error naming the family (see the Details in mvdist_marginal()).

Usage

mvdist_mean(mv)

mvdist_variance(mv)

mvdist_sd(mv)

mvdist_median(mv)

mvdist_mode(mv)

mvdist_covariance(mv)

Arguments

mv

a corehydro_mvdist.

Value

a numeric vector of length mvdist_dimension() (mvdist_mean(), mvdist_variance(), mvdist_sd(), mvdist_median(), mvdist_mode()), or a d x d matrix (mvdist_covariance()).

Examples

mv <- mvdist_normal(c(1, 2), diag(2))
mvdist_mean(mv)
#> [1] 1 2
mvdist_covariance(mv)
#>      [,1] [,2]
#> [1,]    1    0
#> [2,]    0    1