Return the data frame containing the gradients for all parameters.

gradients()

Value

A list of lists. See Examples.

See also

Examples

# \dontrun{
test <- cmdstanr_example("logistic", method = "diagnose")

# retrieve the gradients
test$gradients()
#>   param_idx     value     model finite_diff        error
#> 1         0 -1.956090  42.51440    42.51440 -1.09401e-08
#> 2         1 -0.130427 -13.33070   -13.33070 -1.40895e-08
#> 3         2  1.228760 -24.25270   -24.25270 -4.45662e-08
#> 4         3  0.625050   3.12825     3.12825 -3.33963e-09
# }