possigma2n | R Documentation |
Full conditional function for sigma2
possigma2n(as, bs, M, Yn, k, Tln, alphan)
as |
The hyperparameter value for the shape parameter in the inverse-gamma prior for the variance component |
bs |
The hyperparameter value for the scale parameter in the inverse-gamma prior for the variance component |
M |
A scalar representing the number of points available for each data sequence |
Yn |
A vector or matrix with data sequences for a cluster |
k |
A scalar for the number of changes points in a cluster |
Tln |
A vector with the change-point positions for a cluster |
alphan |
A vector with the constant level values for each interval between change points for a cluster |
A numerical value corresponding to a sampled value from the full conditional of the variance component
This function is called within the Gibbs sampler, but it can be used separately as well.
[gibbs_alg()]
data(data)
possigma2n(as = 2, bs = 1000, M = 50, Yn = data[,1], k = 0, Tln = 50, alphan = 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.