Learn R Programming

BayesCPclust (version 0.1.0)

postalphak: Full conditional for alphak

Description

Full conditional for alphak

Usage

postalphak(M, Y, sigma2, K, Tl, cluster, clusteri)

Value

A numerical vector of size `K` + 1 with sampled values from the full conditional of alphak for a given cluster `clusteri`

Arguments

M

A scalar representing the number of points available for each data sequence

Y

A matrix M x N with the data sequences

sigma2

A vector with the variances of the data sequences (or its initial values)

K

A vector containing the number of change points for each cluster (or its initial values)

Tl

A list containing a vector for each cluster determining the change-point positions in each cluster (or its initial values)

cluster

A vector containing the cluster assignments for the data sequences (or its initial values)

clusteri

A scalar with the index of a cluster

See Also

[gibbs_alg()]

Examples

Run this code
data(data)
postalphak(M = 50, Y = data, sigma2 = 0.05, K = c(0, 0), Tl = c(50, 50),
 cluster = c(1,1,2,1,2), clusteri = 1)

Run the code above in your browser using DataLab