Re: Create independent Gamma RV with identity Covariance Matrix
- From: ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx (Roger Stafford)
- Date: Tue, 21 Feb 2006 16:24:08 GMT
In article
<ellieandrogerxyzzy-2002061631450001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx (Roger Stafford) wrote:
In article <ef29839.-1@xxxxxxxxxxxxxxxx>, "Dhiraj patil"---------------
<ddpq4f@xxxxxxxxx> wrote:
Hi--------------------
as a part of a project , i require to generate 4-dimension Gamma RV
with Identity Covariance matrix. with m (1 by 4) and p (1 by 4)
e.g g=Gamma(m,p)
I dont know how to create such a matrix which will obey condition of
having identity covariance Matrix
Thanks
Dhiraj
To get a covariance matrix equal to the identity matrix, all you need
are independent gamma distribution random variables to give zeros off the
diagonal and variances of one along the diagonal. The matlab statistics
toolbox function 'gamrnd' makes use of matlab's 'rand' or 'randn'
functions which automatically yield independent random variables. All you
need to do is to set up your parameters to produce a distribution with
unit variances. If you don't have that toolbox, it is easy to generate
the random variables yourself using the 'gammainc' and 'rand' functions.
You are lucky. What would be more challenging would be generating gamma
distribution random variables with prescribed non-zero off-diagonal
covariances.
Roger Stafford
I was mistaken yesterday in claiming that a gamma distribution random
variable can be generated using the 'gammainc' and 'rand' functions. To
use the 'rand' function for this purpose would require the *inverse* of
the incomplete gamma function.
(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford
.
- References:
- Create independent Gamma RV with identity Covariance Matrix
- From: Dhiraj patil
- Re: Create independent Gamma RV with identity Covariance Matrix
- From: Roger Stafford
- Create independent Gamma RV with identity Covariance Matrix
- Prev by Date: Re: Please help me on GUI problem
- Next by Date: Re: virtual device for data acquisition
- Previous by thread: Re: Create independent Gamma RV with identity Covariance Matrix
- Next by thread: Re: Create independent Gamma RV with identity Covariance Matrix
- Index(es):
Relevant Pages
|
Loading