Skip to content

Conversation

@mutlusun
Copy link

@mutlusun mutlusun commented Apr 8, 2020

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:
unnamed-chunk-1-1

This pull request fixes this small issue.

Best regards

@mutlusun
Copy link
Author

mutlusun commented Jun 2, 2020

Hello,
is there anything I can do to get this fixed/merged?
Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants