[Rd] request for comments --- package "distr" --- S4 Classes for
Distributions
Peter Ruckdeschel
Peter.Ruckdeschel at uni-bayreuth.de
Fri Jan 30 19:11:58 MET 2004
Hello,
after some discussions with Martin Maechler and Josef Leydold (WU Wien),
we have felt the need for some package that should allow for an
object-orientated
approach to distributions.
Our small group at Bayreuth now has developed a package "distr" which
tries to fill this gap, implementing distributions by means of
S4--classes.
A mother class "Distribution" is introduced with slots for a parameter
and -
most important - for the four constitutive methods "r", "d", "p", and "q"
(alluding to the corresponding naming already used for these functions
in S).
All distributions of the " base" package for which such "r", "d", "p",
and "q"
functions exist are implemented (essentially by wrappers of the
origininal code)
as subclasses of either of the two the subclasses "AbscontDistribution" or
" DiscreteDistribution".
This approach seems very appealing to us from a conceptual viewpoint:
Just pass an object of some derived distribution class to a generic
function as
argument and let the dispatching mechanism decide what to do on run-time.
As an example, we may automatically generate new objects of these classes
with corresponding "r", "d", "p", and "q"-slots for the laws of r.v.'s
under
standard mathematical univariate transformations and under convolution of
independent r.v.'s.:
For "Distribution" objects X and Y expressions like 3*X+sin(exp(-Y/4+3))
have their natural interpretation as corresponding image distributions.
To get an impression of what is possible confer the demos on the cited
http-reference below.
Additionally, we also provide classes for a standardized treatment of
simulations (also under contaminations) and evaluations of statistical
procedures on such simulations.
For details we invite the interested R-user /R-developer to
http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/
-- or more directly to a detailed manual
http://www.uni-bayreuth.de/departments/math/org/mathe7/DISTR/distr.pdf
Before announcing this package to a broader audience, however,
we would be glad to receive some feed-back from a competent audience,
i.e. you :-)
as to comments and improvements.
In particular, the package is intended to be open for extensions for
which we
definitely lack the know-how to do it "right", like implementation of
multivariate
distributions, conditional distributions and formula for copula.
So anyone who likes to join us in further development is welcome.
In order to at l(e)ast send a running package, we stopped the development
for "release 1" at a certain stage, well having in mind some improvements/
extensions -- c.f. section "Odds and ends" in the manual.
Thank you already for your attention.
--
Peter Ruckdeschel
Matthias Kohl
Thomas Stabla
Florian Camphausen
More information about the R-devel
mailing list