Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

EmpiricalMVDistribution

Generating function for mulitvariate discrete distribution


Description

Generates an object of class "DiscreteMVDistribution".

Usage

EmpiricalMVDistribution(data, Symmetry = NoSymmetry())

Arguments

data

numeric matrix with data where the rows are interpreted as observations.

Symmetry

you may help R in calculations if you tell it whether the distribution is non-symmetric (default) or symmetric with respect to a center.

Details

The function is a simple utility function providing a wrapper to the generating function DiscreteDistribution.

Typical usages are

EmpiricalMVDistribution(data)

Identical rows are collapsed to unique support values. If prob is missing, all elements in supp are equally weighted.

Value

Object of class "DiscreteMVDistribution"

Author(s)

See Also

Examples

## generate some data
X <- matrix(rnorm(50), ncol = 5)

## empirical distribution of X
D1 <- EmpiricalMVDistribution(data = X)
support(D1)
r(D1)(10)

distrEx

Extensions of Package 'distr'

v2.8.0
LGPL-3
Authors
Matthias Kohl [cre, cph], Peter Ruckdeschel [aut, cph]
Initial release
2019-03-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.