I believe there's no alternative to bootstraping all the data. The variability you want to propagate to the estimated density precision measures is the variability in both encounter and detectability/detection function. You can only fit the detection function
that you are currently using in your main analysis by using the data from all species. If you only fit the detection function with the data from your species alone, then you would not be borrowing the strength of all other species, which is what you are doing
in your original model.
I've been working on a project to obtain estimates for abundance of particular species at a several specific points based on point counts. The data I have includes point counts, with every species that was observed during the surveys and their corresponding
distances.
I've been instructed to use the data for all species to construct a ds() model and explore different covariates, including species. So far, species is the only covariate that seems to significantly improve the model, so I've included it as a covariate.
The best model is a ds() using hazard-rate with species as the one covariate:
KAEL_model.hr.sp
<- ds(KAEL, transect = "point", key = "hr", truncation = "15%", formula = ~species)
Using this model, I'd like to get bootstrap abundance estimates for only certain key species. I tried to subset the original data frame into one that only has one species. The issue is that bootdht() doesn't seem to work when species only has one factor
level. Here is the bootdht() I am performing and the error it yields:
KAEL_boot<-bootdht(
KAEL_model.hr.sp,
flatfile=KAEL_only,
resample_strata = FALSE,
resample_obs = FALSE,
resample_transects = TRUE,
nboot = 500,
summary_fun = bootdht_Nhat_summarize,
convert_units = 1,
select_adjustments = FALSE,
sample_fraction = 1,
multipliers = NULL,
progress_bar = "base",
cores = 1,
)
in
`contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels
It seems that bootdht() is unable to get abundance estimates when the species covariate only has one factor level. My question is: is there an effective way to perform a bootstrap for only one, or a few select species? Would it still be accurate?
I have considered performing a bootstrap of the entire original dataset and then subsetting only the species I am interested in, but it seems that this would take an inordinate amount of time. I would like to avoid this unless it is absolutely necessary,
but I'm not sure if there is another option.
Thank you for your help!
Ben
--
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 visit
https://groups.google.com/d/msgid/distance-sampling/c9f8ed77-2d0b-4552-9ef4-6d0d59370685n%40googlegroups.com.