bootdht returns blank data frame

34 views
Skip to first unread message

Erica Alex

unread,
Mar 10, 2024, 4:03:05 AMMar 10
to distance-sampling
Hi all, 

I am using distance sampling for line transects to estimate density of raptors. I used the ds() function to create a pooled detection function (to boost sample size), but want to obtain species-specific density estimates for multiple sites with bootstrapping.

The model looks like this:
rapt_null <- ds(rapt2, truncation=200, key="hr", adjustment=NULL, convert_units=0.001)

To get species specific density estimates stratified by site, I have been using bootdht with the pooled model, a separate flatfile for each species, and resampling by strata:

swhaboot <- bootdht(model = rapt_null,
                     flatfile = swha,
                     summary_fun = bootdht_Dhat_summarize,
                     resample_strata = TRUE,
                     convert_units = 0.001,
                     nboot = 100,
                     cores = 1)

but it will only return blank data frames. 
I tried the same method without bootstrapping in dht2, and got errors regarding the length of the Region.Label vectors. 
After reading this thread: https://groups.google.com/g/distance-sampling/c/yLhMsxdlxSc?pli=1 , I removed any sites that had no detections within 200m from the swha flatfile, and dht2 would return density estimates, but bootdht still returns blank data frames.

Looking for any advice or ideas!

Thanks,
Erica

Eric Rexstad

unread,
Mar 10, 2024, 4:15:12 AMMar 10
to Erica Alex, distance-sampling
Erica

Using a pooled detection function to produce species-specific density estimates runs the risk of producing biased species-specific estimates unless detectability varies little between species; see
  • Rexstad, E., Buckland, S., Marshall, L., & Borchers, D. (2023). Pooling robustness in distance sampling: Avoiding bias when there is unmodelled heterogeneity. Ecology and Evolution, 13(1), e9684. https://doi.org/10.1002/ece3.9684
It is unusual to use strata as the resampling unit when bootstrapping, usually because there are too few strata. I doubt that feature of bootdht​ has been tested.

Finally, it is my experience that the flatfile​ argument to bootdht​ or dht2​ should be the same as the data​ argument for ds​. Otherwise errors such as mismatches in Region.Label​ can arise as you have seen.



From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Erica Alex <egale...@gmail.com>
Sent: 09 March 2024 21:49
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] bootdht returns blank data frame
 
--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/0be41589-6f51-469e-8480-83c4795441cfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages