# How to fit a multivariate lognormal distribution to a given dataset

Given a dataset X with N observations in 11 dimensions, where each variable is restricted to be >= 0, how is it possible to fit an 11-dimensional log-normal distribution to this dataset?

I only found sources for fitting an univariate lognormal to data, but I didn't find anything for the multivariate case.

I would be happy if this was possible in MATLAB, however python or R would also be fine.

-
In this manuscript, the MLE is presented (pitifully, the notation is horrible and I could not find a better one). You can find other sorts of estimators in the following papers: (1), (2). –  user10525 Jun 5 '12 at 11:19
How do you define the multivariate lognormal? Is it lognormal componentwise? –  Michael Chernick Jun 5 '12 at 11:23
@Michael, $(X_1,\ldots,X_n)$ is multivariate lognormal if and only if $(\log(X_1),\ldots,\log(X_n))$ is multivariate normal. ptikobj: This gives you many ways to fit a distribution--just use your favorite method to fit a multivariate normal distribution to the logarithms of the observations. (You are in trouble if any of the observations actually equals zero, because that is inconsistent with the lognormal assumption.) –  whuber Jun 5 '12 at 13:00
Is the restriction >= 0 or just > 0? You'll have a problem if you have a 0 in your dataset. –  jbowman Jun 5 '12 at 13:02
@whuber Is it true that if you find a class of estimators for $(\mu,\Sigma)$ using the Gaussianised (taking log) variables, this correspond to the same class of estimators in the lognormal case? I was wondering specially about the entries of the correlation matrix. –  user10525 Jun 5 '12 at 13:18
It seems that based on the definition given by Bill Huber the multivariate lgonormal is given by taking a specified multivariate normal distribution $(Y_1,Y_2,...,Y_n)$ and then define the multivariate vector $(\exp(Y_1),\exp(Y_2),...,\exp(Y_n))$ as a multivariate lognormal. So as Bill Huber suggests you can use the $\ln$ of the vector that you observe to estimate the mean and covariance matrix of the multivariate normal (many choices for this) and that estimate defines the estimated multivariate lognormal.