As part of a more complex model, I have N \times N matrix X = I - B where I is identity matrix and B is asymmetric matrix with zeros on diagonal, lots of structural zeros and arbitrary unknown elements b_{ij} elsewhere (zeros are symmetric, but b_{ij} \neq b_{ji}). I assume a priori that b_{ij} \sim N(0.5, 0.25), although in terms of the application it wouldn’t be awful to assume that they are all constrained between [0, 1] if that makes a difference.

Currently I have just written

```
parameters {
vector[N] b;
}
model {
b ~ normal(0.5, 0.25);
matrix[N,N] X = rep_matrix(0.0, N, N);
for(i in 1:N) {
// fill X;
}
// do something with X
// I don't actually invert X anywhere but invertibility is assumed implicitly
}
```

Now I’m wondering if this works as intended as I am defining elements b_{ij} without any constraints in the parameter block, while they actually are somehow constrained as I assume X is invertible? Would the situation change if I actually tried to invert the matrix X which would then reject some parameter combinations? My guess is no, as Stan would still try to sample b in the unconstrained space?