I am carrying out posterior simulation with GAMs/SCAMs and was wondering if/how the rmvn()
function differs in any way from the mvrnorm()
function in mgcv
.
I ask because if there is already a function to perform MVN simulation in the MASS package, then why was rmvn()
created for mgcv
? This leads me to believe either:
(1) there is a fundamental difference between these two functions; or,
(2) there is no difference, and rmvn()
was created simply for convenience (i.e., not having to install/load another package).
I ask this because replacing mvrnorm()
used here:
Can I use bootstrapping to estimate the uncertainty in a maximum value of a GAM?
with rmvn()
results in an error that "mu dimensions are wrong" when applied to SCAM objects:
see: Posterior Simulation of a shape constrained additive model (SCAM).
This behaviour leads me to believe that there is a difference between mvrnorm()
and rmvn()
. Or, there may be a critical bug that Simon Wood (the creator and maintainer of mgcv
) should be informed on.
Is there really a difference that should lead me to using one function over the other? My intuition says no, but I would like to be certain.