Multivariate chkptstanr

The chkptstanr R package allows users to start/stop brms models with the function ‘chkpt_brms’. the function specifies that the model can handle multivariate formulas e.g. mvbrmsformulas - see: R: Checkpoint Sampling: brms

I can’t seem to get a multivariate model working though, receiving the error ‘formula must be of class formula or brmsformula’. See a reproducible example below. Any ideas what’s wrong?


path ← create_folder(folder_name = “chkpt_folder_m1”)

data_simple ← read.table(”,
header = TRUE

model_simple ← bf(
mvbind(phen, cofactor) ~ 1 + (1|phylo),
family = gaussian()

fit_m1 ← chkpt_brms(
formula = model_simple,
data = data_simple,
path = “chkpt_folder_m1”,
iter_warmup = 1000,
iter_sampling = 1000,
iter_per_chkpt = 250,

R V4.2.3
chkptstanr V0.1.1
cmdtandr V0.7.1

The CRAN version of chkptstanr is completely non-functional and and hasn’t been updated in 2 years. I have recently taken up the development from the original creator, and this issue, together with others is fixed here:

If you install the current v0.2.0-alpha release via:


you should be able to use it with mvbrmsformulas

This is a very recent update, and so be careful when using it. More details on all the latest changes here


That worked a treat - thank you!


If you notice any issues feel free to post here or open an issue on the github repo