# rbmf.vector.gibbs: Gibbs Sampling for the Vector-variate Bingham-von... In rstiefel: Random orthonormal matrix generation on the Stiefel manifold

## Description

Simulate a random normal vector from the Bingham-von Mises-Fisher distribution using Gibbs sampling.

## Usage

 `1` ```rbmf.vector.gibbs(A, c, x) ```

## Arguments

 `A` a symmetric matrix. `c` a vector with the same length as `x`. `x` the current value of the random normal vector.

## Value

a new value of the vector `x` obtained by Gibbs sampling.

## Note

This provides one Gibbs scan. The function should be used iteratively.

Peter Hoff

Hoff(2009)

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```## The function is currently defined as function (A, c, x) { evdA <- eigen(A) E <- evdA\$vec l <- evdA\$val y <- t(E) %*% x d <- t(E) %*% c x <- E %*% ry_bmf(y, l, d) x/sqrt(sum(x^2)) } ```

### Example output

```function (A, c, x)
{
evdA <- eigen(A)
E <- evdA\$vec
l <- evdA\$val
y <- t(E) %*% x
d <- t(E) %*% c
x <- E %*% ry_bmf(y, l, d)
x/sqrt(sum(x^2))
}
```

rstiefel documentation built on May 29, 2017, 11:58 a.m.