sjPlot
sjPlot copied to clipboard
plot_model_diag_stan: Global priors are not plotted
Hello,
Many thanks for your sjPlot package! I really like it how easy model parameters and their uncertainty can be plotted.
In the latest master, I have found a small issue. In a brms model, if priors are set on a global level (specifying the same prior for all parameters) they are not plotted when calling sjPlot::plot_model(fit, type="diag")
.
MWE:
myd <- data.table(y=rnorm(100))
myd$x1 <- rnorm(100, mean=myd$y, sd=5)
myd$x2 <- rnorm(100, mean=myd$y, sd=10)
fit <- brms::brm(y ~ x1 + x2,
data=myd,
sample_prior=TRUE,
prior=c(brms::set_prior("normal(0, .2)",
class="b")),
chains=4, iter=500)
sjPlot::plot_model(fit, type="diag")
This produces the following output:
This pull request fixes this small issue.
Best regards
Hello, is there anything I can do to get this fixed/merged? Best