From: Przemyslaw Sliwa <sliwa@euv-frankfurt-o.de>
To: <ebenazer@email.arc.nasa.gov>
Cc: <gsl-discuss@sources.redhat.com>
Subject: Re: multivariate gaussian distribution (Code)
Date: Tue, 30 Dec 2003 10:55:00 -0000 [thread overview]
Message-ID: <35745.160.83.32.14.1072781716.squirrel@webmail.euv-frankfurt-o.de> (raw)
In-Reply-To: <20031229233500.GF5259@wow.arc.nasa.gov>
Hi Emmanuel,
You do not have to implement the cholesky method. It has been already
implented. I gave you some C code.
I do not know how people do it in R. But as I said in the previous
posting. The Cholesky decomposition is very effifcient method and has been
already implemented within the GSL framework. If you use the
Eigendecomposition it might happen that someone inputs a covariance matrix
which is not positive definite (imdefinite?). In this case the
eigendecomposition will still work witout signaling any errors. I have no
idea what will be the result if you generate the random vectors. Probably
they will be normally distributed with imdefinite covariance matrix which
is a very bad case. The Cholesky decomp. will fail in this case indicating
an error.
But it is up to you what you want to do. I am just saying there are
methods better than the Eigen with inefficient code. The same about the LU
decomposition.
kind regards,
Przem
> It is easy to implement the Cholesky method. I'll do it if
> people are interested.
>
> Once again though, the R statistical package
> (that is a well-known library) uses the eigenvalues decomposition:
> http://rweb.stat.umn.edu/R/library/MASS/html/mvrnorm.html
>
> Please take time to read the messages !
>
> Emmanuel
next prev parent reply other threads:[~2003-12-30 10:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-30 9:47 Emmanuel Benazera
2003-12-30 10:55 ` Przemyslaw Sliwa [this message]
2003-12-30 11:31 ` Przemyslaw Sliwa
-- strict thread matches above, loose matches on Subject: below --
2003-12-29 23:02 Przemyslaw Sliwa
2003-12-29 17:54 Emmanuel Benazera
2003-12-29 11:52 Przemyslaw Sliwa
2003-12-29 10:41 Przemyslaw Sliwa
2003-12-20 11:10 multivariate gaussian distribution Emmanuel Benazera
2003-12-22 14:21 ` Brian Gough
2003-12-28 10:29 ` multivariate gaussian distribution (Code) Emmanuel Benazera
2003-12-29 11:41 ` Brian Gough
2003-12-29 16:47 ` Emmanuel Benazera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35745.160.83.32.14.1072781716.squirrel@webmail.euv-frankfurt-o.de \
--to=sliwa@euv-frankfurt-o.de \
--cc=ebenazer@email.arc.nasa.gov \
--cc=gsl-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).