Cmdstanr + projpred

Hi to all. I am wondering if any plan exists to let a CmdStanModel be used with projpred.

Can you clarify? The reference model can be anything. The projections are limited GAMMs (and subsets of GAMM). What is your use case?

Hi @avehtari. I would start with a simple linear regression and I have 40 covariates. I wouldn’t like to use brms or rstanarm, and rely just on ‘cmdstanr’ for flexibility and to have model insight.

As I said, the reference model can be anything, and you can make it with CmdStanR, too. For a generic CmdStanR model projpred can’t know how generate predictions from the reference model and you need define ref_predfun and call init_refmodel() yourself (see Reference model and more general information — refmodel-init-get • projpred). The submodels are restricted to be GAMMsm, but the returned object by cv_varsel() does not depend on brms or rstanarm and you can continue working with CmdStanR

2 Likes