I would be thankful if you can answer my question:
I used variational bayse for model fitting. I used loo and waice functions for model-comparison. I see many warnings, most of them are:
“Can’t fit generalized Pareto distribution because all tail values are the same.”
Do you know what is the problem? Do you think the numbers that i take from loo and waice are reliable with this warning?
I need a bit more information: Are you using RStan? Which version? Which loo version? Model code and description of the data?
There are special cases where this is not a problem, but more likely it indicates a problem
Thanks for your answer.
The Rstan version is 2.18.2, the loo version is 2.0.0.
Fitting for vehtari.R (9.0 KB) ModelforVehtari.stan (8.5 KB)
I wrote the description of data on the top of stan file. Is it ok? Let me know if any more information is necessary.
I don’t think these support yet loo for variational inference, as the necessary changes were introduced in Stan 2.19
Thanks for your answer. I also tried with 2.19.2. I saw again the same warnings.
I only now had possibility to check your code. The code has
that is, log_lik is scalar and then you have
log_lik = log_lik + categorical_logit_lpmf(Sreport[t] | beta * Vh[input2+1:input2+6]);
that is it seems you are summing all individual log_lik’s together and when you call loo, you are doing leave-all-out instead of leave-one-out.
Thanks for your answer. So sorry for my late response, i supposed that all email from stan goes to my another email, thus i did find your answer.
About the code, log_lik is for calculating the AIC and BIC, not for loo. For loo another line of the code has applied:
loglik_trial[tr] = categorical_logit_lpmf(Sreport[tr] | beta * Vh[input2+1:input2+6]);
Does it solve the problem? Then, i do not why i see those warnings.