How to define a "ragged array" (array of arrays with different sizes)?

306 views
Skip to first unread message

ZiYuan Lin

unread,
Sep 5, 2014, 2:42:45 PM9/5/14
to stan-...@googlegroups.com
Hi all,

the setting is like I have multiple tasks, and the tasks have different numbers of observations. To store the observations I think I need an array of arrays with different length. How to write this in stan? Thanks.

Best,
Ziyuan

Bob Carpenter

unread,
Sep 5, 2014, 2:46:07 PM9/5/14
to stan-...@googlegroups.com
Check out the section of the manual titled "Representing Ragged
Arrays in Stan". It's in the clustering chapter. There's no
built-in data type for it (yet), so it's a bit of effort.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages