% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mvnormr.R
\name{qmvnormr}
\alias{qmvnormr}
\title{Equicoordinate Quantiles of the Multivariate Normal Distribution}
\usage{
qmvnormr(
  p,
  mean = NULL,
  sigma,
  n0 = 1024,
  n_max = 16384,
  R = 8,
  abseps = 1e-04,
  releps = 0,
  seed = 0,
  parallel = TRUE,
  nthreads = 0
)
}
\arguments{
\item{p}{The probability level (cumulative probability).}

\item{mean}{The mean vector. If \code{NULL} (default), a zero vector of
appropriate length is used.}

\item{sigma}{The covariance (or correlation) matrix of the distribution.}

\item{n0}{Initial number of samples per replication for the Monte Carlo
integration.}

\item{n_max}{Maximum number of samples allowed per replication.}

\item{R}{Number of independent replications used to estimate the error.}

\item{abseps}{Absolute error tolerance for the probability calculation.}

\item{releps}{Relative error tolerance for the probability calculation.}

\item{seed}{Random seed for reproducibility. If 0, a seed is generated
from the computer clock.}

\item{parallel}{Logical; if \code{TRUE}, computations are performed in parallel.}

\item{nthreads}{Number of threads for parallel execution. If 0, the
default RcppParallel behavior is used.}
}
\value{
A numeric value representing the calculated equicoordinate quantile.
}
\description{
Computes the equicoordinate quantile \eqn{q} such that
\eqn{P(X_1 \le q, X_2 \le q, \ldots, X_k \le q) = p} for a multivariate
normal random vector \eqn{X}.
}
\details{
This function finds the value \eqn{q} using a root-finding algorithm
applied to the \code{pmvnormr} function. It solves for the value where
the multivariate normal cumulative distribution function equals the
target probability \eqn{p}.
}
\examples{

n <- 5
mean <- rep(0, n)
sigma <- matrix(0.5, n, n)
diag(sigma) <- 1
qmvnormr(0.5, mean = mean, sigma = sigma)

}
\author{
Kaifeng Lu, \email{kaifenglu@gmail.com}
}
