Generates indicator spec list.
Generates the "indicator spec" used by Stan
.indicator_spec(formList, mm)
formList |
|
mm |
The indicator spec consists of two parts. The first part is J_f, or the number of indicators under each factor. The second part is an [F, J] array, wherein each row defines the 1:J_f[f] columns of the indicator matrix belonging to the factor. Example: [1, 3, 5, 0, 0, 0]: J_f[1] = 3 [2, 4, 6, 0, 0, 0]: J_f[2] = 3 [1, 2, 3, 4, 0, 0]: J_f[3] = 4; J = 6; F = 3
List containing J_f (Indicators per factor; numeric vector) and F_ind (FxJ Numeric Matrix, where F_ind[f,1:J_f] gives the column indices of the model matrix corresponding to factor f.)
Stephen R. Martin
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.