rmvnorm_prec function

Multivariate Normal Random Deviates using Sparse Precision

Multivariate Normal Random Deviates using Sparse Precision

This function provides a random number generator for the multivariate normal distribution with mean equal to mean and sparse precision matrix Q.

rmvnorm_prec(Q, n = 1, mean = rep(0, nrow(Q)))

Arguments

  • Q: sparse precision (inverse-covariance) matrix.
  • n: number of observations.
  • mean: mean vector.

Returns

a matrix with dimension length(mean) by n, containing realized draws from the specified mean and precision

  • Maintainer: James T. Thorson
  • License: GPL-3
  • Last published: 2025-03-21