You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# REPREX
library(brms)
data <- data.frame(count = rpois(1000, 0.05))
m1 <- brm(
formula = "count ~ 1",
family = "poisson",
sample_prior = "yes",
data = data
)
m2 <- brm(
formula = "count ~ 0 + Intercept",
family = "poisson",
sample_prior = "yes",
data = data
)
m3 <- brm(
formula = "count ~ 0 + Intercept",
family = "poisson",
sample_prior = "no",
data = data
)
m4 <- brm(
formula = "count ~ 0 + Intercept",
family = "negbinomial",
sample_prior = "yes",
data = data
)
m5 <- brm(
formula = "count ~ 0 + Intercept",
family = "gaussian",
sample_prior = "yes",
data = data
)
In the above reprex, I fit four intercept-only models for the same data. The models have different combinations of (1) intercept specification: ~ 1 vs ~ 0 + Intercept; (2) family: poisson vs negbinomial vs gaussian; (3) sample_prior ='yes' vs 'no'. Models m1, m3, m4, and m5 all compile as expected, however, m2 returns the error
Error in strsplit(gsub(" |\\n", "", tpar_prior), ";")[[1]] :
subscript out of bounds
this is the specific combination of y ~ 0 + Intercept & family = "poisson" & sample_prior = "yes".
The text was updated successfully, but these errors were encountered:
bfordAIMS
changed the title
Bug when y ~ 0 + Intercept & family = "poisson" & sample_prior = 'yes'
Bug when y ~ 0 + Intercept & family = 'poisson' & sample_prior = 'yes'
Apr 9, 2024
In the above reprex, I fit four intercept-only models for the same data. The models have different combinations of (1) intercept specification:
~ 1
vs~ 0 + Intercept
; (2) family:poisson
vsnegbinomial
vsgaussian
; (3)sample_prior =
'yes'
vs'no'
. Modelsm1
,m3
,m4
, andm5
all compile as expected, however,m2
returns the errorthis is the specific combination of
y ~ 0 + Intercept
&family = "poisson"
&sample_prior = "yes"
.The text was updated successfully, but these errors were encountered: