[ADMB Users] difference between ADMB-RE and R/mgcv in SEs for smoother coefficients in a GAM fitted by maximum likelihood

dave fournier davef at otter-rsch.com
Thu Nov 29 10:45:49 PST 2012


There is also the question of the variance of what?  I was thinking of 
the variance of the
random effect given the data. (At least I think I was thinking that.)  
Another
way of looking at it is the variance of the estimate for the random 
effect you would
get from a frquentist standpoint.   That means running the model over 
and over with
data generated from the right probabilistic model.  From this point of 
view the
correct answer is the variance of uhat(x) as generated from the delta 
method.

To see this difference suppose the model is

    f = square(x-10.) + 0.5*square(u(1));

Here 10 is one realization of the data.  Then uhat(x) =0 for every data 
input so the variance of
uhat(x) is zero.

To incorporate this into the model I think it is sufficient to comment 
out a line in getbigs.cpp
near line 141.

>  if (lapprox->hesstype !=2)
>     {
>       if (lapprox->saddlepointflag==2)
>       {
>         Suu-=minv;
>       }
>       else
>       {
>         //Suu+=minv;   // comment this out
>       }
>     }




More information about the Users mailing list