Stan, bym2

hi everyone. I am testing the bym2 model.
And in the gen quantities section, I entered the code related to “log lik “. But I get this error.

Please guide me, thanks.

I want to use loo to compare my models.
Since my country (Iran ) has filtered foreign sites, I could hardly post my message here. And I could only use the photo and could not write the model. I apologize .

for brms models, use log_lik(model) to extract log likelihood values. If you just want to use them for loo, you can simply use loo(model) directly.