[ADMB Users] difference between ADMB-RE and R/mgcv in SEs for smoother coefficients in a GAM fitted by maximum likelihood
H. Skaug
hskaug at gmail.com
Thu Nov 29 13:16:40 PST 2012
I think it is the "variance of the random effect given the data"
data we want. Your second notion of variance,
which in your example has var(uhat) = 0, does not not
correspond to "the uncertainty about u", which
is what people want.
Besides, we need to be consistent internally in ADMB
with what comes out of -mcmc, and that is the first
variant.
Conclusion: I think your variance formula is conceptually correct.
Hans
On Thu, Nov 29, 2012 at 7:45 PM, dave fournier <davef at otter-rsch.com> wrote:
> 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
>> }
>> }
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
More information about the Users
mailing list