Description Usage Arguments Value Examples

Applies the Zig-Zag Sampler to a Gaussian target distribution, as detailed in Bierkens, Fearnhead, Roberts, The Zig-Zag Process and Super-Efficient Sampling for Bayesian Analysis of Big Data, 2016. Assume potential of the form

*U(x) = (x - mu)^T V (x - mu)/2,*

i.e. a Gaussian with mean vector `mu`

and covariance matrix `inv(V)`

1 2 | ```
ZigZagGaussian(V, mu, n_iter = -1L, finalTime = -1, x0 = numeric(0),
v0 = numeric(0))
``` |

`V` |
the inverse covariance matrix (or precision matrix) of the Gaussian target distribution. |

`mu` |
mean of the Gaussian target distribution |

`n_iter` |
Number of algorithm iterations; will result in the equivalent amount of skeleton points in Gaussian case because no rejections are needed. |

`finalTime` |
If provided and nonnegative, run the sampler until a trajectory of continuous time length finalTime is obtained (ignoring the value of |

`x0` |
starting point (optional, if not specified taken to be the origin) |

`v0` |
starting direction (optional, if not specified taken to be +1 in every component) |

Returns a list with the following objects:

`Times`

: Vector of switching times

`Positions`

: Matrix whose columns are locations of switches. The number of columns is identical to the length of `skeletonTimes`

. Be aware that the skeleton points themselves are NOT samples from the target distribution.

`Velocities`

: Matrix whose columns are velocities just after switches. The number of columns is identical to the length of `skeletonTimes`

.

1 2 3 4 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.