This error usually indicates that ggplot (which is what pp_check
is using to generate the plot) can’t find a font it’s trying to use. Unfortunately, there can be various underlying causes for this. Do you get the same error if you try to generate a plot using ggplot directly? For example, what happens if you do ggplot(mtcars, aes(hp, mpg)) + geom_point()
?
There are a number of links that discuss this problem (for example, see here and here) and might give you some ideas for how to diagnose and resolve it.
By the way, you can save your brm model objects so that you don’t need to refit the same model. For example, you can do:
m1 = brm(data = dat, y ~ x + (1 | id),
warmup =10000, iter = 30000, cores=3, seed=123, chains = 4,
file="model1")
This will save the model object to a file called model1.rds
in your working directory. You can load this file later (with my.model = readRDS("model1.rds")
) rather than refitting the model. Also, if you have saved the model object this way, if you try to run the code above again (in the current session or a future session) brm
will just load the saved model object (which will be called m1
in your R environment), rather than refitting the model.
Also, a typical rule of thumb is to run four chains with 2,000 total iterations each, the first 1,000 of which are for warmup, giving a total of 4,000 posterior samples in the final model fit. You might need to tweak this in certain situations, but you might be able to get by with a lot less than 30,000 iterations per chain.