good question. the effective number of parameters you see in the
summary(result), uses the approximation
p_D = p - trace( -P * V)
where P is the prior precision matrix and V is the posterior covariance
matrix (refer to the DIC) paper.
The effective number of parameters in result$dic, is computed using
p_D = mean(deviance) - deviance(mean), again refer to the DIC paper.
(well, deviance(mean) uses the mode of the hyperparameters and the mean
of the latent field.)
the two numbers are usually in agreement but for more non-Gaussian data
they can disagree a little. the p_D in the $dic is more accurate. the
reason for doing like this, is that the approximation is cheap to
compute (in fact, almost free), whereas the other one is much more
expensive. also, p_D just give a rough guideline of the effective
number of parameters, as the hole DIC concept is somewhat
approximate...
Best
H
--
Håvard Rue
Department of Mathematical Sciences
Norwegian University of Science and Technology
N-7491 Trondheim, Norway
Voice:
+47-7359-3533 URL :
http://www.math.ntnu.no/~hrue
Mobile:
+47-9260-0021 Email:
havar...@math.ntnu.no
R-INLA:
www.r-inla.org