Learn R Programming

telescope (version 0.2-1)

sampleE0: Sample e0 conditional on partition and K using an Metropolis-Hastings step with log-normal proposal.

Description

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

Usage

sampleE0(K, Kp, N, Nk, s0_proposal, e0, log_p_e0)

Value

A named list containing:

  • "e0": a numeric, the new \(e_0\) value.

  • "acc": logical indicating acceptance.

Arguments

K

A number; indicating the number of components.

Kp

A number; indicating the number of filled components \(K_+\).

N

A number; indicating the sample size.

Nk

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

s0_proposal

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

e0

A numeric value; indicating the current value of \(e_0\).

log_p_e0

A function; evaluating the log prior of \(e_0\).