% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_fits.R
\name{get.fits}
\alias{get.fits}
\title{Return distribution fits for smoothed ROC curves.}
\usage{
get.fits(smooth.roc)
}
\arguments{
\item{smooth.roc}{A \code{smooth.roc} object generated by \ifelse{html}{\code{\link[pROC:smooth]{smooth()}}}{\code{smooth()}} using \code{method = "fitdistr"}.}
}
\value{
A nested list with the following elements:
\item{\code{controls}}{A list containing fit information for the fitted control distribution:
\describe{
\item{\code{distribution}}{The distribution family.}
\item{\code{parameters}}{A named numeric vector containing the distribution parameters.}
\item{\code{aic}}{The AIC value.}
}
}
\item{\code{cases}}{A list containing fit information for the fitted case distribution:
\describe{
\item{\code{distribution}}{The distribution family.}
\item{\code{parameters}}{A named numeric vector containing the distribution parameters.}
\item{\code{aic}}{The AIC value.}
}
}

Objects returned by \code{\link[=get.fits]{get.fits()}} contain a custom print method that displays a human readable summary of the fitted distributions when printed at the console.
}
\description{
Retrieves the  distribution fits associated with smoothed ROC curves generated using the \ifelse{html}{\code{\link[pROC:smooth]{smooth()}}}{\code{smooth()}} function of the ‘pROC’ package via the\verb{“fitdist”} method. A \code{smooth.roc} object is provided as input, and the fitted case and control distribution families, parameters, and AIC values are returned. Can be used downstream of \code{\link[=find.distr]{find.distr()}} and \ifelse{html}{\code{\link[pROC:smooth]{smooth()}}}{\code{smooth()}} to inspect and evaluate the final distribution fits ultimately used to generate the smoothed ROC curve.
}
\examples{
# load packages and example blood biomarker data

library(pROC)
library(rocTools)
data(blood_data)

# build raw ROC curve

raw_roc <- roc(
  blood_data,
  response = "Diagnosis",
  predictor = "NfL"
)

# find best fitting case and control distribution
# families to use for ROC smoothing

best_fits <- find.distr(raw_roc)

# use best fitting families to build smooth ROC curve

smooth_roc <- smooth(
  raw_roc,
  method = "fitdistr",
  density.controls = best_fits$density.controls,
  density.cases = best_fits$density.cases,
  start.controls = best_fits$start.controls,
  start.cases = best_fits$start.cases
)

# print final distribution fits used
# to build the smoothed curve

get.fits(smooth_roc)

}
\seealso{
\ifelse{html}{\link[pROC]{pROC-package}}{pROC-package} \cr
\ifelse{html}{\code{\link[pROC:roc]{roc()}}}{\code{pROC::roc()}} \cr
\ifelse{html}{\code{\link[pROC:smooth]{smooth()}}}{\code{pROC::smooth()}} \cr
\link{rocTools-package} \cr
\code{\link[=find.distr]{find.distr()}} \cr
\code{\link{blood_data}}
}
