This works but I’m wondering if declaring X as an array instead of a matrix could be inconvenient in some way. After reading this thread on the topic, I believe using basic types (matrix, vector, row_vector, etc.) is generally preferable since you can do matrix arithmetic and linear algebra with them. Is it not possible at all?
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to declare and use integer matrices | 3 | 1651 | June 29, 2020 | |
| Syntax error in '/var/folders/q4/gvrdsnj94vl527nfhj25rxh40000gn/T/RtmpPAvJxS/model-15caa89dcc9a.stan', line 10, column 7 to column 8, parsing error: | 3 | 270 | March 30, 2024 | |
| Real to Int | 26 | 7633 | July 10, 2017 | |
| Mismatch in number dimensions | 22 | 3023 | March 10, 2020 | |
| Vector and matrix variables with dimension of size 0 | 3 | 1676 | March 9, 2017 |