Re: [TMB users] Digest for tmb-users@googlegroups.com - 1 update in 1 topic

27 views
Skip to first unread message

Cole Monnahan - NOAA Federal

unread,
Jul 21, 2023, 12:36:33 PM7/21/23
to tmb-...@googlegroups.com
I don't see any immediate bugs in the code. I also ran the code with 100 different seeds and your coverage is about 85% for the slope. It appears slightly positively biased actually. I'm not super familiar with these models. Would you expect a 95% coverage? -Cole

On Thu, Jul 20, 2023 at 9:41 PM <tmb-...@googlegroups.com> wrote:
DM Gillis <astros...@gmail.com>: Jul 20 05:09AM -0700

I am trying to develop a simple errors in variables (measurement error)
example using TMB, by including erros in X as a random variable. It is not
specified as Random in making the objective function, since I do not want
its effects to be integrated out. The slope returned is an improvement from
the OLS solution, but the 95% CI falls short or the "true" value (simulated
data) rather than being centered around it. I have posted details with a
full code listing on Stack Overflow:
 
https://stackoverflow.com/questions/76705890/possible-bias-when-fitting-linear-regression-with-errors-in-variables-using-tmb
 
since my attempt to post it all here was rejected by the server. Any
suggestions would be appreciated. Thank you for taking thetime to consider
my problem.
 
Regards, Darren
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to tmb-users+...@googlegroups.com.

DM Gillis

unread,
Jul 21, 2023, 4:19:08 PM7/21/23
to TMB Users
That could be it... I just ran it with one seed and hoped that it would be well behaved (very naive). I will simulate more and be especially careful when applying it to real data (including examining repeated simulations with the fitted model parameters). Thanks for your exploration and all the best for the weekend!

Cheers, Darren

DM Gillis

unread,
Jul 22, 2023, 10:04:48 AM7/22/23
to TMB Users
To follow up - thanks Colin and everyone else. I replicated the simulation 1000 times and got a mean slope of 2.00, but also an actual 95%CI coverage of about 85%. So, I'll chat with my Stats friends and possibly bootstrap CIs for real data. I truely appreciate the support that you have all provided!

Cheers, Darren

Reply all
Reply to author
Forward
0 new messages