Compute the gradient of log density (which is returned by monty_model_density) with respect to parameters. Not all models support this, and an error will be thrown if it is not possible.
Arguments
- model
A monty_model object
- parameters
A vector or matrix of parameters
- named
Logical, indicating if the output should be named using the parameter names.
See also
monty_model_density for log density, and monty_model_direct_sample to sample from a model