demvn: Evaluate the density of a multivariate Gaussian fit

Description Usage Arguments Details Value Author(s) Examples

View source: R/demvn.R

Description

Given a sample X, it gives a pointwise evaluation of the multivariate normal (MVN) density fit at position y.

Usage

1
demvn(y, X, log = FALSE, verbose = TRUE, alpha = 2, beta = 1.25)

Arguments

y

points at which the MVN is evaluated. It can be either a d-dimensional vector or an n by d matrix, each row indicating a different position.

X

an n by d matrix containing the data.

log

if TRUE the log-density is returned.

verbose

currently not used.

alpha

tuning parameter of robCov, see ?robCov for details.

beta

tuning parameter of robCov, see ?robCov for details.

Details

The covariance matrix is estimated robustly, using the robCov function.

Value

A vector where the i-th entry is the density corresponding to the i-th row of y.

Author(s)

Matteo Fasiolo <matteo.fasiolo@gmail.com> and Simon N. Wood.

Examples

1
2
3
library(esaddle)
X <- matrix(rnorm(2 * 1e3), 1e3, 2) # Sample used to fit a multivariate Gaussian
demvn(rnorm(2), X, log = TRUE)      # Evaluate the fitted log-density at a random location

esaddle documentation built on April 26, 2021, 5:06 p.m.

Related to demvn in esaddle...