Description Usage Arguments Value Examples
View source: R/r_truncated_multivariate_normal.R
Simulate S in R^M
and Z in R^d
given S in (alpha,beta]$
, where S = X + gamma^T Z
with X ~ Normal(0,I_N)
and Z ~ Normal(0,Gamma^T Gamma)
.
1 2 3 4 5 6 7 8 9 10 | r_truncated_multivariate_normal(
n = 1,
alpha,
beta,
gamma,
Gamma,
which = "Z",
eps = 1e-12,
maxit = 100
)
|
n |
Number of samples. Default: |
alpha |
Vector of lower bounds for S component. |
beta |
Vector of upper bounds for S component. |
gamma |
Matrix of linear transformations on Z component. |
Gamma |
Cholesky factor for variance on Z component. |
which |
Text string ( |
eps |
Convergence criteria for coupling from the past. Default: |
maxit |
Maximal number of steps in Gibbs sampler. Default: |
Simulations either as a matrix (if which="S"
or "Z"
), or as a list of matrices (if which="SZ"
).
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.