Hi Everyone,

I have been adapting some hierarchical nonlinear three-parameter growth models with a left-truncated normal likelihood from JAGS into Stan for a manuscript revision and wanted to include some spatial dependence by having the mean of the hyper-parameters as a linear function of latitude and the variance taken from a conditional autoregressive model (CAR). One model includes the CAR parameterization and one model does not. The CAR model was adapted from the Stan case study (http://mc-stan.org/users/documentation/case-studies/mbjoseph-CARStan.html). However, I have been having some difficult with mixing, divergence, and sampling times (slow) for both models. To limit these issues I have vectorized the code and created non-centered versions, however, I am still having issues with mixing, divergence, and slow sample times. The truncated normal slows things down considerably and one caveat with the CAR model is that one region does not have any data, but I want variation from neighboring regions to inform one another (i.e. no data from Oregon, but California and Washington can still share information).

I was wondering if the issues are with how the model is configured or something I am missing. Included are the data and R code with stan code for the two models.

Any help would be greatly appreciated.

Cheers,

Grant

STAN_Hierarchical_VBGF_Runs.R (6.6 KB)

VBGF_Data.csv (1.1 MB)