check_initial: Checks the initial values of the MCMC

View source: R/checks.R

check_initialR Documentation

Checks the initial values of the MCMC

Description

This function is for internal use only.

Usage

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

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 Aug. 30, 2023, 1:09 a.m.