% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcmc_raceNMA.R
\name{mcmc_raceNMA}
\alias{mcmc_raceNMA}
\title{Fit a Bayesian Rank-Clustered Estimation model for Network Meta-Analysis (RaCE-NMA) using multiple MCMC chains}
\usage{
mcmc_raceNMA(
  posterior = NULL,
  mu_hat = NULL,
  cov = NULL,
  s = NULL,
  mu0 = NULL,
  sigma0 = NULL,
  tau = NULL,
  nu0 = NULL,
  iter = 4000,
  nu_iter = 5,
  chains = 2,
  burn_prop = 0.5,
  thin = 1,
  seed = NULL,
  verbose = TRUE
)
}
\arguments{
\item{posterior}{A matrix of posterior draws of relative intervention effects based on a previous NMA. The (i,j) is the ith draw of the effect of intervention j.}

\item{mu_hat}{A vector of estimated average relative intervention effects based on a previous NMA. The jth entry is the effect of intervention j. Ignored if \code{posterior} is supplied.}

\item{cov}{A variance covariance matrix of relative intervention effects based on a previous NMA. The (i,j) entry is the covariane between intervention i and j's effects. Ignored if \code{posterior} is supplied.}

\item{s}{A vector of the estimated standard deviations of each intervention. The jth entry is the standard deviation of intervention j. Ignored if \code{posterior} is supplied.}

\item{mu0}{The hyperparameter mu0. If \code{NULL}, set to mean(mu_hat).}

\item{sigma0}{The hyperparameter sigma_0. If \code{NULL}, set to sqrt(10*var(mu_hat)) which aims to be minimally informative.}

\item{tau}{The standard deviation of the Metropolis Hastings proposal distribution. If \code{NULL}, set to min(|mu_hat_i-mu_hat_j|).}

\item{nu0}{A numeric vector for the initialization of worth parameters, mu, in the MCMC algorithm. Default to \code{NULL}, indicating random initialization.}

\item{iter}{A numeric indicating the total number of outer MCMC iterations (i.e., the number of times the partition is updated in the Gibbs sampler).}

\item{nu_iter}{A numeric indicating the number of times each worth parameter is drawn per update of the parameter partition. There will be a total of \code{iter}x\code{nu_iter} samples from the posterior.}

\item{chains}{A numeric indicating the total number of independent MCMC chains to be run.}

\item{burn_prop}{A numeric between 0 and 1 indicating the proportion of MCMC samples in each chain to be removed as burn-in.}

\item{thin}{A numeric indicating that only every \code{thin}-th sample should be retained, to save computational memory.}

\item{seed}{A numeric indicating the random seed that should be set before running the first MCMC chain.}

\item{verbose}{A boolean indicating if the function should print progress updates as the MCMC chains run. Default to \code{TRUE}.}
}
\value{
A (\code{chains}x\code{iter}/\code{thin})x(3J+3) matrix of posterior draws, one row per posterior sample of mu, nu, and g, with additional columns indicating the MCMC chain index, iteration index, and number of non-empty partition clusters K of each posterior sample.
}
\description{
This function fits a Bayesian RaCE-NMA model to data from a previous network meta-analysis. The function has input parameters to permit drawing multiple MCMC chains, as well as chain thinning and burn-in.
}
\examples{
mcmc <- mcmc_raceNMA(mu_hat=c(0,0,1,1), s=c(.1,.1,.1,.1), seed=1)
head(mcmc)
}
