Description Usage Arguments Value
View source: R/MHAlogrithmMulti.R
Metropolis-Hastings Algorithm to sample data from multivariate distribution
1 2 3 4 5 6 7 8 | MHAlogrithmmulti(
TargetDensity,
nvar,
CGDensity = "multivariateNormal",
xinit = NULL,
sigma = NULL,
niter = 1000
)
|
TargetDensity |
A function: The PDF of target density function from which the users want to sample. This should be as a function of x. |
nvar |
A scalar: The number of variables |
CGDensity |
Candidate Generating Density function (default is multivariate normal distribution) |
xinit |
A vector: The starting point of the algorithm |
sigma |
A matrix: The covariance matrix of the candidate generating distribution |
niter |
A scalar: The number of data to sample |
Return the data collection sampled from the MH Algorithm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.