Get list of identity matrices.

Share:

Description

Will provide a list of identity matrices for the specified modes.

Usage

1
start_ident(p, modes = NULL)

Arguments

p

A vector of integers. This is the dimension of the array and the length of the list to be created.

modes

A vector of integers. These are the indices in the list to be given an identity matrix.

Details

Given a vector of dimensions p and a vector indicating which modes will get an identity matrix modes, this function will return a list start_vals where start_vals[[i]] is the identity matrix of dimensions p[i] if i is in modes and will be NULL otherwise.

This is primarily used when getting starting values in equi_mcmc.

Value

start_vals A list of identity matrices and NULL values.

Author(s)

David Gerard.

See Also

equi_mcmc.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.