What does it mean if one, few, many, or all k-values from PSIS are infinite?
It might help if I give the model that is producing my problem. I apologize, it is in the rethinking-package format (it’s running right now so I can’t extract the Stan code; let me know if you need it, but I think it’s pretty understandable).
LPS_concentration ~ dgamma2(mu, scale),
mu <- # Basal
exp(a_Subject[Subject] +
a_Plate[Plate] +
a_Sample[Sample]) +
# Dynamic
b_Time[LPS]*Time *
exp(b_Time2[LPS]*Time),
a_Subject[Subject] ~ dnorm(0, sigma_a_Subject),
sigma_a_Subject ~ dexp(1),
a_Plate[Plate] ~ dnorm(0, sigma_a_Plate),
sigma_a_Plate ~ dexp(1),
a_Sample[Sample] ~ dnorm(0, sigma_a_Sample),
sigma_a_Sample ~ dexp(1),
b_Time[LPS] ~ dnorm(0, sigma_b_Time),
sigma_b_Time ~ dexp(1),
b_Time2[LPS] ~ dnorm(0, sigma_b_Time2),
sigma_b_Time2 ~ dexp(1),
scale ~ dexp(1)
), log_lik=TRUE,
constraints=list(b_Time="lower=0, upper=1",
b_Time2="lower =-1, upper=-1e-5"),
chains=4,
cores=4,
iter=300000
)
I suspect it is something to do with the nonlinear “# Dynamic” part of the equation for mu, but I don’t know.
Also, the problem disappears when I use a normal or Student’s t instead of a gamma distribution for mu.
Another thought is that it may stem from the way in which the Rethinking package parameterizes the gamma distribution. You’ll notice that it is parameterized with mean and scale parameters rather than a and b parameters.