Dear Frédéric,
A variable in a model does not necessarily have a prior. But I think we should be talking about nodes, because a variable is just a label for an object that may contain one or more nodes. A node that is stochastic and is not data will have a prior.
Scalar constants are absorbed completely without creating a variable. Non-scalar constants become variables.
In your example, `matrix_exp_quiz_PM[i, 2:6]` (for each i) will be labeled as a right-hand-side only (or RHSonly) node, meaning it does not have a declaration in which it appears on the left-hand-side of `<-` or `~`. A typical example is a covariate or explanatory variable.
If you use `model$getNodeNames`, you will find an option to include RHS only nodes or not (default not).
With clarification on these points, are you able to modify your use of the model to get the correct calculations done as you need?
Perry