I’m trying to obtain the loo of a weighted binomial model, but I get the error in the title. The model has the structure:
brm(S|weights(w)~T+I(T^2)+(1|gr(phylo, cov = A))+(1|ID), family = bernoulli,
data = data, data2 = list(A=A), cores= 4, iter = 10000)
where w ranges over (0,1), A is a variance-covariance matrix from a phylogenetic distance matrix between species using ape::vcv.phylo, ID is a grouping random factor.
The summary for this model is:
Family: bernoulli
Links: mu = logit
Formula: S | weights(w) ~ T + I(T^2) + (1 | gr(phylo, cov = A)) + (1 | ID)
Data: data (Number of observations: 18311)
Draws: 4 chains, each with iter = 10000; warmup = 5000; thin = 1;
total post-warmup draws = 20000
Group-Level Effects:
~phylo (Number of levels: 12)
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept) 0.32 0.09 0.19 0.53 1.00 8046 11408
~ID (Number of levels: 68)
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept) 1.17 0.12 0.96 1.43 1.00 5715 9483
Population-Level Effects:
Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept -0.80 1.28 -3.33 1.73 1.00 8519 10476
T 1.45 0.01 1.42 1.47 1.00 28505 14687
ITE2 0.19 0.00 0.19 0.20 1.00 29161 14939
Draws were sampled using sampling(NUTS). For each parameter, Bulk_ESS
and Tail_ESS are effective sample size measures, and Rhat is the potential
scale reduction factor on split chains (at convergence, Rhat = 1).
Warning message:
There were 5 divergent transitions after warmup. Increasing adapt_delta above 0.8 may help. See Runtime warnings and convergence problems
Does anyone know the cause of this error?
Thanks in advance,
Edgar