# [Distr-commits] r1076 - in pkg/distrEx: R man

Sun Nov 8 18:59:02 CET 2015

Author: stamats
Date: 2015-11-08 18:59:02 +0100 (Sun, 08 Nov 2015)
New Revision: 1076

pkg/distrEx/R/EmpiricalMVDistribution.R
pkg/distrEx/man/EmpiricalMVDistribution.Rd
Log:
EmpiricalMVDistribution was missing from branch 2.6

===================================================================
--- pkg/distrEx/R/EmpiricalMVDistribution.R	                        (rev 0)
+++ pkg/distrEx/R/EmpiricalMVDistribution.R	2015-11-08 17:59:02 UTC (rev 1076)
@@ -0,0 +1,7 @@
+###############################################################################
+## Generating function to generate empirical distribution given some data
+###############################################################################
+
+EmpiricalMVDistribution <- function(data, Symmetry = NoSymmetry()){
+  DiscreteMVDistribution(supp = data, Symmetry = Symmetry)
+}

===================================================================
--- pkg/distrEx/man/EmpiricalMVDistribution.Rd	                        (rev 0)
+++ pkg/distrEx/man/EmpiricalMVDistribution.Rd	2015-11-08 17:59:02 UTC (rev 1076)
@@ -0,0 +1,49 @@
+\name{EmpiricalMVDistribution}
+\alias{EmpiricalMVDistribution}
+
+\title{Generating function for mulitvariate discrete distribution}
+\description{
+  Generates an object of class \code{"DiscreteMVDistribution"}.
+}
+\usage{
+EmpiricalMVDistribution(data, Symmetry = NoSymmetry())
+}
+\arguments{
+  \item{data}{ numeric matrix with data where the rows are
+    interpreted as observations. }
+  \item{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
+
+  Typical usages are
+  \preformatted{
+    EmpiricalMVDistribution(data)
+  }
+
+  Identical rows are collapsed to unique support values.
+  If \code{prob} is missing, all elements in \code{supp}
+  are equally weighted.
+}
+\value{Object of class \code{"DiscreteMVDistribution"}}
+%\references{}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+\examples{
+## generate some data
+X <- matrix(rnorm(50), ncol = 5)
+
+## empirical distribution of X
+D1 <- EmpiricalMVDistribution(data = X)
+support(D1)
+r(D1)(10)
+}
+\concept{multivariate distribution}
+\concept{empirical distribution}
+\keyword{distribution}
+\concept{S4 distribution class}
+\concept{generating function}