Development of this algorithm used work underway to select species for targeted monitoring. In June 2015, DOC’s Planning Monitoring and Reporting team undertook an expert elicitation process with a group of DOC species specialists to reach agreement on which threatened taxa DOC should monitor to understand outcomes of species management. The most favoured scenario was to select a subset of threatened taxa for monitoring from those currently managed. Selection criteria needed to draw out those taxa best representing the diversity of the candidate group and also those that are most threatened. In order to generate an indicative list as soon as possible, participants favoured criteria for which data were already accessible. Using findings of this workshop and work by Bennett et al. (2014), we developed an algorithm that used available information to identify a group of priority taxa for inclusion in the draft Threatened Species Strategy.

## General explanation

Taxa in the list were chosen from a pool of 483 threatened, at risk or conservation dependent taxa that currently benefit from DOC’s management.

Each selection reflects the species:

• Social contribution to the people of New Zealand
• Contribution to securing the widest range of taxonomic lineages in NZ, particularly those that are endemic
• Conservation status
• Rate of decline
• Conservation dependency

Threatened taxa such as kakapo, which are considered socially important (or ‘notable’) are, by virtue of their weighting, automatically included in the selection. We then select on the basis of optimising taxonomic representation to secure as many orders, families, and genera as possible, favouring taxonomic lineages that are endemic and taxa that are more threatened. If taxa are valued equally by these criteria a selection is made on the basis of conservation dependency

Our selection algorithm is based on the iterative approaches described in Bennett et al. (2014). Iterative selection allows evaluation of complementarity; how much each taxon contributes to the overall representation of a selected group (Faith, 2016). We differ from Bennet et al’s (2014) PTE (Phylogeny, Threat and Endemism) by inclusion of an extra taxonomic level to the definition of representation to distinguish between taxa beneath the level of species (e.g. subspecies, varieties). We also used an alternative means to include endemism after discussions with an author of the PTE: endemism is factored into each component of representation, reducing the value of a taxon’s contribution to security of its genus, family or order if the species, genus or family is not endemic. If the taxonomic level above is secure, endemism has no influence. Bennett et al. (2014) use a separate factor for endemism which is not updated during each iteration.

Finally, we factor in endangerment (conservation status) so that the most threatened taxa of a lineage are selected. Inclusion of degree of endangerment follows the EDGE (Evolutionary Distinctiveness and Global Endangerment) approach described in (Isaac et al., 2007) and was considered a very important criterion by the June 2015 workshop.

## The selection algorithm

The selection algorithm works backwards. We start by assuming that all candidate threatened species are included in the list and are therefore ‘secure’. We then deselect each species in turn, testing the effect against genera, families, and orders. Each taxon is then assigned a representative score (R) weighted by conservation status and rate of decline. The taxon with the lowest score is assigned the lowest rank and removed from the list. The process is repeated until all taxa are removed in an order that optimises taxonomic security. Socially important taxa are assigned a high weighting to ensure that they are removed last.

Were none of the candidate taxa managed, 93.2% of orders, 87.7% of families, and 68.5 of genera are secure (having subordinate taxa that are not threatened). Figure 1 shows how taxonomic security improves as more taxa are included in the managed group, according to their rank. The 49 predetermined taxa are shown by the red dashed vertical line. Beyond that, the algorithm determs rank as described above.

Figure 1: Proportion of genus, family, and order protected as species are included in rank order. The 49 species chosen according to their social importance are to the left of the red dashed vertical line.

## Details of the algorithm

The algorithm generates lower R values for taxa belonging to a genus, family or order containing multiple subordinates, and for those belonging to a genus, family or order which is secure (i.e. one or more of the subordinate taxa are not threatened or not yet removed in the algorithm calculation). Taxa are then individually weighted by a threat score (derived from conservation status, Table 1) modified by population trend (based on percentage change, Table 2). Thus the first taxa to be removed typically belong to a very large genus, are not critically endangered or declining quickly. Taxa that are critically endangered and declining quickly are removed after those in a less perilous status. If scores are tied after weightings have been applied then the taxon that is not conservation dependent is removed. The process is repeated until all taxa are removed. Iconic taxa are the last to be removed as their weightings are fixed to a value greater than 1000.

