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.816810  37.64170    37.64170 -8.16570e-10
#> 2         1  0.376746 -18.33100   -18.33100 -3.03892e-08
#> 3         2  0.477942 -15.36460   -15.36460 -2.99484e-08
#> 4         3  1.852310  -7.94121    -7.94121 -3.99522e-08
# }