30 lines
631 B
R
30 lines
631 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/datasets.R
|
|
\name{rmvnorm}
|
|
\alias{rmvnorm}
|
|
\title{Multivariate Normal Distribution.}
|
|
\usage{
|
|
rmvnorm(n = 1, mu = rep(0, p), sigma = diag(p))
|
|
}
|
|
\arguments{
|
|
\item{n}{number of samples.}
|
|
|
|
\item{mu}{mean}
|
|
|
|
\item{sigma}{covariance matrix.}
|
|
}
|
|
\value{
|
|
a \eqn{n\times p}{n x p} matrix with samples in its rows.
|
|
}
|
|
\description{
|
|
Random generation for the multivariate normal distribution.
|
|
\deqn{X \sim N_p(\mu, \Sigma)}{X ~ N_p(\mu, \Sigma)}
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
rmvnorm(20, sigma = matrix(c(2, 1, 1, 2), 2))
|
|
rmvnorm(20, mu = c(3, -1, 2))
|
|
}
|
|
}
|
|
\keyword{internal}
|