I am fitting a hierarchical Hidden-Markov model with
cmdstanr. I am using data from 20 subjects, each with around a 1000 trials (distributed across 20 block). The forward algorithm is implemented directly, hence I have to store about 20 x 20 x 100 variables for the forward-variables (and an equal number for the backward- and forward-backward smoothed ones as I wish to estimate by-trial probabilities).
Fitting the model works just fine and with lower number of subjects/blocks/trials, there is no issue whatsoever. However, when using the full dataset,
cmdstanr cannot read back its own output files. In fact, it gets stuck in some obscure computation when trying to access any of the fitted model variables (such as using
fit$draws() and even if trying to use
fit$save_object(). This is the case, even if I use
fit$optimize() instead of
fit$sample(), even though the resulting output file from the fit (attached) is has only a single line (but a lot of variables, obviously) and is only about 9 MB in size.
This is the cmdstanr-file from an
Is this a known issue? Can I do anything to circumvent the issue? Currently, I am switching back to
- Operating System: Linux (Debian 6.3.0-18)
- CmdStan Version: 2.26.1
- Compiler/Toolkit: GCC 6.3.0 20170516