mnormal {lestat} | R Documentation |
Creates an object representing a multivariate normal distribution.
mnormal(expectation = c(0,0), P = diag(length(expectation)))
expectation |
A vector of length at least 2 specifying the expectation of the distribution. By default, the vector (0,0). |
P |
A matrix of size |
If \mu
is the expectation vector
and P
is the precision matrix, then the probability density function
is proportional to
f(x)=\exp(-0.5(x-\mu)^tP(x-\mu))
A multivariate normal probability distribution.
Petter Mostad <mostad@chalmers.se>
plot(mnormal())
plot(mnormal(c(1,2,3)))
plot(mnormal(c(1,2), matrix(c(1, 0.5, 0.5, 1), 2, 2)))