[R] exponential of a matrix

Martin Maechler maechler at stat.math.ethz.ch
Fri Nov 14 18:03:47 CET 2008

>>>>> "PD" == Peter Dalgaard <p.dalgaard at biostat.ku.dk>
>>>>>     on Tue, 11 Nov 2008 23:46:49 +0100 writes:

    PD> Terry Therneau wrote:
    >> Is the matrix exponential available in some package?

    PD> Multiple. At least Matrix and msm. One of Jim Lindsey's
    PD> too, but I think that's one of the more dubious ones.

Note also that there has been  the  'expm'  package on R-forge
for a while now.

One reason why we haven't released it to CRAN yet,
is the slightly open issue on the default algorithm to be used.

    >> The cannonical reference is "Nineteen dubious ways to
    >> take the exponential of a matrix".  (Love that title)

    PD> Yes, it's a classic. As I recall it, the paper misses
    PD> one point, though: You often want a fast way of
    PD> computing exp(tQ) (or exp(tQ)%*%v or u%*%exp(tQ)) for
    PD> multiple values of t, and it is mainly about finding
    PD> exp(Q) as accurately as possible.

I think the paper mentions the problem "en passant";
also that (problem) is anotther important  "TODO" for us authors
of the expm package.

Incidentally, here at ETH we have a master's student working on
these issues for his master's thesis (ending around February'09).

Martin Maechler, ETH Zurich

More information about the R-help mailing list