% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summaries.R
\name{compute_flags}
\alias{compute_flags}
\title{Flag probabilities with an explicit unclassified state}
\usage{
compute_flags(fit, q = 0.05, floor = 0.5)
}
\arguments{
\item{fit}{A \code{bayesqm_fit}.}

\item{q}{Posterior expected false-discovery bound (default 0.05).}

\item{floor}{Minimum flag probability a candidate needs before it can
be selected (default 0.5, so at most one signed flag per participant).}
}
\value{
A data frame with one row per participant: modal signed
candidate (\code{factor}, \code{sign}), its probability \code{flag_prob},
\code{unclassified_prob}, and \code{selected}. The full probability matrix is
attached as \code{attr(, "phi")} and the expected number of false
selected flags as \code{attr(, "expected_false")}.
}
\description{
For each participant, the posterior probability that the classical flag
rule fires on each signed factor, with the probability of remaining
unclassified alongside. Selected flags come from all signed
candidates by the posterior false-discovery rule at level \code{q}.
}
\examples{
compute_flags(demo_fit())

}
