octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multivariate student t: normalization in mvtrnd


From: Iñigo Urteaga
Subject: Re: Multivariate student t: normalization in mvtrnd
Date: Thu, 29 Nov 2012 10:49:21 -0500

Hi Arno,

Thank you for your clarifying response. Based on our discussion, here
are my proposed lines for the mvtrnd help:

----------------
Usage tips
----------------

The argument SIGMA provided must be the correlation matrix and, if
not, it is normalized so that the resulting covariance of the obtained
samples follows:

cov(samples) = nu/(nu-2) * SIGMA./(sqrt(diag(SIGMA)*diag(SIGMA)))

In order to obtain samples distributed according to an standard
multivariate student's t, the correlation matrix must be equal to the
identity matrix I of dimension n ( mvtrnd(eye(n),nu,M) ).

Therefore, to generate multivariate student's t samples with arbitrary
covariance matrix V, any of the following scaling might be used:

(1) samples = diag(sqrt(diag(V))) * mvtrnd (V, nu, M)'
(2) samples = chol(V)' * mvtrnd(eye(n),nu,M)'

----------------

Let me know your opinion on this and, once again, thanks a lot for all
the support.

Iñigo

On Wed, Nov 28, 2012 at 4:36 PM, Arno Onken <address@hidden> wrote:
> Hi Iñigo,
>
> On 11/28/12 17:11, Iñigo Urteaga wrote:
>>> Well, it's not hard to rescale the result of mvtrnd to get an arbitrary
>>> covariance matrix. You might also want to add a constant to get a
>>> non-zero mean. In contrast to mvnrnd, mvtrnd doesn't have arguments for
>>> that.
>>
>> Yes, adding a non-zero mean is trivial, but how would you rescale the
>> result of mvtrnd to get an arbitrary covariance matrix? That is, if a
>> a covariance matrix V is provided, which is normalized by mvtrnd to
>> the correlation matrix R=V./(sqrt(diag(V)*diag(V))), then what is the
>> resulting covariance of the obtained samples in terms of V?
>
> The resulting covariance of the samples in terms of V is
> nu/(nu-2)*V./(sqrt(diag(V)*diag(V))). So the scaling
>
> samples = mvtrnd (V, nu, M) * diag (sqrt (diag (V));
>
> should do the trick - correct me if I'm wrong. That's the same
> "correlation to covariance" scaling that you would use for the
> multivariate normal if you had generated samples with a correlation matrix.
>
>>> mvtrnd just gives you the equivalent of the standard normal.
>>
>> As far I understand it, mvtrnd provides the standard student t
>> distribution only when the provided correlation matrix R is the
>> Identity matrix. For the rest of cases when R is not the identity
>> matrix, the resulting samples are not distributed according to the
>> standard t, am I right?
>
> I didn't mean it that literal. I just wanted to point out a conceptual
> similarity in terms of parametrization. You are right. The standard
> multivariate student t distribution is typically defined with R the
> identity matrix. mvtrnd doesn't provide the standard multivariate
> student t distribution if R is not the identity matrix (the marginals,
> however, will still be standard student t distributed). So it's
> conceptually similar in terms of mean and variance but not in terms of
> covariance.
>
> On a side note, there are actually cases in which it's nice to have the
> parametrization that mvtrnd has. For instance, if you want to generate
> student t copula samples, then you need exactly the parameter space that
> mvtrnd is designed for.
>
> Arno


reply via email to

[Prev in Thread] Current Thread [Next in Thread]