Skip to contents

Approximate the hypervolume of a multivariate dataset by assuming a truncated multivariate normal (TMVN) distribution within given radius.

Usage

hypvoltmvnorm(data, radius = NULL, ...)

Arguments

data

A numeric vector, matrix, or data frame. If a matrix or data frame, rows correspond to observations and columns correspond to variables. Categorical variables and missing values are not allowed.

radius

A numerical value specifying the radius to be used for truncating the multivariate Gaussian distribution. If not provided is set to \(sqrt(d+1)\), where \(d\) is the dimensionality of the data, i.e. number of columns of data.

...

Further arguments passed to or from other methods.

Value

Returns a list with the following components:

  • sigma The estimated covariance matrix.

  • radius The radius used for computation.

  • logvol The log of hypervolume.

  • logdens The smallest log-density for observed data points within the radius.

Author

Luca Scrucca

Examples

x1 = rnorm(1000)
x2 = 0.8*x1 + rnorm(1000)
x = cbind(x1, x2)
hypvoltmvnorm(x, radius = 1)
#> $sigma
#>          x1       x2
#> x1 1.001208 0.791094
#> x2 0.791094 1.654797
#> 
#> $radius
#> [1] 1
#> 
#> $logvol
#> [1] 1.159978
#> 
#> $logdens
#> [1] -2.351871
#>