sample_ref_std: Sample the standard deviation of subject random effects

Description Usage Arguments Value

Description

Produce a Gibbs sample of the standard deviation of subject random effects in a state

Usage

1
sample_ref_std(alpha, ref_std, s, nsubj, prior_hc_scale, prop_std)

Arguments

alpha

a matrix of current update of subject random effects

ref_std

current value of the standard deviations of subject random effects

s

a specific state

nsubj

total number of subjects

prior_hc_scale

scale parameter of half-Cauchy prior

prop_std

random walk proposal standard deviation

Value

A vector whose first element is a Gibbs sample and second element is a binary indicator value of acceptance or rejection of the proposed sample in random walk Metropolis–Hastings algorithm


zhifeiyan/WeibullHM documentation built on May 4, 2019, 11:21 p.m.