Chapter 12 Diagnostic plots

To demonstrate how LTA results can explored quickly and reviewed for QA/QC using diagnostic plots, we will use a built-in LTabundR dataset, which has density/abundance estimates for the Hawaiian EEZ in 2010 and 2017 for striped dolphins, Fraser’s dolphins, and melon-headed whales, ran with only 100 iterations:

data(lta_result)

We created these LTA results using the following built-in processed dataset:

data(cnp_150km_1986_2020)

The function lta_diagnostics() can be used to review the object returned by the LTabundR function lta(), which is the primary function in this package for line-transect analysis. The typical way to use this function is simply:

lta_diagnostics(lta_result)

When you run this, the function will step through many diagnostic outputs (there are currently 8), some of which are tables and some of which are plots. Between each output, the function will wait for the user to press <Enter>. To turn that waiting feature off, you can add the input wait = FALSE.

To see which outputs are currently available from this function, use the following code:

lta_diagnostics(lta_result, 
                options = c(),
                describe_options = TRUE)

List of options for outputs to provide: ===============
(use numbers in the input `options`)

1 - Point estimate (encounter rate, density, abundance, g(0), etc.)
2 - Summary of bootstrap iterations, including CV of density/abundance
3 - Plot of detection function
4 - Histogram of bootstrapped detection counts
5 - Histogram of bootstrapped g(0) values
6 - Histogram of bootstrapped abundance estimates
7 - Scatterplot of abundance ~ g(0) relationship in boostraps
8 - Time series of point estimate CV as bootstraps accumulate

======================================================

To call specific outputs and not others, use the options input. We demonstrate this be stepping through each output below.

Option 1: The point estimate

lta_diagnostics(lta_result, options = 1)
               title species   Region    Area year segments    km Area_covered
1    Striped dolphin     013 (HI_EEZ) 2474596 2010      124 17004        60208
2    Striped dolphin     013 (HI_EEZ) 2474596 2017      130 16281        57880
3   Fraser's dolphin     026 (HI_EEZ) 2474596 2010      124 17004        60604
4   Fraser's dolphin     026 (HI_EEZ) 2474596 2017      130 16281        48515
5 Melon-headed whale     031 (HI_EEZ) 2474596 2010      124 17004           NA
6 Melon-headed whale     031 (HI_EEZ) 2474596 2017      130 16281        54256
  ESW_mean  n g0_est ER_clusters D_clusters N_clusters size_mean size_sd     ER
1     3.54 19   0.33      0.0011     0.0005     1213.6      51.8    48.0 0.0578
2     3.56 17   0.32      0.0010     0.0005     1182.8      35.4    18.0 0.0369
3     3.56  3   0.33      0.0002     0.0001      186.4     231.5   111.9 0.0408
4     2.98  2   0.32      0.0001     0.0001      160.4     355.6    91.4 0.0437
5       NA  0   0.33      0.0000     0.0000        0.0        NA      NA 0.0000
6     3.33  3   0.32      0.0002     0.0001      214.6     189.2    68.4 0.0349
       D     N g0_small g0_large g0_cv_small g0_cv_large
1 0.0238 58905     0.33     0.33        0.20        0.20
2 0.0158 38983     0.32     0.32        0.21        0.21
3 0.0177 43916     0.33     0.33        0.20        0.20
4 0.0227 56224     0.32     0.32        0.21        0.21
5 0.0000     0     0.33     0.33        0.20        0.20
6 0.0161 39925     0.32     0.32        0.21        0.21

Option 2: Summary of bootstrap iterations

lta_diagnostics(lta_result, options = 2)
               title   Region year species iterations ESW_mean   g0_mean
1   Fraser's dolphin (HI_EEZ) 2010     026        100 3.673699 0.3348392
2   Fraser's dolphin (HI_EEZ) 2017     026        100 3.272220 0.3249818
3 Melon-headed whale (HI_EEZ) 2010     031        100      NaN 0.3348392
4 Melon-headed whale (HI_EEZ) 2017     031        100 3.095521 0.3249818
5    Striped dolphin (HI_EEZ) 2010     013        100 3.578589 0.3348392
6    Striped dolphin (HI_EEZ) 2017     013        100 3.603333 0.3249818
      g0_cv       km         ER          D      size    Nmean  Nmedian      Nsd
1 0.2189724 16942.74 0.03882242 0.01798682 223.19230 44510.11 36057.16 36644.90
2 0.2301472 16175.22 0.04336513 0.02214532 361.68608 54800.72 48010.92 43786.73
3 0.2189724 16942.74 0.00000000 0.00000000       NaN     0.00     0.00     0.00
4 0.2301472 16175.22 0.03765432 0.02101152 190.42373 51995.03 42820.73 36074.28
5 0.2189724 16942.74 0.05662461 0.02382922  51.38394 58967.69 55655.51 23255.51
6 0.2301472 16175.22 0.03372892 0.01500969  34.23821 37142.91 34384.97 14785.21
         CV      L95       U95
1 0.8232940 11127.53 178040.42
2 0.7990174 13700.18 219202.88
3       NaN      NaN       NaN
4 0.6938024 17331.68 155985.08
5 0.3943772 29483.84 117935.37
6 0.3980628 18571.45  74285.81

Option 3: Plot of detection function

lta_diagnostics(lta_result, options = 3)

Option 4: Histogram of bootstrapped detection counts

lta_diagnostics(lta_result, options = 4)

Option 5: Histogram of bootstrapped g(0) values

lta_diagnostics(lta_result, options = 5)

Option 6: Histogram of bootstrapped abundance estimates

lta_diagnostics(lta_result, options = 6)

Option 7: Relationship between bootstrap g(0) and abudance

lta_diagnostics(lta_result, options = 7)

Option 8: Running calculation of CV during bootstrap process

lta_diagnostics(lta_result, options = 8)