stan-dev / projpred

Projection predictive variable selection
https://mc-stan.org/projpred/
Other
110 stars 26 forks source link

Using projpred in multi-response models with group correlated hierarchical effects #495

Open stanleyrazor opened 4 months ago

stanleyrazor commented 4 months ago

In multivariate models such as:

brm(mvbind(y1, y2, y3) ~ x1 + x2 + (1 |id| grp), data = data, family = family())

Projpred crashes with the error: Unexpected number of|characters in group terms. Please notify the package maintainer.

Running it without the <id> works currently.

What would you advise ?

fweber144 commented 4 months ago

projpred currently does not support (1 | id | grp) syntax, but I admit that the error message could be more informative (and the notification of the package maintainer would not be necessary). I think the reason for this somewhat obscure error message was that at the time when I introduced the error, I wasn't aware of situations where multiple | would occur. Now we have found one such situation, so we could simply say that projpred does not support such syntax.

fweber144 commented 4 months ago

Thanks for reporting!

stanleyrazor commented 3 months ago

Thanks for taking note!