The sample method in cmdstanr allows users to specify an init argument, see https://mc-stan.org/cmdstanr/reference/model-method-sample.html.
But the options seem limited:
- pass a scalar x, and have the init be sampled between [-x, x]
- pass 0
- pass the path to a file with init values
The latter is fine provided we can pass a different file for each chain. Would it be possible to implement something a la RStan, where the user specifies a function
init()? Under the hood, the function is ran N times, where N is the number of chains, and each run outputs an Rdump file that’s then called by cmdstan.
Maybe this is already an available feature?