% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/power.R
\name{mb_mde}
\alias{mb_mde}
\title{Minimum detectable effect (MDE)}
\usage{
mb_mde(
  n_per_group,
  sd = 1,
  power = 0.8,
  alpha = 0.05,
  sides = 2L,
  type = c("mean", "proportion"),
  baseline = NULL
)
}
\arguments{
\item{n_per_group}{Numeric. Sample size per arm.}

\item{sd}{Numeric. Standard deviation, used only for \code{type = "mean"}. Default \code{1}, in which case \code{effect_size} is interpreted
in standard deviation units.}

\item{power}{Numeric in \verb{(0, 1)}. Target power. Default \code{0.8}.}

\item{alpha}{Numeric in \verb{(0, 1)}. Significance level. Default
\code{0.05}.}

\item{sides}{Integer. \code{2} (two-sided, default) or \code{1} (one-sided).}

\item{type}{Character. \code{"mean"} (default) or \code{"proportion"}.}

\item{baseline}{Optional numeric in \verb{(0, 1)}. For
\code{type = "proportion"}, the baseline proportion \code{p1} against
which the MDE is calculated. The MDE is then returned in
absolute proportion-point units.}
}
\value{
Numeric scalar. The minimum detectable effect in the
units implied by \code{type}: standard deviation units (\code{type = "mean"}, with \code{sd = 1}) or absolute proportion-point difference
(\code{type = "proportion"} with \code{baseline} supplied), or Cohen's \code{h}
(\code{type = "proportion"} without \code{baseline}).
}
\description{
Inverts \code{\link[=mb_power]{mb_power()}}: given a sample size, target power, and
significance level, returns the smallest effect size the design
can reliably detect.
}
\examples{
mb_mde(n_per_group = 200)
mb_mde(n_per_group = 500, type = "proportion", baseline = 0.4)
}
\seealso{
\code{\link[=mb_power]{mb_power()}}, \code{\link[=mb_sample_size]{mb_sample_size()}}.

Other power: 
\code{\link{mb_cluster_design}()},
\code{\link{mb_icc_reference}()},
\code{\link{mb_power}()},
\code{\link{mb_sample_size}()},
\code{\link{mb_stepped_wedge}()}
}
\concept{power}
