Some models (such as a multivariate hidden Markov model) manipulate joint distributions composed of univariate (or possibly also multivariate) distributions.
Ie. a vector-valued random variable X with dimension k is assumed to follow some distribution pi(X), constructed of component univariate distributions: pi(X) = pi[1] (X[1]) pi[2] (X[2]) ... pi[k] (X[k])*
These distributions are conditionally independent, so in most models they can just be defined separately on each element of X, with no need for an extra function. Though in models like the HMM and some mixture models, it would be convenient to create a new joint distribution from others, which could then be manipulated. The syntax might look like:
X <- joint(normal(0, 1),
uniform(0,1))
for a variable following a joint distribution of dimension 2. Like other multivariate distributions, each row would be treated as an independent realisation so other dimensions would have to conform.
The internals would be similar to those for mixture() though the density would just require a rowwise summation of log probabilities.
Some models (such as a multivariate hidden Markov model) manipulate joint distributions composed of univariate (or possibly also multivariate) distributions.
Ie. a vector-valued random variable X with dimension k is assumed to follow some distribution pi(X), constructed of component univariate distributions: pi(X) = pi[1] (X[1]) pi[2] (X[2]) ... pi[k] (X[k])*
These distributions are conditionally independent, so in most models they can just be defined separately on each element of X, with no need for an extra function. Though in models like the HMM and some mixture models, it would be convenient to create a new joint distribution from others, which could then be manipulated. The syntax might look like:
for a variable following a joint distribution of dimension 2. Like other multivariate distributions, each row would be treated as an independent realisation so other dimensions would have to conform.
The internals would be similar to those for
mixture()
though the density would just require a rowwise summation of log probabilities.