[ADMB Users] difference between ADMB-RE and R/mgcv in SEs for smoother coefficients in a GAM fitted by maximum likelihood
davef at otter-rsch.com
Thu Nov 29 09:17:23 PST 2012
First, you can find the code that does the calculations in mod_sd.cpp
I guess there are two questions here. One is whether the method used in
ADMB is reasonable.
The second is whether it is carried out without error. The method is
First it is assumed that the covariance matrix for the random effect u
given the value of the fixed effects
is equal to th inverse of the Hessian of the posterior distribution.
Call this matrix S .Another term is added to this.
The extra term corresponds to the uncertainty in the values of the fixed
effects. This is calculated
in a frequentist way. The mode of the posterior distribution uhat(x) is
a vector of
dependent variables. denoting the dervative of these wrt x by uhat'(x),
matrix via the delta method is
uhat'(x) * H * uhat'(x)
and their correlation with x is give by
H * uhat'(x)
The entire correlation matrix is
trans(H*uhat'(x)) S+ uhat'(x)
* H * uhat'(x)
I guess we should look at some simpler cases and see if this is
reasonable and correct.
More information about the Users