Closed hrlai closed 1 year ago
Hi @hrlai,
Thank you for creating this issue. Multivariate models are not supported yet in projpred. Nevertheless, the error message should be more informative. I thought that https://github.com/paul-buerkner/brms/blob/5c09251daabd5416e3d47004cc6c62816dc53cfa/R/projpred.R#L64 would catch such a case, but it seems it doesn't. @paul-buerkner: Would it make more sense to adapt brms:::validate_resp()
or brms:::get_refmodel.brmsfit()
?
I agree the error is confusing. I wonder why it is not picked up by validate_resp in the first place. @fweber144 do you see why?
I'm not sure if validate_resp()
is intended to catch such a case where resp
is NULL
. If it is, then the bug might be that in https://github.com/paul-buerkner/brms/blob/97a584aef02d77ca3b2d81bc03050c3724754d40/R/brmsfit-helpers.R#L709-L711, argument multiple
is ignored. Something like https://github.com/paul-buerkner/brms/blob/97a584aef02d77ca3b2d81bc03050c3724754d40/R/brmsfit-helpers.R#L706-L708 might then be necessary there as well (so effectively, https://github.com/paul-buerkner/brms/blob/97a584aef02d77ca3b2d81bc03050c3724754d40/R/brmsfit-helpers.R#L706-L708 would then have to be moved out of the if
expression to the second-to-last line, i.e., directly before the return statement).
Okay, I will take a look. Thank you!
now fixed in github
Great, thank you!
Hi again, here to report that
cv_varsel
doesn't work with multivariatebrms
models that are specified using themvbind
syntax. For example,returns the error
which may be due to the family stored in the model now being a list object?