Learn R Programming

BayesianTools (version 0.1.0)

generateTestDensityMultiNormal: Multivariate normal likelihood

Description

Generates a 3 dimensional multivariate normal likelihood function.

Usage

generateTestDensityMultiNormal(mean = c(0, 0, 0),
  sigma = "strongcorrelation", sample = F, n = 1, throwErrors = -1)

Arguments

mean
vector with the three mean values of the distribution
sigma
either a correlation matrix, or "strongcorrelation", or "no correlation"
sample
should the function create samples
n
number of samples to create
throwErrors
parameter for test purpose

Details

3-d multivariate normal density function with mean 2,4,0 and either strong correlation (default), or no correlation.

See Also

testDensityBanana testLinearModel

Examples

Run this code
# sampling from the test function
x = generateTestDensityMultiNormal(sample  = TRUE, n = 1000)(1000)
correlationPlot(x)
marginalPlot(x)

# generating the the density
density = generateTestDensityMultiNormal(sample  = FALSE)
density(x[1,])

Run the code above in your browser using DataLab