# [Distr-commits] r990 - in branches/distr-2.6/pkg/distrEx: R inst man

Sun Jan 25 15:20:44 CET 2015

Author: ruckdeschel
Date: 2015-01-25 15:20:44 +0100 (Sun, 25 Jan 2015)
New Revision: 990

Modified:
branches/distr-2.6/pkg/distrEx/R/CvMDist.R
branches/distr-2.6/pkg/distrEx/inst/NEWS
branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd
Log:
[distrEx] changed default integration measure for CvM distance from e2 to e1 -> in CvM - MDE now by default integration is done according to empirical cdf

Modified: branches/distr-2.6/pkg/distrEx/R/CvMDist.R
===================================================================
--- branches/distr-2.6/pkg/distrEx/R/CvMDist.R	2015-01-15 23:00:35 UTC (rev 989)
+++ branches/distr-2.6/pkg/distrEx/R/CvMDist.R	2015-01-25 14:20:44 UTC (rev 990)
@@ -4,7 +4,7 @@
###############################################################################
setMethod("CvMDist", signature(e1 = "UnivariateDistribution",
e2 = "UnivariateDistribution"),
-    function(e1, e2, mu = e2, useApply = FALSE, ... ){
+    function(e1, e2, mu = e1, useApply = FALSE, ... ){
o.warn <- getOption("warn"); options(warn = -1)
on.exit(options(warn=o.warn))
if(is.null(e1 at p)){
@@ -25,12 +25,13 @@
## CvM distance
setMethod("CvMDist", signature(e1 = "numeric",
e2 = "UnivariateDistribution"),
-    function(e1, e2, mu = e2, ...)
+    function(e1, e2, mu = e1, ...)
{ o.warn <- getOption("warn"); options(warn = -1)
on.exit(options(warn=o.warn))
if(identical(mu,e2))
return(.newCvMDist(e1,e2))
e10 <- DiscreteDistribution(e1)
+          if(identical(mu,e1)) mu <- e10
CvMDist(e1 = e10, e2 = e2, mu = mu, ...)
}
)

Modified: branches/distr-2.6/pkg/distrEx/inst/NEWS
===================================================================
--- branches/distr-2.6/pkg/distrEx/inst/NEWS	2015-01-15 23:00:35 UTC (rev 989)
+++ branches/distr-2.6/pkg/distrEx/inst/NEWS	2015-01-25 14:20:44 UTC (rev 990)
@@ -12,6 +12,7 @@
##############

user-visible CHANGES:
++ changed default integration measure from e2 to e1 in CvMdist
+ title changed to title style / capitalization
+ added generating function "EmpiricalMVDistribution" for computing
empirical distribution of multivariate data

Modified: branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd
===================================================================
--- branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd	2015-01-15 23:00:35 UTC (rev 989)
+++ branches/distr-2.6/pkg/distrEx/man/CvMDist.Rd	2015-01-25 14:20:44 UTC (rev 990)
@@ -17,8 +17,8 @@
}
\usage{
CvMDist(e1, e2, ...)
-\S4method{CvMDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e2, useApply = FALSE, ...)
-\S4method{CvMDist}{numeric,UnivariateDistribution}(e1, e2, mu = e2, ...)
+\S4method{CvMDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e1, useApply = FALSE, ...)
+\S4method{CvMDist}{numeric,UnivariateDistribution}(e1, e2, mu = e1, ...)
}
\arguments{
\item{e1}{ object of class \code{"Distribution"} or class \code{"numeric"} }