I just found it hard to integrate the projpred with stanfit object. My major obstacle is using the cv_varsel function in the k fold scenario. So according to the description, I need to specify the cvfun parameter in the init_refmodel function. But I don’t know how to specify the function just according to the description here https://mc-stan.org/projpred/reference/init_refmodel.html
I went to see the source code of init_refmodel, their cvfun function is defined based on the object created by rstanarm or brms. Can anyone provide me an example to get to the k fold predictive projection method from an stanfit object created by RStan?