% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classifyResults.R
\name{classifyResults}
\alias{classifyResults}
\title{Random Forest Classification}
\usage{
classifyResults(
  mfi_to_rau_output,
  algorithm_type = "antibody_model",
  sens_spec = "balanced",
  qc_results,
  project = NULL
)
}
\arguments{
\item{mfi_to_rau_output}{Output from `MFItoRAU()` or `MFItoRAU_Adj()`.}

\item{algorithm_type}{Algorithm: "antibody_model" (PvSEM algorithm; default)}

\item{sens_spec}{User-selected Sensitivity/Specificity threshold: "balanced"
(default) or "90\% specificity".}

\item{qc_results}{Output from `runQC()`.}

\item{project}{Default = NULL. Only write "pkpfpv" if using Pk/Pf/Pv pipeline.}
}
\value{
- Data frame with exposure status for every sample.
- Summary table with positive/negative results for each threshold.
}
\description{
This function classifies unknown samples as recently exposed or not
(Note: MFItoRAU() or MFItoRAU_Adj() needs to be run first to convert to
RAU).
}
\examples{
\donttest{

# Step 0: Load example raw data
your_raw_data <- c(
  system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"),
  system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR")
)
your_plate_layout <- system.file(
  "extdata",
  "example_platelayout_1.xlsx",
  package = "SeroTrackR"
)

# Step 1: Read serology data and plate layout
sero_data  <- readSeroData(your_raw_data,"magpix")
plate_list <- readPlateLayout(your_plate_layout, sero_data)

# Step 2: Process counts and perform quality control
qc_results  <- runQC(sero_data, plate_list)

# Step 3: Convert MFI to RAU using ETH beads
mfi_to_rau <- MFItoRAU_Adj(
  sero_data   = sero_data,
  plate_list  = plate_list,
  qc_results  = qc_results
)

# Step 4: Perform Pv classification
pv_classified <- classifyResults(
  mfi_to_rau_output = mfi_to_rau,
  algorithm_type    = "antibody_model",
  sens_spec         = "balanced",
  qc_results        = qc_results
)
}
}
\author{
Lauren Smith, Dionne Argyropoulos
}
