Method for obtaining the variance of empirical_dist object x.

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

Arguments

object

The empirical distribution object.

...

Additional arguments to pass (not used).

Value

The sample variance-covariance matrix.

Examples

ed <- empirical_dist(c(1, 2, 3, 4, 5))
vcov(ed) # sample variance
#>      [,1]
#> [1,]  2.5

ed_mv <- empirical_dist(matrix(rnorm(20), ncol = 2))
vcov(ed_mv) # 2x2 covariance matrix
#>            [,1]       [,2]
#> [1,] 2.27150319 0.03296811
#> [2,] 0.03296811 0.51994129