[Rd] request for comments --- package "distr" --- S4 Classes
for Distributions
Warnes, Gregory R
gregory_r_warnes at groton.pfizer.com
Mon Feb 2 22:21:24 MET 2004
> -----Original Message-----
> From: Peter Ruckdeschel [mailto:Peter.Ruckdeschel at uni-bayreuth.de]
> Sent: Friday, January 30, 2004 1:12 PM
> To: r-devel at stat.math.ethz.ch
> Cc: Florian Camphausen; Josef Leydold; Thomas Stabla
> Subject: [Rd] request for comments --- package "distr" --- S4 Classes
> for Distributions
>
>
> 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.
Great!
>
> Our small group at Bayreuth now has developed a package "distr" which
> tries to fill this gap, implementing distributions by means of
> S4--classes.
You may find some value in looking at the Java distribution library that I
created a couple of years ago by porting the R distribution functions:
http://statdistlib.sourceforge.net/
A separate java implementation of the basic distribution classes is included
as part of the Hydra package for MCMC,
http://hydra-mcmc.sf.net
>
> 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)
I would recommend giving more descriptive names to the methods. In
particular would recommend 'pdf', 'cdf', 'quantile', and 'random' instead of
simply 'p', 'd', 'q', 'r' so that the expressions are very clear.
> as subclasses of either of the two the subclasses
> "AbscontDistribution" or
> " DiscreteDistribution".
It is not at all clear to me what an 'AbscontDistribution' is. Perhaps you
are referring to a continuous distribution?
You may also want to consider how to deal with multivariate distributions.
>
> This approach seems very appealing to us from a conceptual viewpoint:
>
Yes this is very interesting, particularly if you extend it to handle
multivariate distributions.
Good luck!
-Greg
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
More information about the R-devel
mailing list