Too Red to Be True: Do Bad Residuals Necessarily Reject the Model?

10 views
Skip to first unread message

Marek Šlenker

unread,
Mar 10, 2026, 11:29:10 AM (2 days ago) Mar 10
to dadi-user

Dear Dadi users,

I am trying to fit a 2D model to my data using the dadi pipeline. I have even experimented with models that are not biologically realistic to see whether any model can produce a near-perfect fit to the data. The log-likelihood appears to have reached a plateau; however, the residuals generally look poor. Although the residuals for the models with the lowest AIC are slightly better, they are still far from ideal.

This raises a couple of questions for me:

  1. How important is the residual pattern if none of the plausible models provides a clean or well-behaved residual fit?

  2. Are there recommended ways to improve the input data or adjust model parameters to obtain a better fit?

Any suggestions or guidance would be greatly appreciated.


Marek

asym_mig_size.pdf
asym_mig_size.optimized.txt.png

Ryan Gutenkunst

unread,
Mar 10, 2026, 7:29:56 PM (2 days ago) Mar 10
to dadi...@googlegroups.com
Hello Marek,

In general, I evaluate these plots not based on the magnitude of the residuals, but rather on the qualitative pattern. Ideally, one sees a random scatter of blues and reds, whereas systematic patterns suggest some model deviation from the data.

I do notice a couple of things looking at your data plot.
1) The 0,1 and 1,0 entries are much larger than the 0,2 and 2,0. In words, you have fewer singletons private to each population than you do doubletons. That is generally not biological and suggests some issue with the data generation or processing. Are these data from low-pass sequencing?
2) I also notice a large residual right at 50% frequency in both populations. This is often due to paralogs in the genome, which should up as perfect heterozygotes when reads are mismapped. Applying a Hardy-Weinberg filter may get rid of those.

Best,
Ryan

--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dadi-user/9f550dfd-469c-4efe-993b-efb7a087a351n%40googlegroups.com.
<asym_mig_size.pdf><asym_mig_size.optimized.txt.png>

Marek Šlenker

unread,
Mar 11, 2026, 9:33:53 AM (16 hours ago) Mar 11
to dadi-user
Dear Ryan, thanks for your reply.

That point about random variance within residuals seems reasonable.

The data are from RADseq, but I removed singletons before selecting unlinked loci. So I can try to keep them.

paralogs: OK, this is a good point. So I will try to fix this

many thanks,
Marek.


Dátum: streda 11. marca 2026, čas: 0:29:56 UTC+1, odosielateľ: Ryan Gutenkunst
Reply all
Reply to author
Forward
0 new messages