mbased_mve: Fit moment-based minimum volumen ellipsoids

View source: R/mbased_mve.R

mbased_mveR Documentation

Fit moment-based minimum volumen ellipsoids

Description

mbased_mve helps in finding the centroid and matrix that define a minimum volume ellipsoid as proposed by Moshtagh (2005).

Usage

mbased_mve(data, fitting_tolerance = 0.001)

Arguments

data

matrix of values to be used for fitting the ellipsoid. Columns represent dimensions and rows observations.

fitting_tolerance

(numeric) proportion of error allowed when checking if the ellipsoid incloses all values considered to fit it. Default = 0.001.

Details

The algorithm used to fit the ellipsoids here was implemented by Moshtagh (2005) and based on initial work of Khachiyan (1996) and Rocha et al. (2002).

Details about to the algortihm can be found in https://bit.ly/2XYWlVT, https://bit.ly/2x6aR2s, and https://bit.ly/2KrxE1g.

Value

A named list containing the values for the centroid of th ellipsoid and a matrix of covariance.

Examples

# reading data
occurrences <- read.csv(system.file("extdata", "occurrences.csv",
                                    package = "ellipsenm"))

# raster layers of environmental data
vars <- raster::stack(list.files(system.file("extdata", package = "ellipsenm"),
                                 pattern = "bio", full.names = TRUE))

data <- raster::extract(vars, occurrences[, -1])

mvellipsoid <- mbased_mve(data)

marlonecobos/ellipsenm documentation built on Oct. 18, 2023, 8:09 a.m.