1
$\begingroup$

I'm using the R package compositions for the multivariate lognormal distribution. This is the only package I found that supports it. However I'm not sure how this package computes the multivariate LN, because when I compare it with mathematica, I get different results.

in R:

MyVar <- matrix(c(0.3,0,0,0.3),byrow=TRUE,nrow=2)
MyMean <- c(0.5,-2)
dlnorm.rplus(c(1,0.1),meanlog=MyMean,varlog=MyVar)
> [1] 7.525946

In Mathematica:

PDF[LogMultinormalDistribution[{0.5, -2}, {{0.3, 0}, {0, 0.3}}], {1,0.1}]
> 3.00242

what is the deal here?

$\endgroup$
2
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is a cross-posted question with an answer mathematica.stackexchange.com/questions/68926/… $\endgroup$ Commented Apr 21, 2018 at 15:13
  • $\begingroup$ 1) just a tip for the future... most functions in R can be easily inspected by typing just the function name into the console then the output becomes the object/function itself. 2) and also to not leave this question unanswered.... The R function has an error missing the power to $k$ in the term $\frac{1}{\sqrt{\left(2 \pi\right)^k}}$ $\endgroup$ Commented Apr 21, 2018 at 15:36

0