Yes, if we want to allow matrices, that should do it.
But...
The reason we didn't is that we never defined what
arguments should be legal.
One simple approach is to provide a linearization for
each data type (for 1D arrays it's natural, for matrices,
column major, etc.) The problem is that it would allow
users to write things like this:
matrix[3,2] y;
matrix[2,3] mu;
real sigma;
y ~ normal(mu,sigma);
where we would wind up with:
y[1,1] ~ normal(mu[1,1],sigma);
y[2,1] ~ normal(mu[2,1],sigma);
y[3,1] ~ normal(mu[1,2],sigma);
...
y[3,2] ~ normal(mu[2,3],sigma);
This would also allow:
matrix[3,2] y;
vector[6] mu;
real y;
y ~ normal(mu,sigma);
We'd also talked about what would happen if we did something
like:
vector[3] y;
matrix[4,3] m;
m ~ normal(y,sigma);
We'd want to repeat the column y 4 times?
I think everyone decided all of this is just too confusing
and that if there were vector, matrix, etc. args, they
all had to have the same shape (allowing for 1D arrays,
row vectors and column vectors as the same shape, so you
could do this:
vector[3] y;
row_vector[3] mu;
real<lower=0> sigma[3];
y ~ normal(mu,sigma);
This is already allowed.
- Bob
On 1/8/13 5:26 PM, Ben Goodrich wrote:
> --
>
>