Hello,

Very new to this Forum, and Bayesian analyses too, but learning a lot from the discussions here!

Im trying to do a model selection with loo, based on brmsfit models, but in some of them i’m getting these kind of errors:

loo.m1.3.3_arvoreta<-loo(m1.3.3_arvoreta,reloo=TRUE)

1 problematic observation(s) found.

The model will be refit 1 times.Fitting model 1 out of 1 (leaving out observation 2)

Start sampling

Error in if (p.rank > ncol(object$X)) p.rank <- ncol(object$X) :

argument is of length zero

An this is the model code:

prior_1.3.3<-c(prior(normal(1,1),class=Intercept),

prior(normal(0,1), class = b),

prior(normal(0,1), class = Intercept,dpar=sigma),

prior(normal(0,1), class = sds),

prior(normal(0,.1), group = area, class = sd))form1.3.3=bf(arvoreta~s(parcela) +(1|area))+lf(sigma~1,hu~1)

m1.3.3_arvoreta<-brm(form1.3.3,file=“m1.3.3_arvoreta”,sample_prior=“yes”,control = list(adapt_delta = 0.999, max_treedepth=15),

data=data.areabasal,family=hurdle_lognormal(),iter=10000, prior=prior_1.3.3)

Does anyone have an idea of what was my mistake?

Thanks in advance !

Operating System: Windows 10 x64 (build 17134)

Interface Version: loo_2.0.0 , brms_2.4.0