I've been fitting a relatively complicated state-space model in JAGS and I want to do some basic model comparisons, including dropping parameters one at a time to assess their influence on the fit. For that, I need a measure of fit.
I understand that process errors can be viewed as parameters, but I want the "fit" of the model to be an estimate of the total error, including process and observation errors.
Would it be inappropriate to estimate WAIC using "loo", writing the log-likelihood as something like this:
loglik[i] <- logdensity.norm(A[i],B[i]), tau_process) + logdensity.norm(C[i],D[i]),tau_observation)
where A, B, C, and D are all logs and
A-B = process error, and
C-D = observation error?
I'm not enough of a statistician to know whether I'm barking up the right tree or whether I have written the likelihood correctly (I did try it briefly, but got a warning that 100% of the p_waic values were > 0.4, which makes me think I did something wrong).
Also, I'd consider using the DIC module for rjags but I assume that it would treat the process errors as parameters, which I don't want.
I'd appreciate any guidance, especially if you can make it simple enough for me to understand! Thanks...