Questions tagged [brms]
97 questions
0
votes
0 answers
Installed R package not found in library folder
I try to install whatever package as follows in R (regardless if it is R 4.0 or R 4.2):
install.packages("brms")
and this
install.packages("brms", lib = "path/win-library")
I get this:
* installing *source* package 'brms' ...
** package 'brms'…

Thomas
- 441
- 3
- 16
0
votes
0 answers
Creating a lme4 multilevel model based off a lavaan structural equation model with latent regression
Background
I am trying to convert a lavaan structural equation model into an lmer multi-level item response model. The model has 2 latent factors measured by 3 variables apiece. One of the latent factors is regressed on the other latent factor and a…

socialscientist
- 3,759
- 5
- 23
- 58
0
votes
1 answer
How do you get the posterior estimates from a stanfit object just as you would from a brmsfit object in R?
I am fairly new to R/STAN and I would like to code my own model in STAN code. The problem is that I don't know how to obtain the estimate__ values that conditional_effects(brmsfit) produces when using library(brms).
Here is an example of what I…

Os GS
- 69
- 6
0
votes
0 answers
Load Drools Guided Decision Table to Java List/Map
Hi I was wondering if there is a way to load all the content of the guided decision table to java collection (list/map)? I achieved this by making each rule(row) calling a java method where I add this to a hashmap but performance-wise is really bad…

Kyle
- 330
- 1
- 4
- 13
0
votes
0 answers
Random effects structure of nested (gam) BRMS model with binomial outcome in R
I am running a fairly complex model in BRMS in R and would love to get your input and comments on my model specifications and interpretation.
I have a nested design in which children (ID) are nested in classes, which are nested in 2 schools.
Each…

Luca
- 43
- 4
0
votes
0 answers
Extracting linear term from a polynomial predictor in a GLM
I am relatively new to both R and Stack overflow so please bear with me. I am currently using GLMs to model ecological count data under a negative binomial distribution in brms. Here is my general model structure, which I have chosen based on fit,…

reco
- 11
- 1
0
votes
1 answer
Interaction between two factors as Random effects in mixed model in R
I would like to know how to write random effects of two interacting factors. For example, I have 6 species which were planted in 48 plots and replicated in two blocks. There are in total 48 combinations (all possible 1, 2, 3, 5, and 6 species…

Tanvir Shovon
- 1
- 2
0
votes
0 answers
pp_check for logistic regression in brms R package
I have fitted a multilevel logistic model with brms and afterwards ran pp_check. Can anyone help me interpreting the plot (what is on the horizontal/vertical axes, to start with)? Especially the curve labelled y is unclear to me, as the data are…
0
votes
1 answer
mgcv::gam, Error in names(dat) <- object$term : attribut 'names' [2] as to be same length as vector [1]
I want to run a hieratchical GAM in the mgcv package using the gam function. I used the same form of model in brms without problem and I will eventually re-run the same model in brms, but the deadline for an abstract submission in Sunday so I want…

Julien Beaulieu
- 29
- 7
0
votes
1 answer
Kfold CV in brms
I am trying to use kfold CV as a means of evaluating a model run using brms and I feel like I'm missing something. As a reproducible example, my data are structured as a binary response (0, 1) dependent on the length of an individual. Here is some…

user1997414
- 189
- 3
- 10
0
votes
0 answers
mgcv::k.check equivalent for GAM in brms
I am doing HGAM with the brm function (brms package). For now, I kept the default k = 10, but I want to know if I should set k higher. I know that the function k.check in the mgcv package does that diagnostic, but I can't find any equivalent for…

Julien Beaulieu
- 29
- 7
0
votes
0 answers
How to follow-up on brms categorical model with emmeans to see whether there are group differences in choosing one particular category over another
I ran a brms model in R with a complex three-way interaction that I am trying to decompose. See below for code. I have a multinomial dependent variable with three levels (happy/angry/fear) and multiple categorical factors: group (three levels;…

user17821937
- 1
- 1
0
votes
0 answers
brms: how do I setup a model with multiple categorical variables, so that all levels are present and none are baked into the general intercept?
brms: how do I setup a model with multiple categorical variables, so that all levels are present and none are baked into the general intercept?
E.g. suppose we have predictors:
gender (2 levels)
educ (educational level, 3 levels)
Doing
brm(somey…

mavavilj
- 129
- 13
0
votes
1 answer
How to infere intermediate values in Drools rules
I've been recommended to use Drools for score calculation. I'm new to this framework, but after a small research I see that it's indeed a good solution, because scoring rules are going to be updated/adjusted frequently and it's easy (it seems) to…

Sebastian Lore
- 357
- 4
- 23
0
votes
0 answers
ggplot with for-loop function
I am running an ordinal logit model with brms package.
I want to write the density of the posterior distribution of the parameters.
dfpop$pop = factor(df$pop, levels = c("extinct","<10", "<100", "<1000", ">=1000"), ordered = TRUE)…

marie
- 315
- 1
- 9