Hi,
I’m attempting to use moment matching with loo for a model fitted in R with cmdstan that includes random effects. (Loo without moment matching fits fine, but throws up pareto-k warnings).
Unfortunately, I get the following error message:
Error: Model has 26 unconstrained parameter(s), but 36 were provided!
My sleuthing so far leads me to wonder if this might be because one of the random effects parameters is a correlation matrix, which is I think constrained:
cholesky_factor_corr[4*K] L_u;
K in this instance is 1 - so my best guess is that this parameter may be adding 16 parameters to the model, but only 6 unconstrained ones, which is leading to the error message.
Does this sound even vaguely plausible? And if so, is there any advice on how I can deal with this?
Happy to give more code if helpful - but not sure I am even in the right ballpark in my thoughts about this, and the full model is quite complicated, so thought I’d start fairly general.
Many thanks for any help you can give!
Operating System: Windows, working in R
CmdStan Version: 2.34.1