If I have data of the form
and in a particular use of my model have P=0 I can just pass an 0xN matrix from R to Stan.
However, if I try to do the equivalent with an array of matrices
passing a 0xNxN array as x then Stan chokes with (here N=10)
"mismatch in number dimensions declared and found in context; processing stage=data initialization; variable name=x; dims declared=(0,10,10); dims found=(0)"
Passing an empty list doesn’t work, and everything is fine with P>0. It seems at some point the dim attributes of x got lost. Is this a bug? Is there some other way I can pass in the array that would work?
(the context is a model with some optional components. I can work
around by making additional special case stan files but this is pretty
Thanks in advance for any help.