[Distr-commits] r318 - branches/distr-2.1/pkg/distrEx/R branches/distr-2.1/pkg/distrEx/man pkg/distrEx/R pkg/distrEx/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 29 19:32:24 CET 2008
Author: ruckdeschel
Date: 2008-10-29 19:32:24 +0100 (Wed, 29 Oct 2008)
New Revision: 318
Modified:
branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R
branches/distr-2.1/pkg/distrEx/R/ContaminationSize.R
branches/distr-2.1/pkg/distrEx/R/ConvexContamination.R
branches/distr-2.1/pkg/distrEx/R/Expectation.R
branches/distr-2.1/pkg/distrEx/R/HellingerDist.R
branches/distr-2.1/pkg/distrEx/R/KolmogorovDist.R
branches/distr-2.1/pkg/distrEx/R/TotalVarDist.R
branches/distr-2.1/pkg/distrEx/man/ContaminationSize.Rd
branches/distr-2.1/pkg/distrEx/man/ConvexContamination.Rd
branches/distr-2.1/pkg/distrEx/man/E.Rd
branches/distr-2.1/pkg/distrEx/man/HellingerDist.Rd
branches/distr-2.1/pkg/distrEx/man/KolmogorovDist.Rd
branches/distr-2.1/pkg/distrEx/man/TotalVarDist.Rd
branches/distr-2.1/pkg/distrEx/man/m1df.Rd
branches/distr-2.1/pkg/distrEx/man/m2df.Rd
pkg/distrEx/R/ClippedMoments.R
pkg/distrEx/R/ContaminationSize.R
pkg/distrEx/R/ConvexContamination.R
pkg/distrEx/R/Expectation.R
pkg/distrEx/R/HellingerDist.R
pkg/distrEx/R/KolmogorovDist.R
pkg/distrEx/R/TotalVarDist.R
pkg/distrEx/man/ContaminationSize.Rd
pkg/distrEx/man/ConvexContamination.Rd
pkg/distrEx/man/E.Rd
pkg/distrEx/man/HellingerDist.Rd
pkg/distrEx/man/KolmogorovDist.Rd
pkg/distrEx/man/TotalVarDist.Rd
pkg/distrEx/man/m1df.Rd
pkg/distrEx/man/m2df.Rd
Log:
some explicit methods for LatticeDistribution, as due to setIs Relation
it may no longer be inherited automatically from DiscreteDistribution
since JMC's changes in S4 inheritance mechanism Sep/Oct 08 ... let's see
if this helps in ROptEst ' s problems with discrete models ...
Modified: branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -117,3 +117,13 @@
dfr <- df(object)
return(dfr*(dfr+2)*pchisq(upper, df = (dfr+4)))
})
+setMethod("m1df", "LatticeDistribution",
+ function(object, upper)
+ getMethod("m1df", "DiscreteDistribution")(
+ as(object, "DiscreteDistribution"), upper)
+ )
+setMethod("m2df", "LatticeDistribution",
+ function(object, upper)
+ getMethod("m2df", "DiscreteDistribution")(
+ as(object, "DiscreteDistribution"), upper)
+ )
Modified: branches/distr-2.1/pkg/distrEx/R/ContaminationSize.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/ContaminationSize.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/ContaminationSize.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -56,3 +56,17 @@
return(list(e1 = e1, e2 = e2, size.of.contamination = res))
})
+setMethod("ContaminationSize", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("ContaminationSize", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: branches/distr-2.1/pkg/distrEx/R/ConvexContamination.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/ConvexContamination.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/ConvexContamination.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -225,3 +225,23 @@
return(flat.mix(UnivarMixingDistribution(e1, e2,
mixCoeff = c(1-size,size))))
})
+setMethod("ConvexContamination", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution",
+ size = "numeric"),
+ getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
+
+setMethod("ConvexContamination", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric"),
+ getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
+
+setMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution",
+ size = "numeric"),
+getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
Modified: branches/distr-2.1/pkg/distrEx/R/Expectation.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/Expectation.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/Expectation.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -25,6 +25,14 @@
return(sum(supp * dfun(supp)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "missing",
+ cond = "missing"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "missing",
+ cond = "missing"))
+
+
setMethod("E", signature(object = "AffLinDistribution",
fun = "missing",
cond = "missing"),
@@ -116,6 +124,13 @@
}
return(sum(integrand(x = supp, dfun = d(object), fun = fun, ...)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "function",
+ cond = "missing"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "function",
+ cond = "missing"))
+
setMethod("E", signature(object = "MultivariateDistribution",
fun = "function",
cond = "missing"),
@@ -188,6 +203,12 @@
else
return(sum(fct(x = supp, dfun = d(object), cond = cond)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "missing",
+ cond = "numeric"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "missing",
+ cond = "numeric"))
setMethod("E", signature(object = "UnivariateCondDistribution",
fun = "function",
cond = "numeric"),
@@ -270,7 +291,14 @@
return(sum(fct(x = supp, dfun = d(object), fun = fun,
cond = cond, ...)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "function",
+ cond = "numeric"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "function",
+ cond = "numeric"))
+
### added 29-03-06 P.R.
# some exact expectations:
setMethod("E", signature(object = "Norm",
Modified: branches/distr-2.1/pkg/distrEx/R/HellingerDist.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/HellingerDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/HellingerDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -117,3 +117,17 @@
res
})
+setMethod("HellingerDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("HellingerDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: branches/distr-2.1/pkg/distrEx/R/KolmogorovDist.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/KolmogorovDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/KolmogorovDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -148,3 +148,17 @@
return(res)
})
+setMethod("KolmogorovDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("KolmogorovDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: branches/distr-2.1/pkg/distrEx/R/TotalVarDist.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/TotalVarDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/R/TotalVarDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -120,3 +120,17 @@
names(res) <- "total variation distance"
res
})
+setMethod("TotalVarDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("TotalVarDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: branches/distr-2.1/pkg/distrEx/man/ContaminationSize.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/ContaminationSize.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/ContaminationSize.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -3,6 +3,9 @@
\alias{ContaminationSize-methods}
\alias{ContaminationSize,AbscontDistribution,AbscontDistribution-method}
\alias{ContaminationSize,DiscreteDistribution,DiscreteDistribution-method}
+\alias{ContaminationSize,LatticeDistribution,DiscreteDistribution-method}
+\alias{ContaminationSize,DiscreteDistribution,LatticeDistribution-method}
+\alias{ContaminationSize,LatticeDistribution,LatticeDistribution-method}
\alias{ContaminationSize,AcDcLcDistribution,AcDcLcDistribution-method}
\title{Generic Function for the Computation of the Convex Contamination
Modified: branches/distr-2.1/pkg/distrEx/man/ConvexContamination.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/ConvexContamination.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/ConvexContamination.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{ConvexContamination,AbscontDistribution,AbscontDistribution,numeric-method}
\alias{ConvexContamination,AbscontDistribution,UnivariateDistribution,numeric-method}
\alias{ConvexContamination,DiscreteDistribution,DiscreteDistribution,numeric-method}
+\alias{ConvexContamination,LatticeDistribution,DiscreteDistribution,numeric-method}
+\alias{ConvexContamination,DiscreteDistribution,LatticeDistribution,numeric-method}
+\alias{ConvexContamination,LatticeDistribution,LatticeDistribution,numeric-method}
\alias{ConvexContamination,AcDcLcDistribution,AcDcLcDistribution,numeric-method}
\title{Generic Function for Generating Convex Contaminations}
Modified: branches/distr-2.1/pkg/distrEx/man/E.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/E.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/E.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{E,UnivariateDistribution,missing,missing-method}
\alias{E,AbscontDistribution,missing,missing-method}
\alias{E,DiscreteDistribution,missing,missing-method}
+\alias{E,LatticeDistribution,missing,missing-method}
\alias{E,AffLinDistribution,missing,missing-method}
\alias{E,AffLinAbscontDistribution,missing,missing-method}
\alias{E,AffLinDiscreteDistribution,missing,missing-method}
@@ -15,17 +16,20 @@
\alias{E,UnivariateDistribution,function,missing-method}
\alias{E,AbscontDistribution,function,missing-method}
\alias{E,DiscreteDistribution,function,missing-method}
+\alias{E,LatticeDistribution,function,missing-method}
\alias{E,MultivariateDistribution,function,missing-method}
\alias{E,DiscreteMVDistribution,function,missing-method}
\alias{E,UnivarLebDecDistribution,function,missing-method}
\alias{E,UnivariateCondDistribution,missing,numeric-method}
\alias{E,AbscontCondDistribution,missing,numeric-method}
\alias{E,DiscreteCondDistribution,missing,numeric-method}
+\alias{E,LatticeCondDistribution,missing,numeric-method}
\alias{E,UnivarLebDecDistribution,missing,ANY-method}
\alias{E,UnivarLebDecDistribution,function,ANY-method}
\alias{E,UnivariateCondDistribution,function,numeric-method}
\alias{E,AbscontCondDistribution,function,numeric-method}
\alias{E,DiscreteCondDistribution,function,numeric-method}
+\alias{E,LatticeDistribution,function,numeric-method}
\alias{E,Beta,missing,missing-method}
\alias{E,Binom,missing,missing-method}
\alias{E,Cauchy,missing,missing-method}
Modified: branches/distr-2.1/pkg/distrEx/man/HellingerDist.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/HellingerDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/HellingerDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{HellingerDist,AbscontDistribution,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{HellingerDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{HellingerDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{HellingerDist,LatticeDistribution,LatticeDistribution-method}
\alias{HellingerDist,numeric,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,numeric-method}
\alias{HellingerDist,numeric,AbscontDistribution-method}
Modified: branches/distr-2.1/pkg/distrEx/man/KolmogorovDist.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/KolmogorovDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/KolmogorovDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{KolmogorovDist,AbscontDistribution,DiscreteDistribution-method}
\alias{KolmogorovDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{KolmogorovDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{KolmogorovDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{KolmogorovDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{KolmogorovDist,LatticeDistribution,LatticeDistribution-method}
\alias{KolmogorovDist,numeric,UnivariateDistribution-method}
\alias{KolmogorovDist,UnivariateDistribution,numeric-method}
\alias{KolmogorovDist,AcDcLcDistribution,AcDcLcDistribution-method}
Modified: branches/distr-2.1/pkg/distrEx/man/TotalVarDist.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/TotalVarDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/TotalVarDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{TotalVarDist,AbscontDistribution,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{TotalVarDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{TotalVarDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{TotalVarDist,LatticeDistribution,LatticeDistribution-method}
\alias{TotalVarDist,numeric,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,numeric-method}
\alias{TotalVarDist,numeric,AbscontDistribution-method}
Modified: branches/distr-2.1/pkg/distrEx/man/m1df.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/m1df.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/m1df.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{m1df,UnivariateDistribution-method}
\alias{m1df,AbscontDistribution-method}
\alias{m1df,DiscreteDistribution-method}
+\alias{m1df,LatticeDistribution-method}
\alias{m1df,Binom-method}
\alias{m1df,Pois-method}
\alias{m1df,Norm-method}
Modified: branches/distr-2.1/pkg/distrEx/man/m2df.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/m2df.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ branches/distr-2.1/pkg/distrEx/man/m2df.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{m2df,UnivariateDistribution-method}
\alias{m2df,AbscontDistribution-method}
\alias{m2df,DiscreteDistribution-method}
+\alias{m2df,LatticeDistribution-method}
\alias{m2df,Binom-method}
\alias{m2df,Pois-method}
\alias{m2df,Norm-method}
Modified: pkg/distrEx/R/ClippedMoments.R
===================================================================
--- pkg/distrEx/R/ClippedMoments.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/ClippedMoments.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -117,3 +117,13 @@
dfr <- df(object)
return(dfr*(dfr+2)*pchisq(upper, df = (dfr+4)))
})
+setMethod("m1df", "LatticeDistribution",
+ function(object, upper)
+ getMethod("m1df", "DiscreteDistribution")(
+ as(object, "DiscreteDistribution"), upper)
+ )
+setMethod("m2df", "LatticeDistribution",
+ function(object, upper)
+ getMethod("m2df", "DiscreteDistribution")(
+ as(object, "DiscreteDistribution"), upper)
+ )
Modified: pkg/distrEx/R/ContaminationSize.R
===================================================================
--- pkg/distrEx/R/ContaminationSize.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/ContaminationSize.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -56,3 +56,17 @@
return(list(e1 = e1, e2 = e2, size.of.contamination = res))
})
+setMethod("ContaminationSize", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("ContaminationSize", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("ContaminationSize", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: pkg/distrEx/R/ConvexContamination.R
===================================================================
--- pkg/distrEx/R/ConvexContamination.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/ConvexContamination.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -225,3 +225,23 @@
return(flat.mix(UnivarMixingDistribution(e1, e2,
mixCoeff = c(1-size,size))))
})
+setMethod("ConvexContamination", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution",
+ size = "numeric"),
+ getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
+
+setMethod("ConvexContamination", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric"),
+ getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
+
+setMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution",
+ size = "numeric"),
+getMethod("ConvexContamination", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution",
+ size = "numeric")))
Modified: pkg/distrEx/R/Expectation.R
===================================================================
--- pkg/distrEx/R/Expectation.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/Expectation.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -25,6 +25,14 @@
return(sum(supp * dfun(supp)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "missing",
+ cond = "missing"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "missing",
+ cond = "missing"))
+
+
setMethod("E", signature(object = "AffLinDistribution",
fun = "missing",
cond = "missing"),
@@ -116,6 +124,13 @@
}
return(sum(integrand(x = supp, dfun = d(object), fun = fun, ...)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "function",
+ cond = "missing"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "function",
+ cond = "missing"))
+
setMethod("E", signature(object = "MultivariateDistribution",
fun = "function",
cond = "missing"),
@@ -188,6 +203,12 @@
else
return(sum(fct(x = supp, dfun = d(object), cond = cond)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "missing",
+ cond = "numeric"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "missing",
+ cond = "numeric"))
setMethod("E", signature(object = "UnivariateCondDistribution",
fun = "function",
cond = "numeric"),
@@ -270,7 +291,14 @@
return(sum(fct(x = supp, dfun = d(object), fun = fun,
cond = cond, ...)))
})
+setMethod("E", signature(object = "LatticeDistribution",
+ fun = "function",
+ cond = "numeric"),
+ getMethod("E", signature(object = "DiscreteDistribution",
+ fun = "function",
+ cond = "numeric"))
+
### added 29-03-06 P.R.
# some exact expectations:
setMethod("E", signature(object = "Norm",
Modified: pkg/distrEx/R/HellingerDist.R
===================================================================
--- pkg/distrEx/R/HellingerDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/HellingerDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -117,3 +117,17 @@
res
})
+setMethod("HellingerDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("HellingerDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("HellingerDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: pkg/distrEx/R/KolmogorovDist.R
===================================================================
--- pkg/distrEx/R/KolmogorovDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/KolmogorovDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -148,3 +148,17 @@
return(res)
})
+setMethod("KolmogorovDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("KolmogorovDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("KolmogorovDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: pkg/distrEx/R/TotalVarDist.R
===================================================================
--- pkg/distrEx/R/TotalVarDist.R 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/R/TotalVarDist.R 2008-10-29 18:32:24 UTC (rev 318)
@@ -120,3 +120,17 @@
names(res) <- "total variation distance"
res
})
+setMethod("TotalVarDist", signature(e1 = "LatticeDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("TotalVarDist", signature(e1 = "LatticeDistribution",
+ e2 = "DiscreteDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
+
+setMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "LatticeDistribution"),
+ getMethod("TotalVarDist", signature(e1 = "DiscreteDistribution",
+ e2 = "DiscreteDistribution")))
Modified: pkg/distrEx/man/ContaminationSize.Rd
===================================================================
--- pkg/distrEx/man/ContaminationSize.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/ContaminationSize.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -3,6 +3,9 @@
\alias{ContaminationSize-methods}
\alias{ContaminationSize,AbscontDistribution,AbscontDistribution-method}
\alias{ContaminationSize,DiscreteDistribution,DiscreteDistribution-method}
+\alias{ContaminationSize,LatticeDistribution,DiscreteDistribution-method}
+\alias{ContaminationSize,DiscreteDistribution,LatticeDistribution-method}
+\alias{ContaminationSize,LatticeDistribution,LatticeDistribution-method}
\alias{ContaminationSize,AcDcLcDistribution,AcDcLcDistribution-method}
\title{Generic Function for the Computation of the Convex Contamination
Modified: pkg/distrEx/man/ConvexContamination.Rd
===================================================================
--- pkg/distrEx/man/ConvexContamination.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/ConvexContamination.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{ConvexContamination,AbscontDistribution,AbscontDistribution,numeric-method}
\alias{ConvexContamination,AbscontDistribution,UnivariateDistribution,numeric-method}
\alias{ConvexContamination,DiscreteDistribution,DiscreteDistribution,numeric-method}
+\alias{ConvexContamination,LatticeDistribution,DiscreteDistribution,numeric-method}
+\alias{ConvexContamination,DiscreteDistribution,LatticeDistribution,numeric-method}
+\alias{ConvexContamination,LatticeDistribution,LatticeDistribution,numeric-method}
\alias{ConvexContamination,AcDcLcDistribution,AcDcLcDistribution,numeric-method}
\title{Generic Function for Generating Convex Contaminations}
Modified: pkg/distrEx/man/E.Rd
===================================================================
--- pkg/distrEx/man/E.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/E.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{E,UnivariateDistribution,missing,missing-method}
\alias{E,AbscontDistribution,missing,missing-method}
\alias{E,DiscreteDistribution,missing,missing-method}
+\alias{E,LatticeDistribution,missing,missing-method}
\alias{E,AffLinDistribution,missing,missing-method}
\alias{E,AffLinAbscontDistribution,missing,missing-method}
\alias{E,AffLinDiscreteDistribution,missing,missing-method}
@@ -15,17 +16,20 @@
\alias{E,UnivariateDistribution,function,missing-method}
\alias{E,AbscontDistribution,function,missing-method}
\alias{E,DiscreteDistribution,function,missing-method}
+\alias{E,LatticeDistribution,function,missing-method}
\alias{E,MultivariateDistribution,function,missing-method}
\alias{E,DiscreteMVDistribution,function,missing-method}
\alias{E,UnivarLebDecDistribution,function,missing-method}
\alias{E,UnivariateCondDistribution,missing,numeric-method}
\alias{E,AbscontCondDistribution,missing,numeric-method}
\alias{E,DiscreteCondDistribution,missing,numeric-method}
+\alias{E,LatticeCondDistribution,missing,numeric-method}
\alias{E,UnivarLebDecDistribution,missing,ANY-method}
\alias{E,UnivarLebDecDistribution,function,ANY-method}
\alias{E,UnivariateCondDistribution,function,numeric-method}
\alias{E,AbscontCondDistribution,function,numeric-method}
\alias{E,DiscreteCondDistribution,function,numeric-method}
+\alias{E,LatticeDistribution,function,numeric-method}
\alias{E,Beta,missing,missing-method}
\alias{E,Binom,missing,missing-method}
\alias{E,Cauchy,missing,missing-method}
Modified: pkg/distrEx/man/HellingerDist.Rd
===================================================================
--- pkg/distrEx/man/HellingerDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/HellingerDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{HellingerDist,AbscontDistribution,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{HellingerDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{HellingerDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{HellingerDist,LatticeDistribution,LatticeDistribution-method}
\alias{HellingerDist,numeric,DiscreteDistribution-method}
\alias{HellingerDist,DiscreteDistribution,numeric-method}
\alias{HellingerDist,numeric,AbscontDistribution-method}
Modified: pkg/distrEx/man/KolmogorovDist.Rd
===================================================================
--- pkg/distrEx/man/KolmogorovDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/KolmogorovDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{KolmogorovDist,AbscontDistribution,DiscreteDistribution-method}
\alias{KolmogorovDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{KolmogorovDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{KolmogorovDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{KolmogorovDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{KolmogorovDist,LatticeDistribution,LatticeDistribution-method}
\alias{KolmogorovDist,numeric,UnivariateDistribution-method}
\alias{KolmogorovDist,UnivariateDistribution,numeric-method}
\alias{KolmogorovDist,AcDcLcDistribution,AcDcLcDistribution-method}
Modified: pkg/distrEx/man/TotalVarDist.Rd
===================================================================
--- pkg/distrEx/man/TotalVarDist.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/TotalVarDist.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -5,6 +5,9 @@
\alias{TotalVarDist,AbscontDistribution,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,AbscontDistribution-method}
+\alias{TotalVarDist,LatticeDistribution,DiscreteDistribution-method}
+\alias{TotalVarDist,DiscreteDistribution,LatticeDistribution-method}
+\alias{TotalVarDist,LatticeDistribution,LatticeDistribution-method}
\alias{TotalVarDist,numeric,DiscreteDistribution-method}
\alias{TotalVarDist,DiscreteDistribution,numeric-method}
\alias{TotalVarDist,numeric,AbscontDistribution-method}
Modified: pkg/distrEx/man/m1df.Rd
===================================================================
--- pkg/distrEx/man/m1df.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/m1df.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{m1df,UnivariateDistribution-method}
\alias{m1df,AbscontDistribution-method}
\alias{m1df,DiscreteDistribution-method}
+\alias{m1df,LatticeDistribution-method}
\alias{m1df,Binom-method}
\alias{m1df,Pois-method}
\alias{m1df,Norm-method}
Modified: pkg/distrEx/man/m2df.Rd
===================================================================
--- pkg/distrEx/man/m2df.Rd 2008-10-29 17:41:28 UTC (rev 317)
+++ pkg/distrEx/man/m2df.Rd 2008-10-29 18:32:24 UTC (rev 318)
@@ -4,6 +4,7 @@
\alias{m2df,UnivariateDistribution-method}
\alias{m2df,AbscontDistribution-method}
\alias{m2df,DiscreteDistribution-method}
+\alias{m2df,LatticeDistribution-method}
\alias{m2df,Binom-method}
\alias{m2df,Pois-method}
\alias{m2df,Norm-method}
More information about the Distr-commits
mailing list