Facing error while compiling brms code

Thanks Andrew.

My code is being executed but it is stuck at

Compiling the C++ model
Running MCMC with 1 chain, with 2 thread(s) per chain…

Chain 1 num_threads = 2
Chain 1 WARNING: No variance estimation is
Chain 1 performed for num_warmup < 20
Chain 1 Iteration: 1 / 2 [ 50%] (Warmup)
Chain 1 Iteration: 2 / 2 [100%] (Sampling)
Chain 1 finished in 0.4 seconds.

Not sure what is the expected time to finish :(

Alright, so the first display:

Compiling the C++ model
Running MCMC with 1 chain, with 2 thread(s) per chain…

Chain 1 num_threads = 2
Chain 1 WARNING: No variance estimation is
Chain 1 performed for num_warmup < 20
Chain 1 Iteration: 1 / 2 [ 50%] (Warmup)
Chain 1 Iteration: 2 / 2 [100%] (Sampling)
Chain 1 finished in 0.4 seconds.

Is just brms initially compiling the model to then be applied to each of the imputed datasets, its safe to ignore. It appears to “hang” after this because when using the cmdstanr backend with brm_multiple, brms is unable to print the progress of each model (more information on that here). Unfortunately this is not something that can be worked around with brms.

If you want to see how long a given model is likely to take, then an option is to just call brm on a single dataset (rather than brm_multiple on the list of datasets), as that will print the progress of the model.

2 Likes

Understood. Thanks a lot for this information

1 Like