adjust_dimensions: Adjust Dimensions of Prior Parameters for Stan Usage

View source: R/mcmc.R

adjust_dimensionsR Documentation

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)

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.

Value

The parameters adjusted to the appropriate dimensions for Stan.


rbmi documentation built on Nov. 5, 2025, 7:30 p.m.