% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mlumr-package.R
\docType{package}
\name{mlumr-package}
\alias{mlumr-package}
\title{mlumr: Multilevel Unanchored Meta-Regression for Indirect Treatment
Comparisons}
\description{
Bayesian multilevel unanchored meta-regression (ML-UMR) for population-
adjusted indirect comparisons between a single-arm individual patient
data (IPD) study on the index treatment and aggregate data (AgD) on a
comparator. Two model variants are provided: a shared-prognostic-factor
(SPFA) model and a relaxed-SPFA model that allows treatment-specific
covariate coefficients. Supports binary (binomial), continuous (normal),
and count (Poisson) outcomes, each with appropriate link functions.
Frequentist outcome regression (Simulated Treatment Comparison) and a
naive unadjusted benchmark are included for side-by-side comparison.
}
\section{Typical workflow}{

\enumerate{
\item \code{\link[=set_ipd]{set_ipd()}} — declare the individual patient data and its
covariates.
\item \code{\link[=set_agd]{set_agd()}} — declare the aggregate-data arm.
\item \code{\link[=combine_data]{combine_data()}} — join the two into an \code{mlumr_data} object.
\item \code{\link[=add_integration]{add_integration()}} — build the Gaussian-copula QMC
integration points used to marginalize over the AgD covariate
distribution.
\item \code{\link[=mlumr]{mlumr()}} — fit the Bayesian ML-UMR model (SPFA or relaxed).
\item \code{\link[=prior_summary]{prior_summary()}}, \code{\link[=check_integration]{check_integration()}} — sanity-check the
model before inferring from it.
\item \link[=predict.mlumr_fit]{predict()}, \code{\link[=marginal_effects]{marginal_effects()}},
\code{\link[=conditional_effects]{conditional_effects()}}, \code{\link[=conditional_predict]{conditional_predict()}} — extract
population-level and profile-specific quantities.
\item \code{\link[=calculate_dic]{calculate_dic()}}, \code{\link[=calculate_loo]{calculate_loo()}}, \code{\link[=calculate_waic]{calculate_waic()}},
\code{\link[=compare_models]{compare_models()}} — compare SPFA vs relaxed or competing
specifications.
\item \code{\link[=prior_sensitivity]{prior_sensitivity()}} — verify the posterior is data-driven
rather than prior-driven.
}
}

\section{Priors}{

The prior constructors \code{\link[=prior_normal]{prior_normal()}}, \code{\link[=prior_student_t]{prior_student_t()}},
\code{\link[=prior_cauchy]{prior_cauchy()}}, and \code{\link[=prior_exponential]{prior_exponential()}} all plug into \code{\link[=mlumr]{mlumr()}} via
\code{prior_intercept}, \code{prior_beta}, and (normal family only) \code{prior_sigma}.
Defaults follow the Stan community's prior-choice recommendations
(Vehtari et al., 2025).
}

\section{Alternative methods}{

\code{\link[=stc]{stc()}} runs frequentist parametric G-computation (Simulated Treatment
Comparison). \code{\link[=naive]{naive()}} computes an unadjusted crude-rate benchmark. Both
consume the same \code{mlumr_data} object as \code{\link[=mlumr]{mlumr()}} so their estimands can
be compared directly.
}

\seealso{
Useful links:
\itemize{
  \item \url{https://github.com/choxos/mlumr}
  \item Report bugs at \url{https://github.com/choxos/mlumr/issues}
}

}
\author{
\strong{Maintainer}: Ahmad Sofi-Mahmudi \email{a.sofimahmudi@gmail.com} (\href{https://orcid.org/0000-0001-6829-0823}{ORCID})

Authors:
\itemize{
  \item Ahmad Sofi-Mahmudi \email{a.sofimahmudi@gmail.com} (\href{https://orcid.org/0000-0001-6829-0823}{ORCID})
  \item Conor Chandler (\href{https://orcid.org/0000-0002-1365-9002}{ORCID})
}

}
\keyword{internal}
