Learn R Programming

BayesCPclust (version 0.1.0)

possigma2n: Full conditional function for sigma2

Description

Full conditional function for sigma2

Usage

possigma2n(as, bs, M, Yn, k, Tln, alphan)

Value

A numerical value corresponding to a sampled value from the full conditional of the variance component

Arguments

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

See Also

[gibbs_alg()]

Examples

Run this code
data(data)
possigma2n(as = 2, bs = 1000, M = 50, Yn = data[,1], k = 0, Tln = 50, alphan = 15)

Run the code above in your browser using DataLab