*stable distrib in fBasics --> small Rmetrics package "stableDist" ?

Martin Maechler maechler at stat.math.ethz.ch
Wed Jan 12 10:30:45 CET 2011


Dear Diethelm and Yohan,

as you may recall, we (Marius Hofert and I) have been making use
of rstable() in our 'nacopula' package for more than a year now,
but back then, we found small numerical and efficiency problems
in  fBasics version of rstable and as we did not need any other
fBasics function, I wrote a new version called 'rstable1()'
{so as to make no confusion}, and also on its help page clearly
documented that the original code, and documentation, and d*,
p*, q* functions are all in 'fBasics'.

Now, for a while, as we have been implementing new Maximum
Likelihood methods for Archimdean copulas, we have made use
of fBasics::dstable(), and for that have had an
   importFrom(fBasics, dstable)
in our package.
I have always felt it a bit unconvenient that this loads all of
fBasics, timeDate, and timeSeries  just because of this one
function.

Now, I've found a numerical problem with dstable() and also
performance issues which I have partly adressend would like to
address more.

For all these reasons, I'm proposing to factor out the
[dpqr]stable() functions out of fBasics into a new package, say
'stableDist', and have fBasics "depend" on stableDist, such that
for the users who call require(fBasics) or library(fBasics),
nothing will change.

The big advantage of the change would be that all those users
(like us) who really only need the stable distributions, they
can simply  load or import from 'stableDist'  which will be very
fast and very small.

Another advantage will be that the unit tests for *stable
which are currently disabled in 'fBasics', can be run for
'stableDist' without adding test runtime to 'fBasics'.

My proposal is to factor out things as soon as you agree,
and then address the issues I've found one by one,
starting with dstable where I've already (uncommitted)
improvements ready.
BTW: The stableSlider() of course would remain in 'fBasics'.

Best regards,
Martin



More information about the Rmetrics-core mailing list