I have a model fitted in brms. I am trying to plot the conditional effects,
mod2<-
bf(
PCFBPAGI ~
E0 - (((expIPRED^G) * Emax)/((expIPRED^G) +EC50^G)),
E0 ~ 1 + (1|i|NID),
Emax ~ 1 + (1|i|NID),
EC50 ~ 1 + (1|i|NID),
G ~ 1 + (1|i|NID),
nl=TRUE
)
fit2<-brm(mod2,
data = subdat,
prior = prior_1,
chains = 3,
future=T,
seed=2021,
iter = 4000,
warmup = 1000)
conditions <- data.frame(NID = unique(subdat$NID))
rownames(conditions) <- unique(subdat$NID)
me_subdat<-
conditional_effects(
fit2,
effects = "expIPRED",
conditions = conditions,
re_formula = NULL,
method = "predict"
)
plot(me_subdat, ncol = 5, points = TRUE)
I have 102 unique values of NID. As you see above, I am using ncol=5, the plot I get is trying to dispaly all panels (all 102 NID values) in one page.
According to hte help for plot in brms ncol is described as:
"Number of plots to display per column for each effect. If NULL
(default), ncol
is computed internally based on the number of rows of conditions
.
But, plot I get is putting all 102 subpanels in 5 columns in one page. How do I define for example 5 columns and 5 rows for the plot to have 25 panels in each page?
Do I have anything wrong in the model defined above that makes the plotting incorrect?
Thanks for help in advance