I'm a graduate student who is new to using Nimble and currently trying to implement a spatio-temporal Bayesian model combining a Gaussian copula with GEV marginals. However, I'm facing a problem where the copula-related parameters are not converging at all, and I would deeply appreciate any insights or advice.
Here's the structure of model:
For each time point t=1,..,N, I have M spatial observations Y_(i,t) with GEV marginals (GEV(mu_st, sigma_s, xi)).
The dependence across variable is modeled using a Gaussian copula, with the correlation matrix C defined based on a spatial distance matrix d_(i,j),
like {C}_(i,j) = c_0 * exp(- d_(i,j) / c_1) + (1 - c_0) * exp(- d_(i,j) / c_2).
Then I compute the log-copula density at each time point using:
log.cop[t] <- log_dmnorm(u[1:M, t], zero_vec[1:M], C[1:M, 1:M]) -
sum(dnorm(u[1:M, t], log = TRUE)) +
dGEV_vec(Y[1:M, t], mu_st[1:M, t], sigma[1:M], xi, log = TRUE)
cop <- sum(log.cop[1:N])
where log_dmnorm and dGEV_vec is constructed using nimble Function, and each denoting
The problem is: although I compute this log-copula, it doesn't seem to be incorporated into the posterior. As a result, the copula parameters (c_0, c_1, c_2) do not update at all during MCMC sampling - they simply float around their priors.
Since Nimble doesn't allow direct 'target +=' statements like r::stan does, I've been unsure how to correctly incorporate the computed log.cop into the model so that it actually influences the posterior.
As someone quite new to Nimble, I'm really not confident about whether I'm structuring things correctly. I would be extremely grateful for any insight or suggestions on how to properly include custom log-copula expression in the posterior and whether my approach is even going in the right direction (plus, if there's a more reliable or idiomatic way to handle this in Nimble).
Thank you very much in advance - I'd really appreciate any guidance from those more experienced.