% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_raceNMA.R
\name{fit_raceNMA}
\alias{fit_raceNMA}
\title{Fit a Bayesian Rank-Clustered Estimation model for Network Meta-Analysis (RaCE-NMA). Recommended for internal use only; use mcmc_RCMVN instead.}
\usage{
fit_raceNMA(
  posterior = NULL,
  mu_hat = NULL,
  cov = NULL,
  s = NULL,
  mu0 = NULL,
  sigma0 = NULL,
  tau,
  nu0,
  iter,
  nu_iter
)
}
\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.}
}
\value{
A list of 4 elements: \code{mu}, a (\code{iter}x\code{nu_iter})x\code{J} matrix of approximate posterior draws of the intervention-specific worth parameters, mu; \code{nu} a (\code{iter}x\code{nu_iter})x\code{J} matrix of the unique parameter values corresponding to the jth partition cluster in posterior draw i, \code{g} a a (\code{iter}x\code{nu_iter})x\code{J} matrix indicating the cluster membership of object j in posterior draw i, and \code{K} a vector of the number of non-empty partition clusters in each posterior draw.
}
\description{
This function fits a Bayesian RaCE-NMA model to data from a previous network meta-analysis.
}
\examples{
fit_raceNMA(mu_hat=c(0,0,1,1), s=c(.1,.1,.1,.1), mu0=0.5, sigma0=5, tau=0.5,
          nu0 = NULL, iter = 5000, nu_iter = 2)
}
