https://github.com/cran/cutpointr
Raw File
Tip revision: 7e56c827a694247d212e9a0167a119f917e1f31b authored by Christian Thiele on 31 August 2018, 15:50:10 UTC
version 0.7.4
Tip revision: 7e56c82
abs_d_ppv_npv.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{abs_d_ppv_npv}
\alias{abs_d_ppv_npv}
\title{Calculate the absolute difference of positive and negative predictive value}
\usage{
abs_d_ppv_npv(tp, fp, tn, fn, ...)
}
\arguments{
\item{tp}{(numeric) number of true positives.}

\item{fp}{(numeric) number of false positives.}

\item{tn}{(numeric) number of true negatives.}

\item{fn}{(numeric) number of false negatives.}

\item{...}{for capturing additional arguments passed by method.}
}
\description{
Calculate the absolute difference of positive predictive value (PPV) and
negative predictive value (NPV) from
true positives, false positives, true negatives and false negatives.
The inputs must be vectors of equal length. \cr \cr
ppv = tp / (tp + fp) \cr
npv = tn / (tn + fn) \cr
abs\_d\_ppv\_npv = |ppv - npv| \cr
}
\examples{
abs_d_ppv_npv(10, 5, 20, 10)
abs_d_ppv_npv(c(10, 8), c(5, 7), c(20, 12), c(10, 18))
}
\seealso{
Other metric functions: \code{\link{F1_score}},
  \code{\link{abs_d_sens_spec}}, \code{\link{accuracy}},
  \code{\link{cohens_kappa}}, \code{\link{cutpoint}},
  \code{\link{false_omission_rate}},
  \code{\link{misclassification_cost}}, \code{\link{npv}},
  \code{\link{odds_ratio}}, \code{\link{p_chisquared}},
  \code{\link{plr}}, \code{\link{ppv}},
  \code{\link{precision}}, \code{\link{prod_ppv_npv}},
  \code{\link{prod_sens_spec}}, \code{\link{recall}},
  \code{\link{risk_ratio}}, \code{\link{roc01}},
  \code{\link{sensitivity}}, \code{\link{specificity}},
  \code{\link{sum_ppv_npv}}, \code{\link{sum_sens_spec}},
  \code{\link{total_utility}}, \code{\link{tpr}},
  \code{\link{tp}}, \code{\link{youden}}
}
\concept{metric functions}
back to top