### Calculate the weight

Representativeness for a particular taxon is calculated as $R = \Big(1 + \frac{n_{s=1}}{n_s} \times kE_s + \frac{n_{g=1}}{n_g} \times kE_s + I_g\frac{n_{f=1}}{n_f} \times kE_g + \frac{n_{o=1}}{n_o} \times kE_f \Big)/5$

where $$n_{g=1}$$ is the number of species that are threatened in that genus, assuming if they are in the list they are no longer threatened. Endemism is included on each level as a multiplier $$k = 0.9$$, for non-endemic genus $$E_g$$.

$I_g = \begin{cases} 1 &\text{if entire genus is threatened},\\ 0 &\text{otherwise}. \end{cases}$ This follows for subspecies ( $$s$$), families ( $$f$$) and orders ( $$o$$).

The individual weight is calculated as $W = R\times(ThreatScore + TrendChange)$

Tables 2 and 3 define ThreatScore and TrendChange.

### The iterative steps

Assume all taxa are part of the list, thus the list perfectly represents the candidate taxa.

Step 1: Find taxon that has the smallest weighting (W) when removed from the list.

For each taxon in the list:

• Remove that taxon from list
• Calculate weight
• Put that taxon back in the list.

Where scores are even, remove the taxon that is not conservation dependent (NCD). If scores are still even, choose randomly to remove one taxon.

Step 2: Repeat step 1 but consider the taxon with the smallest weighting no longer ‘in the list’.

### Conversion Tables:

Table 1: Multipliers for converting conservation status to a threat score.

ConservationStatus ThreatScore
Naturally Uncommon 0.5
Not Threatened 0.5
Declining 0.6
Recovering 0.7
Relict 0.7
Nationally Vulnerable 0.8
Nationally Endangered 0.9
Nationally Critical 1.0

Table 2: Multipliers for converting from a trend value to a trend change score. Trends were derived from the NZTCS criteria.

Trend TrendChange
INC >10% -0.050
STABLE +/-10% -0.025
STABLE +/-10% or INC >=10% -0.025
DEC 10-30% 0.015
DEC 10-50% 0.030
DEC 10-70% 0.045
DEC 30-70% 0.060
DEC 50-70% 0.075
DEC >70% 0.090

## Sources of information and limitations

Although there are nearly 1000 threatened taxa in New Zealand, and DOC has identified just over 700 of those as having potential to benefit from conservation management, our current selection pool was limited to those reported as benefiting from DOC’s management in 2016.

Conservation status was taken from published assessments in the New Zealand Threat Classification, although with some updates to the status of recently described taxa e.g. Powelliphanta and Mysotis.

