% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gedi_plots.R
\name{plot_dispersion}
\alias{plot_dispersion}
\title{Plot Dispersion Analysis}
\usage{
plot_dispersion(
  dispersion_df,
  show_identity = TRUE,
  point_size = 0.1,
  alpha = 0.5,
  title = "Dispersion Analysis"
)
}
\arguments{
\item{dispersion_df}{Data frame from compute_dispersion() with columns:
Expected_Var, Observed_Var, Sample, n, bin}

\item{show_identity}{Logical, whether to show y=x identity line}

\item{point_size}{Numeric, size of points}

\item{alpha}{Numeric, transparency of points}

\item{title}{Character, plot title}
}
\value{
ggplot2 object
}
\description{
Visualizes the relationship between expected and observed variance
for count data. Useful for assessing model fit quality.
}
\examples{
\donttest{
if (requireNamespace("SeuratObject", quietly = TRUE)) {
  pbmc_small <- SeuratObject::pbmc_small
  M <- pbmc_small@assays$RNA@counts
  model <- CreateGEDIObject(
    Samples = pbmc_small@meta.data$orig.ident,
    M       = M,
    K       = 3,
    verbose = 0
  )
  model$train(iterations = 5)
  disp <- model$imputed$dispersion(M)
  plot_dispersion(disp)
}
}

}
