Simulate a random normal vector from the Bingham distribution using Gibbs sampling.

1 | ```
rbing.vector.gibbs(A, x)
``` |

`A` |
a symmetric matrix. |

`x` |
the current value of the random normal vector. |

a new value of the vector `x`

obtained by Gibbs sampling.

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

Peter Hoff

Hoff(2009)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
## The function is currently defined as
rbing.vector.gibbs <-
function(A,x)
{
#simulate from the vector bmf distribution as described in Hoff(2009)
#this is one Gibbs step, and must be used iteratively
evdA<-eigen(A,symmetric=TRUE)
E<-evdA$vec
l<-evdA$val
y<-t(E)
x<-E
x/sqrt(sum(x^2))
#One improvement might be a rejection sampler
#based on a mixture of vector mf distributions.
#The difficulty is finding the max of the ratio.
}
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.