% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pci.R
\name{pci}
\alias{pci}
\title{Calculates Proactive Conservation Index}
\usage{
pci(sp, var_out, var_in = NULL, weight_out = NULL, weight_in = NULL)
}
\arguments{
\item{sp}{character. Names of the taxa being evaluated.}

\item{var_out}{numeric. Threat variables. higher values must indicate increased threat.}

\item{var_in}{numeric. Interacting variables. Will modulate the effect of threat variables.}

\item{weight_out}{numeric. Weights for threat variables}

\item{weight_in}{numeric. Matrix of weights for the combination of interacting variables and threat variables.}
}
\value{
Data frame with PCI and rank.
}
\description{
\code{pci} Calculates the Proactive Conservation Index, a new tool to prioritize species for conservation, which incorporates information about future threats.
}
\examples{

# Invert variables that are negatively correlated with conservation priority

vert_df$inv_range_area <- 1/vert_df$range_area
vert_df$inv_brood_size <- 1/vert_df$brood_size
vert_df$inv_protected_area <- 1/((vert_df$protected_area*vert_df$range_area+0.0001))

# Select trait variables

traits_vertebrates <-
   vert_df[c("body_mass",
             "inv_range_area",
             "inv_brood_size",
             "inv_protected_area",
             "AHI")]

# Select threat variables for the year 2100, under scenarion SSP 5.85

threats_2100_585 <-
   vert_df[c("clim_2100_585",
             "landuse_2100_585",
             "popdens_2100_585",
             "inv_threat")]

# Calculate PCI

vertebrates_pci <-
   pci(sp = vert_df$binomial,
       var_out = threats_2100_585,
       var_in = traits_vertebrates)

}
