rbmf.vector.gibbs {rstiefel}R Documentation

Gibbs Sampling for the Vector-variate Bingham-von Mises-Fisher Distribution

Description

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

Usage

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.

Author(s)

Peter Hoff

References

Hoff(2009)

Examples


## 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))
  }


[Package rstiefel version 1.0.1 Index]