Learn R Programming

rbmi (version 1.5.1)

adjust_dimensions: Adjust Dimensions of Prior Parameters for Stan Usage

Description

This function adjusts the dimensions of prior parameters based on whether the same covariance structure is used for all groups, and whether the parameters are lists of matrices or numeric vectors. This is really only necessary to deal with some peculiarities of how Stan handles arrays and vectors. See prepare_prior_params() where this is used.

Usage

adjust_dimensions(same_cov, param_list)

Value

The parameters adjusted to the appropriate dimensions for Stan.

Arguments

same_cov

A logical indicating whether the same covariance structure is used for all groups. If TRUE, the function will return the parameters only once.

param_list

A list of parameters, which can be matrices or numeric vectors. Note that this contains one element for each group, independent of same_cov.