% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metric.R
\name{niche_metric}
\alias{niche_metric}
\title{Build a sensitivity-weighted niche metric}
\usage{
niche_metric(sensitivity = NULL, cnfa = NULL, type = c("diag", "factor"))
}
\arguments{
\item{sensitivity}{Numeric vector of climate-variable sensitivity weights.}

\item{cnfa}{Optional CENFA \code{cnfa} object or list with \code{sf}, \code{co}, and \code{eig}.}

\item{type}{Metric type. \code{"diag"} uses variable-level sensitivity weights.
\code{"factor"} uses a factor metric when CNFA factor coordinates are available.}
}
\value{
A positive semi-definite matrix.
}
\description{
Build a sensitivity-weighted niche metric
}
