Learn R Programming

countSTAR (version 1.0.2)

sample_params_mean: Sample the parameters for a simple mean-only model

Description

Sample the parameters for the model y ~ N(mu0, sigma^2) with a flat prior on mu0 and sigma ~ Unif(0, A).

Usage

sample_params_mean(y, params)

Value

The updated named list params with draws from the full conditional distributions of sigma and coefficients (and updated mu).

Arguments

y

n x 1 vector of data

params

the named list of parameters containing

  1. mu: vector of conditional means (fitted values)

  2. sigma: the conditional standard deviation

  3. coefficients: a named list of parameters that determine mu