There are no examples in the documentation, but based on its description,
Return a
model
wrapper indicating that it is a model over its return-values.
I assumed that this would allow me to do something like
chain = sample(returned(mymodel), ...)
or to use it as a submodel, but having it so that the parameters that are shown by Turing with describe(chain)
would be the returned values (potentially given a nicer user-facing output for models where parameters of interest are transformations of what actually gets sampled).
I am familiar with the discussion on how the generality of return
statements would make it so that this kind of operation cannot be expected to work in general, but this still leaves me wondering how to interpret the explanation given by the documentation and the intended use of such a function.