FIS outside confidence interval range

61 views
Skip to first unread message

Owen Holland

unread,
Mar 5, 2025, 10:45:02 PMMar 5
to dartR
Hi dartR folk,

I have a dataset where I want to investigate some standard pop gen metrics, including FIS and the corresponding confidence intervals. When calculating FIS using gl.report.heterozygosity where nboots = 999, regardless of the method used (except for "bca", which throws the `estimated adjustment 'w' is infinite` error), the FIS estimate is outside the confidence interval range. I don't understand how this is possible, unless I am misunderstanding or misinterpreting how confidence intervals for FIS work? The FIS population estimate is the mean of all loci for that population, correct? So I don't understand how the mean can be outside of the confidence interval range. Below are some truncated examples.

> gl.report.heterozygosity(
+   gle,
+   method = "pop",
+   nboots = 999,
+   conf = 0.95,
+   CI.type = "norm",
+   ncpus = 1,
+   plot.display = TRUE,
+   error.bar = "SD",
+   save2tmp = FALSE,
+   verbose = 5
+ )

FIS FISSD FISSE FISLCI FISHCI
0.150932 0.349969 0.004313 0.340166 0.502036
0.108739 0.217949 0.002686 0.200184 0.297336
0.068091 0.208451 0.002569 0.069967 0.272008
0.057876 0.189402 0.002334 0.070291 0.163808

CI.type = "perc"

FIS FISSD FISSE FISLCI FISHCI
0.150932 0.349969 0.004313 -0.210526 -0.052632
0.108739 0.217949 0.002686 -0.07355 0.02271
0.068091 0.208451 0.002569 -0.123586 0.074217 <-- this one seems to be fine
0.057876 0.189402 0.002334 -0.041751 0.047826

CI.type = "basic"

FIS FISSD FISSE FISLCI FISHCI
0.150932 0.349969 0.004313 0.354495 0.51239
0.108739 0.217949 0.002686 0.199735 0.291945
0.068091 0.208451 0.002569 0.066965 0.26253 <-- also fine, same pop
0.057876 0.189402 0.002334 0.071069 0.163778

Pop sizes = 10, 24, 18 and 25, respectively (in case that matters). I have 6,584 loci with call rates >80%. Like many ecologists my statistics expertise is lacking, so I am hoping I am just wrong in my assumption! Could anyone shed some light on what is going on here?

Thanks,
Owen

Jose Luis Mijangos

unread,
Mar 5, 2025, 11:08:17 PMMar 5
to dartR

Hi Owen,

Thanks for reaching out. Could you please try installing the developing version of dartR.base (as below) to see if that resolves the issue?

devtools::install_github("green-striped-gecko/dartR.base@dev")

Note that in the latest version of gl.report.heterozygosity, you can generate confidence intervals either by bootstrapping across loci or across individuals (see parameter "boot.method"). The choice depends on which source of variation you want to capture. Most commonly, analyses involve resampling across loci to see how estimates vary when different sets of loci are used (boot.method = "loc"). However, if you are interested in how estimates vary with different sets of individuals, you can bootstrap across individuals instead (boot.method = "ind").

Cheers,
Luis

Owen Holland

unread,
Mar 6, 2025, 1:36:09 AMMar 6
to dartR
Sorry Luis, I appear to have replied directly to you and I can't access the message I sent anywhere. Could you confirm if you received my response?
Thanks 
Owen

Romney Francis

unread,
Oct 4, 2025, 1:00:02 AMOct 4
to dartR
Hi all,

I'm having the same issue as Owen, where my confidence intervals aren't centered around the mean, and would like to know if was ever resolved? I did try Luis's suggestion of installing the developing version of dartR.base, but I'm still having the same issue.

Thanks,
Romney

Owen Holland

unread,
Oct 7, 2025, 1:22:09 AMOct 7
to da...@googlegroups.com
Hi Romney,

I tried Luis's suggestions around reinstalling using dev versions and I couldn't resolve the issue. I managed to get a decent reference genome for my data so I opted to use a different analysis approach, so I am afraid I haven't got anything to add that might help. Best of luck.

Owen

--
You received this message because you are subscribed to a topic in the Google Groups "dartR" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dartr/n6JF3f46Zr8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/01d83437-d604-4bdf-b812-faf5c9a35807n%40googlegroups.com.

Jose Luis Mijangos

unread,
Oct 7, 2025, 1:59:22 AMOct 7
to dartR
Hi Romney,

Could you please send me a small subset of your data that shows the behaviour you’re seeing to my mail (luis.mijangos at gmail.com)? The code below shows how you can create and save a subset. 
Please send me:

1. the file test.rds (as in the code example below), and
2. the code you’re running,

library(dartRverse)
# subset loci
# you can increase the number of loci, for example n=400
test <- gl.subsample.loci(your_data.gl, n = 200, method = "random")
# subset individuals
# you can adjust the number of individuals, e.g. indNames(test)[1:20]
test <- gl.keep.ind(test, ind.list = indNames(test)[1:10])

# save object in the working directory
saveRDS(test, "test.rds")


Cheers,
Luis

Carlo Pacioni

unread,
Oct 7, 2025, 4:53:36 PMOct 7
to da...@googlegroups.com
Hi there, can I please confirm that you use resampled individuals and not loci? This problem should not occur when sampling individuals while it is common when sampling loci.

Thanks,
Carlo

Sent from Outlook for iOS

From: da...@googlegroups.com <da...@googlegroups.com> on behalf of Owen Holland <ojholl...@gmail.com>
Sent: Tuesday, October 7, 2025 4:21:53 PM
To: da...@googlegroups.com <da...@googlegroups.com>
Subject: Re: [dartR] Re: FIS outside confidence interval range
 
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/CAGT_--JaSE4NzUpNm%3DCJv8e7cN2aAdUFMxqxyPjNDQbhc%2Bvfeg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages