Brms/projpred problem

I have previously run a brm_multiple model and used projpred successfully on this object class( ‘brmsfit_mutiple’ ‘brmsfit’). The model is bernoulli family with mu = logit.

The projpred call was:

tmp.imp.t.stan_glm.cvs <- cv_varsel(
tmp.imp.t.stan_glm,
method = ‘forward’,
data = tmp.df.imp,
cv_method = ‘LOO’,
verbose = FALSE
)

This returned the expected vsel object.

I have installed the latest brms and projpred and rerun the same model.

Making exactly the same projpred call returns:

Error in get(extend_family_specific, mode = “function”) :
object ‘extend_family_bernoulli’ of mode ‘function’ was not found

I attempted to get a reference model structure and returned the same error.

tmpfit <- get_refmodel(tmp.imp.t.stan_glm)
Error in get(extend_family_specific, mode = “function”) :
object ‘extend_family_bernoulli’ of mode ‘function’ was not found

  • Operating System: CentOS Linux 7
  • brms Version: 2.14.0
  • projpred Version: 2.0.2
  • R: 3.6.3

On a Mac platform I was attempting the CRAN projpred Gaussian vignette.

I used the data and code as shown in the vignette modified to set n = 1000, chains = 4 and adapt_delta = 0.95.

The attempt to get a reference model as specified in the Quick Start vignette failed:

refmodel <- get_refmodel(fit)
Error in init_refmodel(object, data, y, formula, family, ref_predfun,  : 
  argument "y" is missing, with no default

An attempt to directly submit the model object to cv_varsel also failed: 

> vs <- cv_varsel(fit, method = "forward")
Error in init_refmodel(object, data, y, formula, family, ref_predfun,  : 
  argument "y" is missing, with no default

* Operating System: macOS 10.15.7
* brms Version: 2.14.0
* projpred Version: 2.0.2
* R : 4.0.2

``````````

Using the vignettes and the projpred package documentation, I am not able to debug either problem.

Nathan

Try the latest brms version from github (on CRAN soon)

Thanks for the pointer.

On my macOS, I have installed XCode 12.1 and R 4.0.3.

Using the suggested devtools call, I get multiple error messages about the need for a C++11 compiler when attempting to install projpred from github.

Suggestions?

Nathan

I am still attempting to submit a brm_multiple model [class(brmsfit_multiple, brmsfit)] to projpred.

Still running on the same CentOS Linux7 platform using R 3.6.3.

Projpred is still 2.0.2, but now running latest brms 2.14.4.

The call to projpred is:

tmp.imp.t.stan_glm.cvs ← cv_varsel(
tmp.imp.t.stan_glm,
method = ‘forward’,
data = tmp.df.imp,
cv_method = ‘LOO’,
verbose = FALSE
)

The error message is:

Error in .fun(object = .x1, data = .x2, formula = .x3, family = .x4, folds = .x5, :
formal argument “data” matched by multiple actual arguments

I can’t find guidance in the projpred documentation for understanding this error message.

My data object is a 5 fold multiple imputation. I am assuming that .x1 to .x5 refers to the models of the different imputations.

Is there an argument to restrict projpred to only one imputed model?

Nathan