i am trying to evaluate the pdf for various points that are
distributed according to a multivariate Student t distribution. all
the stat texts tell me that the multivariate t distribution pdf takes
three parameters: a mean mu and a correlation matrix C, and a degrees-
of-freedom parameter (and the point to evaluate the pdf on obviously.)
the 'mvtpdf' function in matlab takes only two arguments: a degrees-of-
freedom parameter and a correlation matrix C. what happened to the mu
(mean) parameter? is there a way to evaluate this pdf in matlab
according to the parametrization i have above?
thank you.
Strictly speaking, the multivariate t has two parameters, but it's often the case that people add scale and location to that, and a simple transformation does the trick. It's easy to compute the PDF for such a thing by unscaling and unshifting your data, then using MVTPDF and the usual rules for the PDF of a transformed variable.
Hope this helps.
hi Peter,
can you please say more about the transformation? i'm not sure i am
following. what kind of transformation of the data would make it so i
don't have to give the location (mu) parameter, but just the
covariance matrix/correlation matrix (parameter C)?
> can you please say more about the transformation? i'm not sure i am
> following. what kind of transformation of the data would make it so i
> don't have to give the location (mu) parameter, but just the
> covariance matrix/correlation matrix (parameter C)?
No transformation will do that; you will always have to specify the degrees of freedom parameter as well.
All you need to do to use MVT as a location/scale family is, separately for each column of your data, subtract the corresponding mean and divide by the corresponding scale factor. It sounds like you have the Statistics Toolbox. Take a look in stats/private/addtls.m; that code the handles the univariate t-location-scale distribution for the Distribution Fitting Tool is in there. Look at tlspdf and tlscdf. You need to do the same thing coordinate-wise.
Hope this helps.
HTH
Kevin
function logp = mvtLogpdf(X, mu, Sigma, nu)
% Multivariate student T distribution, log pdf
% X(i,:) is i'th case
[N d] = size(X);
M = repmat(mu(:)', N, 1); % replicate the mean across rows
X = X-M;
mahal = sum((X*inv(Sigma)).*X,2); %#ok
logc = gammaln(nu/2 + d/2) - gammaln(nu/2) - 0.5*logdet(Sigma) ...
- (d/2)*log(nu) - (d/2)*log(pi);
logp = logc -(nu+d)/2*log1p(mahal/nu);
if 0
% this check only works if Sigma is a correlation matrix
logp2 = log(mvtpdf(X, Sigma, nu));
assert(approxeq(logp, logp2))
end
Peter Perkins <Peter.Perki...@mathworks.com> wrote in message <go8tt0$rma$1...@fred.mathworks.com>...