sampleAlpha: Sample alpha Conditional on Partition and K Using an...

View source: R/sample_e0_alpha.R

sampleAlphaR Documentation

Sample alpha Conditional on Partition and K Using an Metropolis-Hastings Step with Log-Normal Proposal

Description

Sample \alpha conditional on the current partition and value of K using an Metropolis-Hastings step with log-normal proposal.

Usage

sampleAlpha(N, Nk, K, alpha, s0_proposal, log_pAlpha)

Arguments

N

A number; indicating the sample size.

Nk

An integer vector; indicating the group sizes in the partition.

K

A number; indicating the number of components.

alpha

A numeric value; indicating the value for \alpha.

s0_proposal

A numeric value; indicating the standard deviation of the random walk.

log_pAlpha

A function; evaluating the log prior of \alpha.

Value

A named list containing:

  • "alpha": a numeric, the new \alpha value.

  • "acc": logical indicating acceptance.


telescope documentation built on April 10, 2026, 9:09 a.m.