Description Usage Arguments Value Examples

Sample gamma from its full conditional distribution

1 2 | ```
get_gamma_sample(prior_mean, prior_precision, kernel_matrix, tau, y,
return_mean = FALSE)
``` |

`prior_mean` |
Prior mean of gamma |

`prior_precision` |
Prior precision of gamma |

`kernel_matrix` |
DPC kernel matrix |

`tau` |
Sampled value of tau |

`y` |
Observation value(s) |

`return_mean` |
Provide full conditional mean as pseudo-sample? |

Either the full conditional mean of gamma or a sample of it

1 2 3 4 5 6 | ```
km = list(mat = Matrix::Diagonal(2, 1))
prior_pr = Matrix::Diagonal(2, 0.3)
tau = 5
post_pr = get_posterior_precision(prior_pr, km, tau)
get_gamma_sample(prior_mean = rep(0, 2), prior_precision = prior_pr,
kernel_matrix = km, tau = tau, y = c(0.9, 0.7), return_mean = TRUE)
``` |

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.