Skip to content

Multiplier variability not incorporated into bootdht #213

@LHMarshall

Description

@LHMarshall

Minimum reproducible example: multiplier uncertainty exclusion

Altered the sikadeer data set to perform a bootstrap with 30%CVs in creation and decay rate and similar analysis where the multiplier CVs were set to 0. The reported stratum-specific confidence intervals are virtually identical after 1000 bootstrap replicates. Evidence to me that multiplier uncertainty is not propogated in bootdht.

library(Distance)
data(sikadeer)
cu <- convert_units("centimeter", "kilometer", "square kilometer")
easy <- ds(sikadeer, key="hn", truncation="10%", convert_units = cu)
mult.se <- list(creation = data.frame(rate=25, SE=25*0.3),
             decay    = data.frame(rate=163, SE=163*0.3))
mult.nose <- list(creation = data.frame(rate=25, SE=0),
                     decay    = data.frame(rate=163, SE=0))
deer.ests <- dht2(easy, flatfile=sikadeer, strat_formula=~Region.Label,
                  convert_units=cu, multipliers=mult.se, 
                  stratification="geographical")
print(deer.ests, report="density")

boot.with.se <- bootdht(easy, flatfile = sikadeer, resample_transects = TRUE,
                  convert_units=cu, summary_fun=bootdht_Dhat_summarize,
                  multipliers = mult.se, 
                  cores=10, nboot=1000)
boot.no.se <- bootdht(easy, flatfile = sikadeer, resample_transects = TRUE,
                        convert_units=cu, summary_fun=bootdht_Dhat_summarize,
                        multipliers = mult.nose, 
                        cores=10, nboot=1000)

plain.estimates <- attr(deer.ests, which = "density")
analy.cis <- plain.estimates[, c("Region.Label", "LCI", "UCI")]

library(dplyr)
boot.se <- boot.with.se %>%
  group_by(Label) %>%
  summarize(LowerBound = quantile(Dhat, probs = 0.025), 
            UpperBound = quantile(Dhat, probs = 0.975))

boot.without <- boot.no.se %>%
  group_by(Label) %>%
  summarize(LowerBound = quantile(Dhat, probs = 0.025), 
            UpperBound = quantile(Dhat, probs = 0.975))

knitr::kable(as.data.frame(boot.se), caption="Multipliers with 30%CV", 
             row.names = FALSE, digits=3)
knitr::kable(as.data.frame(boot.without), caption="Multipliers without uncertainty", 
             row.names = FALSE, digits=3)

Output

Table: Multipliers with 30%CV

|Label | LowerBound| UpperBound|
|:-----|----------:|----------:|
|A     |     51.246|    100.438|
|B     |     19.011|     55.353|
|C     |      2.684|      5.371|
|E     |      0.839|      7.135|
|F     |     13.201|     16.930|
|G     |      4.243|     28.815|
|H     |      1.366|      1.751|
|J     |      6.373|      8.173|
|Total |    117.509|    194.044|

Table: Multipliers without uncertainty

|Label | LowerBound| UpperBound|
|:-----|----------:|----------:|
|A     |     50.911|     98.927|
|B     |     19.176|     52.884|
|C     |      2.647|      5.381|
|E     |      0.860|      7.180|
|F     |     13.149|     16.847|
|G     |      4.189|     28.461|
|H     |      1.360|      1.743|
|J     |      6.348|      8.133|
|Total |    117.460|    186.972|

Originally posted by @erex in #155

Metadata

Metadata

Assignees

Labels

triageNew items to look at and decide what to do

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions