% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{acs_simulate_fn}
\alias{acs_simulate_fn}
\title{Simulate a derived ACS statistic.}
\usage{
acs_simulate_fn(
  estimates,
  moes,
  fn,
  cov = NULL,
  n_sims = 1000,
  dist = c("normal", "censored_normal"),
  conf = 0.9,
  summary = c("mean", "median", "ci"),
  point = c("mean", "median")
)
}
\arguments{
\item{estimates}{Numeric estimates.}

\item{moes}{Numeric MOEs corresponding to \code{estimates}.}

\item{fn}{Function applied to each simulated row.}

\item{cov}{Optional covariance matrix on the standard-error scale.}

\item{n_sims}{Number of Monte Carlo simulations.}

\item{dist}{Distribution assumption: \code{"normal"} or \code{"censored_normal"}. The
censored variant replaces below-zero draws with zero, matching the
convention used in Napierala & Denton (2017) for ACS counts.}

\item{conf}{Confidence level associated with input MOEs.}

\item{summary}{Summary to return: \code{"mean"}, \code{"median"}, or \code{"ci"}.}

\item{point}{For \code{summary = "ci"}, point estimate to report alongside the
percentile interval: \code{"mean"} (default) or \code{"median"}.}
}
\value{
A data frame summarizing the simulated derived statistic.
}
\description{
Simulate a derived ACS statistic.
}
\details{
For \code{summary = "ci"}, the returned interval is the central
\code{conf}-level percentile interval of the simulated derived values. The
reported \code{estimate} is the chosen \code{point} summary of those values.
}
\examples{
set.seed(1)
acs_simulate_fn(c(100, 50), c(10, 5), fn = sum, n_sims = 500)
set.seed(1)
acs_simulate_fn(c(100, 50), c(10, 5), fn = sum, n_sims = 500,
                summary = "ci", conf = 0.90)
}
