DKI2() calculates a salinity-normalised version of the Danish quality
index (DKI) (Carstensen et al., 2014)
The DKI index is based on AMBI and can only be calculated after first calculating
AMBI, the AZTI Marine Biotic Index, and H', the Shannon diversity index.
Both indices are included in output from the function AMBI().
This function uses linear relationships between salinity and limits for AMBI
and Hdash to normalise the index. This is done to account for expected
lower species diversity in regions with lower salinity.
Since the index is normalised to salinity, the function also requires
measured or estimated salinity psal as an argument.
Details
The AMBI() and Hdash() functions take a dataframe of observations as an
argument. The DKI functions, DKI2() and DKI(), do not take a dataframe
as an argument. Instead they take values of the input parameters, either
single values or as vectors.
To calculate DKI for a dataframe of AMBI values, it could be called from
e.g. within a dplyr::mutate() function call. See the examples below.
References
Carstensen, J., Krause-Jensen, D., Josefson, A. (2014). "Development and testing of tools for intercalibration of phytoplankton, macrovegetation and benthic fauna in Danish coastal areas." Aarhus University, DCE – Danish Centre for Environment and Energy, 85 pp. Scientific Report from DCE – Danish Centre for Environment and Energy No. 93. https://dce2.au.dk/pub/SR93.pdf
See also
For more details, see`vignette("other-indices").
DKI()calculate DKI using the original methodAMBI_sal()minimum AMBI for normalisation = f(salinity)H_sal()maximum H' for normalisation = f(salinity)
Examples
# Simple example
DKI2(AMBI = 1.61, H = 2.36, N = 25, psal = 21.4)
#> [1] 0.7043697
# ------ Example workflow for calculating DKI (v2) from species counts ----
# calculate AMBI index
df <- AMBI(test_data_DK, by = c("station"), var_rep = "sample")[["AMBI"]]
#> ℹ 7 species names were not recognised:
#> 1. Bivalvia indet.
#> 2. Enteropneusta indet.
#> 3. Gastropoda indet.
#> 4. Holothuroidea indet.
#> 5. Hydrozoa indet.
#> 6. Nemertini indet.
#> 7. Terebellida indet.
# modify names which were not recognized by AMBI() and recalculate
df_obs <- dplyr::mutate(test_data_DK, species = gsub(" indet\\.", "", species))
df <- ambiR::AMBI(df_obs, by = c("station"), var_rep="sample")[["AMBI"]]
#> ℹ 4 species names were not recognised:
#> 1. Bivalvia
#> 2. Gastropoda
#> 3. Nemertini
#> 4. Terebellida
# show AMBI results
df
#> # A tibble: 2 × 13
#> station AMBI AMBI_SD H S fNA N I II III IV
#> <chr> <dbl> <dbl> <dbl> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 42 0.970 0.712 4.24 28 0 76 0.461 0.158 0.355 0.0132
#> 2 49 1.98 0.232 3.25 29 0.00337 297 0.115 0.470 0.389 0.0270
#> # ℹ 2 more variables: V <dbl>, Disturbance <chr>
# add salinity values - these are realistic but invented values
df$psal <- c(21.3, 26.5)
# calculate DKI from AMBI results
df <- dplyr::mutate(df, DKI=DKI2(AMBI, H, N, psal))
dplyr::select(df, station, AMBI, H, N, psal, DKI)
#> # A tibble: 2 × 6
#> station AMBI H N psal DKI
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 42 0.970 4.24 76 21.3 0.969
#> 2 49 1.98 3.25 297 26.5 0.736
