| inferenceJointGaussian | R Documentation |
For the model structure
x1,x2|mu,Sigma \sim Gaussian(mu,Sigma)
x1|x2,mu,Sigma \sim Gaussian(mu12,Sigma12)
inferenceJointGaussian(x2, mu, Sigma = NULL, Precision = NULL)
x2 |
numeric, an sample of X2, satisfying length(x2)<D, D is the dimension of the joint distribution. |
mu |
numeric, length D mean vector. mu=c(mu_X1,mu_X2)/. |
Sigma |
DxD covariance matrix. At least one of Sigma and Precision should be non-NULL. |
Precision |
DxD precision matrix, satisfying Precision = inverse(Sigma). At least one of Sigma and Precision should be non-NULL. |
A named list containing the conditional mean and covariance matrix.
tmp <- matrix(runif(100),20,5) S <- crossprod(tmp) #some synthetic covariance matrix P <- solve(S) m <- runif(5) x2 <- runif(3) inferenceJointGaussian(x2 = x2,mu = m,Precision = P)