latent_to_nwishart: Transform latent variables to Normalised Wishart

Description Usage Arguments Value Note Author(s) Examples

View source: R/transform.R

Description

Transform latent iid N(0,1) to Normalised Wishart matrices

Transform a Normalised Wishart matrix to latent iid N(0,1) variables

Usage

1
2
3
latent_to_nwishart(x, V_chol, df, lower_chol = FALSE)

latent_from_nwishart(W_chol, V_chol, df, lower_chol = FALSE)

Arguments

x

A vector of latent variables identifying the Normalised Wishart matrix, length d(d-1)/2

V_chol

The Cholesky factor of the Wishart V parameter

df

The Wishart degrees of freedom

lower_chol

TRUE if lower triangular Cholesky factors are used (default = FALSE)

W_chol

The Cholesky factor of the Normalised Wishart matrix

Value

A list with components

W_chol

The Cholesky factor of the Normalised Wishart matrix

s

Vector of scaling values

B_chol

The inner Cholesky factor of the Barlett decomposition

When lower_chol is FALSE, W_chol = (B_chol \%*\% V_chol) \%*\% diag(s).

When lower_chol is TRUE, W_chol = s * (V_chol \%*\% B_chol).

A list with components

x

A vector of latent variables identifying the Normalised Wishart matrix, length d(d-1)/2

s

Vector of scaling values

B_chol

The inner Cholesky factor of the Barlett decomposition

When lower_chol is FALSE, W_chol = (B_chol \%*\% V_chol) \%*\% diag(s).

When lower_chol is TRUE, W_chol = s * (V_chol \%*\% B_chol).

Note

This is an internal non-exported function

This is an internal non-exported function

Author(s)

Finn Lindgren

Finn Lindgren

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
if (interactive()) {
  # EXAMPLE1
}

## End(Not run)
## Not run: 
if (interactive()) {
  # EXAMPLE1
}

## End(Not run)

finnlindgren/multiprobit documentation built on June 20, 2020, 6:12 a.m.