The model looks fine but when I try to add loo or waic criterion I get the error validate_ll(x) : All input values must be finite
I’m not convinced that the cloglog link is appropriate. I get fairly good results using the ‘logit’ link. The data are very skewed so I was hoping to check. I’m fairly confident that the sratio model is a good model of the data generating process.
df <- read.csv("test_error_validate_ll_ordinal.csv")
df[,'wp10'] <- factor(df[,'wp10'],levels=c("stub",'start','c','b','ga','fa'),ordered=T)
fam.cloglog <- sratio(link='cloglog', threshold='flexible')
formula <- brmsformula(wp10 | weights(weight) ~ Stub + Start + B + FA + GA, decomp='QR',center=TRUE)
mod <- brm(formula=formula.main.noC, data=df, family=fam.cloglog)
mod <- add_criterion(model.main.noC.cloglog,'loo')
I assume this is caused by numerical instability of common for the cloglog link. Recently, we have made some change to the brms code-base relating to this part. We did not explicitly improve numeric stability but we perhaps we have “accidentally” made things better. Could you try again with the latest brms version from github?