[R] generating multivariate normal random numbers in C

Mathieu Ros mathieu at lecastor.net
Tue Jun 26 17:59:07 CEST 2001


>>>>> "TL" == Thomas Lumley <tlumley at u.washington.edu> disait:

    TL> On Tue, 26 Jun 2001, Mathieu Ros wrote:
    >> hello all, I'm looking for a C/C++ library (or algorithm) to
    >> compute draws from a multivariate normal distribution in order
    >> to do block sampling.  (I'm plugging my results in an R
    >> function so this is not really off topic ;)

    TL> In that case, why not use mvrnorm() in the MASS package? It's
    TL> not in C, but it doesn't need to be.

Well, as I just replied to prof. Rossini, I'm doing about 50000
iterations (up to 100000) with at least 88 parameters to update at each turn
(at least 2x4 + 2x40 if I do block sampling).
I don't know much about R/C interface but I believe it will slow down
my program if I call an R function to do the job.
My elementwise sampling algorithm (C code) takes between 3 and 4
hours to run (with intermediate data sets).
Thanks for the quick reply,
  Mathieu

-- 
Mathieu Ros
Laboratoire de Génétique Cellulaire
INRA-Toulouse [05 6128 5119]

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list