Taxonomic information was taken from an unpublished DOC database, updated by reference to the New Zealand Organisms Register, New Zealand Plant Names Database and the Checklist of the Birds of New Zealand (Ornithological Society of New Zealand (Sefton, 2010). For taxa not in those sources, we referred to published descriptions or species experts.

Representation calculated here assumes an equal distinction between taxonomic levels rather than branch length as typically applied in PD (e.g. Forest et al., 2007; Pio et al., 2014) or EDGE (e.g. Curnick et al., 2015; Jetz et al., 2014) analyses.

DOC’s site-based, operational management prioritisation currently excludes some groups: fungi, algae, aquatic invertebrates and marine fish. These were also excluded from this selection, unless deemed notable.

This list does not reflect management feasibility, cost or likelihood of success, except in that selection is limited to those already managed by DOC. Nor does it consider geographic distribution and potential to integrate management of species and ecosystems at place.

### Acknowledgements

Thanks to Graeme Elliot (DOC) for initial discussions on the inclusion of endemism and to Catherine Beard (DOC) for comments on a draft of this text.

## References

Bennett, J.R., Elliott, G., Mellish, B., Joseph, L., Tulloch, A., Probert, W., Di Fonzo, M., Monks, J., Possingham, H., Maloney, R., 2014. Balancing phylogenetic diversity and species numbers in conservation prioritization, using a case study of threatened species in New Zealand. Biological Conservation 174, 47–54.

Curnick, D., Head, C., Huang, D., Crabbe, M., Gollock, M., Hoeksema, B., Johnson, K., Jones, R., Koldewey, H., Obura, D., others, 2015. Setting evolutionary-based conservation priorities for a phylogenetically data-poor taxonomic group (scleractinia). Animal Conservation 18, 303–312.

Faith, D.P., 2016. The pd phylogenetic diversity framework: Linking evolutionary history to feature diversity for biodiversity conservation, in: Biodiversity Conservation and Phylogenetic Systematics. Springer, pp. 39–56.

Forest, F., Grenyer, R., Rouget, M., Davies, T.J., Cowling, R.M., Faith, D.P., Balmford, A., Manning, J.C., Procheş, Ş., Bank, M. van der, others, 2007. Preserving the evolutionary potential of floras in biodiversity hotspots. Nature 445, 757–760.

Isaac, N.J., Turvey, S., Collen, B., Waterman, C., Baillie, J., 2007. Mammals on the edge: Conservation priorities based on threat and phylogeny. PloS one 2, e296.

Jetz, W., Thomas, G., Joy, J., Redding, D., Hartmann, K., Mooers, A., 2014. Global distribution and conservation of evolutionary distinctness in birds. Current Biology 24, 919–930.

Ornithological Society of New Zealand (Sefton, N.Z., 2010. Checklist of the birds of New Zealand, Norfolk and Macquarie islands, and the Ross Dependency, Antarctica. Te Papa Press.

Pio, D.V., Engler, R., Linder, H.P., Monadjem, A., Cotterill, F.P., Taylor, P.J., Schoeman, M.C., Price, B.W., Villet, M.H., Eick, G., others, 2014. Climate change effects on animal and plant phylogenetic diversity in southern Africa. Global change biology 20, 1538–1549.

## Apendix 1: R code


##############################################################################
#Code to prioritise species for Threatened Species Strategy
#Written by Paul van Dam-Bates (edited by Amy Hawcroft)
##############################################################################
#Code combines concepts from Tier 2 species monitoring workshop
#with representation from Bennet et al
#into a list of prioritised species.
#This version includes endemism, threat status, and taxonomic groupings.
#It will account for "iconic" species that will always be considered at the
#top of the list.
#-----------------------------------------------------------------------------

#Load required packages. data.table is used for computational efficiency.
library(data.table)
library(reshape2)
library(ggplot2)

#------------------------------
#List of species that are threatened from the BioWeb which includes taxanomic information and rate of decline
species[ , "ConservationStatus" := gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", ConservationStatus, perl=TRUE)]      #Clean up naming convention
species[is.na(Order) | Order == "", "Order" := Class]                   #If Order is missing, we assume that Order is equal to Class.
setkey(species, BioWebID)

#Current Error with Conservation status as Taxonomically indistinct, these snails should be called
#nationally endangered.
species[BioWebID %in% c(12764,12791,12765,12787,12789,12790), ConservationStatus:= "Nationally Endangered"]

#Define all number of subspecies, if NA then we assume no subspecies,
#0 is assumed a coding error and should be just the single species
species[is.na(NInSpp) | NInSpp == 0, "NInSpp" := 1]

#Choose the biggest N in Genus and Taxa to make sure subspecies are accounted for
#if number in genus is uncertain.
species[is.na(NInGenus), NInGenus := NTaxaInGenus]

#Currently can't deal with missing Genus, Family, Order
species <- species[!is.na(NInGenus) & !is.na(NInFamily) & !is.na(NInOrder)]

#Table of species that are currently reported as under management.

#Read in the iconic species
setnames(iconics, "BiowebID", "BioWebID")
species <- merge(species, iconics[!is.na(BioWebID),.(BioWebID, Iconic = 1)], by = "BioWebID", all.x = TRUE)
species[is.na(Iconic), "Iconic" := 0]

#Use this to reset 'manage' status from 'streamed for' to 'actually'
#note a few were streamed for management in 2016 but since revised so omit those
species[, Manage:= ifelse((BioWebID %in% managed$biowebid & Manage==1)| Iconic==1, 1, 0) ] # Count iconic species in Access extract a <- length(species[Iconic==1,BioWebID]) # Remainder to be manually added if appropriate - one marine fish and 1 non-threatened bird iconics[!(BioWebID %in% species$BioWebID)]

#Now figure out how many threatened spp are in each genus, family and order
#that are not streamed for management. We need to account for "all threatened spp"
#when we calculate a threatened species score although we will only care about those streamed for management
#for selection.
species[, "NInSppThreat" := sum(Manage == 0), by = c("Species", "Genus")]
species[, "NInGenThreat" := sum(NInSppThreat[!duplicated(Species)] == NInSpp[!duplicated(Species)]), by = "Genus"]
species[, "NInFamThreat" := sum(NInGenThreat[!duplicated(Genus)] == NInGenus[!duplicated(Genus)]), by = "Family"]
species[, "NInOrdThreat" := sum(NInFamThreat[!duplicated(Family)] == NInFamily[!duplicated(Family)]), by = "Order"]

#Subset the species now but hold on to the old.
species.total <- copy(species)
species <- species[Manage == 1]

#Build up the data table that we need to work with combining ThreatStatus scores and TrendChange scores.
#Define the threat status and scores
threat <- data.table(
ConservationStatus = c("Declining", "Nationally Critical", "Nationally Endangered",
"Nationally Vulnerable", "Naturally Uncommon",
"Not Threatened", "Recovering", "Relict"),
ThreatScore = c(0.6, 1.0, 0.9, 0.8, 0.5, 0.5, 0.7, 0.7), key = "ThreatScore")

#Add threat status to species table
species <- merge(species, threat, by = "ConservationStatus", all.x = TRUE)

#Convert declining string to numeric weight.
#If we don't know the decline rate we assume there is a zero effect.
decline <- data.table(Trend = c("INC >10%", "DEC >70%", "STABLE +/-10%", "DEC 10-30%", "DEC 10-50%",
"DEC 10-70%", "DEC 30-70%", "DEC 50-70%", "STABLE +/-10% or INC >=10%"),
TrendChange = c(-.05,.09, -.025, 0.015, .03, .045, .06, .075, -.025), key = "TrendChange")
species <- merge(species, decline, by = "Trend", all.x = TRUE)
species[is.na(TrendChange), "TrendChange" := 0]

#Calculate M as in Bennet et al.
species[, "M" := list(M = 1 + (Endemic_Species == "Endemic") + (Endemic_Genus == "Endemic") + (Endemic_Family == "Endemic"))]

#Endemics will be included as a small scalar k to weight towards endemic species.
#Non endemic are worth k times endemic eg if endemic 1, non-endemic 0.90
k <- 0.9

#Put in the multiplier for endemism
species[, c("EndemicSpp", "EndemicGen", "EndemicFam", "EndemicOrd") :=
list(ifelse(Endemic_Species == "Endemic", 1, k), ifelse(Endemic_Genus == "Endemic", 1, k),
ifelse(Endemic_Family == "Endemic", 1, k), EndemicOrd = ifelse(EndemicOrder == "Endemic", 1, k))]

#If you want to run the traditional Bennet method change to TRUE
bennet = FALSE

#We will use the variable R to hold representativeness in each step, ThreatStat is whether or not (0, 1)
#it will be included in that list and Rank is
#which iteration it was included on. We start at the full list and move up so ThreatStat is zero for all.
species[,c("ThreatStat","R", "Rank") := list(0, 0, 0)]

iter = nrow(species)        #Iter will become rank on each iteration of the loop

#For each species, plug in the list with their current ThreatStat status
#This is making the code vectorised for computational efficiency instead of loop.
#One single giant matrix of repeated species for all possible combinations in the list for an iteration.
#Each repeated species in "long" just needs to be repeated up to Order to calculate R.
copy.spp <- copy(species)
setnames(copy.spp, "BioWebID", "BioWebID1")
long <- species[, (copy.spp[Order == Order[BioWebID1 == BioWebID]]), by = BioWebID]

#Here we pretend we are removing every species that hasn't been removed. R is calculated if only that
#species was actually removed.
#We choose the one that had the smallest weight if it was removed. We then recalculate for all the other
#species given that one is removed
#and so on until all the species are removed.
long[BioWebID == BioWebID1, ThreatStat := 1]

while(sum(species$ThreatStat) < length(species$ThreatStat))         #Once all items have been removed from the list all ThreatStat = 1.
{
#Aggregate for each sublist of species by genus, then family, then order
#This is the workhorse for calculating R.
long[, c("ss", "Is")    :=  list((sum(ThreatStat) + NInSppThreat)/NInSpp, ((sum(ThreatStat) + NInSppThreat) == NInSpp)*1),
by = c("BioWebID", "Species", "Genus")]
long[, c("s", "Ig")     :=  list((sum(Is[!duplicated(Species)]) + NInGenThreat)/NInGenus,
((sum(Is[!duplicated(Species)]) + NInGenThreat) == NInGenus)*1),
by = c("BioWebID", "Genus")]
long[, c("g", "If")     :=  list((sum(Ig[!duplicated(Genus)]) + NInFamThreat)/NInFamily,
((sum(Ig[!duplicated(Genus)]) + NInFamThreat) == NInFamily)*1),
by = c("BioWebID", "Family")]
long[, c("f", "Io")     :=  list((sum(If[!duplicated(Family)]) + NInOrdThreat)/NInOrder,
((sum(If[!duplicated(Family)]) + NInOrdThreat) == NInOrder)*1),
by = c("BioWebID", "Order")]

#Subset for just that particular species (gives situation if it was removed).
Temp = long[BioWebID == BioWebID1,]

#Bennet et al. does R and endemism separately.
if(bennet == TRUE)
{
Temp[, "R" := list((1 + ss + s*(Is == 1) + g*(Ig == 1) + f*(If == 1))*M)]
Temp[, "Weight" := list(R/20*(ThreatScore + TrendChange))]
}else{
#Our version of R weighted by endemism more directly. This decision was peer reviewed by Graeme Elliot, an author on Bennet et al.
Temp[, "R" := list(1 + EndemicSpp*ss + EndemicSpp*s*(Is == 1) + EndemicGen*g*(Ig == 1) + EndemicFam*f*(If == 1))]
Temp[, "Weight" := list(R/5*(ThreatScore + TrendChange))]
}

setkey(Temp, BioWebID)
setkey(species,BioWebID)
##################### End R and weight calculation:

#If species is "iconic" then give it a weight here.
#Something overwhelming and arbitrary.
Temp[Iconic == 1, "Weight" := 1000]

#Choose minimum weight as we are working from the bottom
min.weight = min(Temp$Weight) print(paste("Min weight =", round(min.weight, 2))) #Which species are of minimum weight spp.choose = Temp[Weight == min.weight] #Choose to get rid of non conservation dependant species first when there is a tie. if(any(spp.choose$CD == "NCD")) spp.choose = spp.choose[CD == "NCD"]

NTies <- nrow(spp.choose) - 1

print(paste("Number of ties =", NTies))
print(paste("Species = ", toString(spp.choose[,BioWebID])))

#Randomly choose out of the remaining species, this random choice becomes small at the top of the list.
spp.choose <- spp.choose[sample(1:.N,1),BioWebID]

#Change that min species to be off the list, and give it a rank
species[BioWebID == spp.choose, c("ThreatStat", "Rank") := list(1, iter)]

#Add this to long for the next iteration:
long[BioWebID1 == spp.choose, "ThreatStat" := 1]

#Clean up long by removing this species from selection :)
long <- long[BioWebID != spp.choose]
long[, c("s", "Ig", "g", "If", "f", "Io") := NULL]

iter = iter - 1
print(iter)
}
#End species selection
#######################

Hold = copy(species)

setkey(species, Rank)
save(species, file = "../Report/species_result_Final.Rda")  #Save output
#End algorithm