Calculate the conditional mean & variance of a sub-vector
of a random vector given the rest elements, where the random vector follows a multivariate normal distribution.
This function calculates the conditional mean & variance of a multivariate normal distribution,
with (meanVec
, varMat
), conditional on y at the indices conditionalIndex
.
conditionalDistMvnorm(y, conditionalIndex, meanVec, varMat)
the vector of the known values to be conditioned on.
the index to be conditioned on.
the mean vector the joint multivariate normal distribution.
the variance-covariance matrix of the joint multivariate normal distribution.
a list consisting of 'mean' and 'var' representing the conditional mean and variance respectively.