Git Product home page Git Product logo

brmstools's Introduction

Hi there ๐Ÿ‘‹

@ Internet. Here to stay.

๐Ÿ”ญ I'm an assistant professor at Tilburg University
๐Ÿ’พ I have a website
๐Ÿ“ซ I also have an email address
๐Ÿง‘โ€๐ŸŽ“ I study psychological functioning in digital environments
๐Ÿง›โ€โ™€๏ธ I am on Bluesky and Mastodon

brmstools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

brmstools's Issues

Scale transformation in forest plot

It would be useful to be able to transform the parameters draws before plotting, e.g. if one have estimated a simple logistic model with a random intercept (with no other terms), it would be useful to get estimates on the probability scale. (inverse logit)

Use tidybayes

The plotting functions of this package rely heavily on two poorly coded functions; tidycoef() and tidyfitted(). Consequently the code is unnecessarily complicated and slow.

The code could be made significantly more straightforward and tidy by relying on functions in the wonderful tidybayes package instead.

Ordinal multi-level effects plots using 'forest' or another function?

Hi Matti, love the package, really useful for plotting quickly. I'm wondering if you plan to offer support for plotting the random effects from multi-level ordinal models computed using brms? The following error pops up when I attempt to implement directly:

Error in coef(model, summary = FALSE)[[grouping]][, , parameter] : 
  subscript out of bounds

I'm assuming by the error that this is due to the nature of how the ordinal effects are stored in brms? (Running R 3.5.0 in RStudio and just reinstalled the dev version of brmstools today)

Forest plot for nested random effects

Let say I have a regression model like this: Y ~ (1|A/B), then I can't specify the interaction (A:B) in the grouping argument of the forest function without error

Error: object 'A' not found

with the call:

forest(model, grouping = "A:B")

Spaghetti/panel plots for models with random slope

Hello,

Thanks for the awesome package! However, I'm getting an error when I try to use the spaghetti plot and panels plot functions when I fit a model with a random intercept and slope. Wondering what I might be missing?

library(brmstools)

fit1 <- brm(count ~ log_Base4_c + Trt + (log_Age_c|patient), 
            data = epilepsy, family = poisson())

spaghetti(fit1, xvar="log_Base4_c")
>Error in eval(predvars, data, env) : object 'log_Age_c' not found

panels(fit1, xvar="log_Base4_c")
>Error in eval(predvars, data, env) : object 'log_Age_c' not found

Thanks for any insight you can provide!

Error in FUN(X[[i]], ...) : object '2.5%ile' not found

I am trying the following code, but getting a weird error message, what I am doing wrong?
I am getting this error message: Error in FUN(X[[i]], ...) : object '2.5%ile' not found

simpelmodel1<-brm(popular~1 + extrav+(1+extrav|class), data=popular2data, warmup = 1000, iter =5000, chains = 2, inits= "random", control = list(adapt_delta = 0.96),save_all_pars = TRUE, cores= 2) 

spaghetti(simpelmodel1, xvar = "extrav")

This is thus a super simple model for demonstration purposes.
The forest function does work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.