check_initial: Checks the initial values of the MCMC

Description Usage Arguments Details Value Examples

View source: R/checks.R

Description

This function is for internal use only.

Usage

1
check_initial(initial, nchains)

Arguments

initial

Either a vector or matrix,.

nchains

Integer scalar. Number of chains.

Details

When initial is a vector, the values are recycled to form a matrix of size nchains * length(initial).

Value

A named matrix.

Examples

1
2
3
4
5
6
7
8
init <- c(.4, .1)
check_initial(init, 1)
check_initial(init, 2)

init <- matrix(1:9, ncol=3)
check_initial(init, 3)

# check_initial(init, 2) # Returns an error

fmcmc documentation built on Jan. 14, 2022, 9:07 a.m.