Extract weights from `draws`

objects, with one weight per draw.
See `weight_draws`

for details how to add weights to `draws`

objects.

# S3 method for draws weights(object, log = FALSE, normalize = TRUE, ...)

object | (draws) A |
---|---|

log | (logical) Should the weights be returned on the log scale?
Defaults to |

normalize | (logical) Should the weights be normalized to sum to 1 on
the standard scale? Defaults to |

... | Arguments passed to individual methods (if applicable). |

A vector of weights, with one weight per draw.

#> [1] 0.12537521 0.51153003 0.43158989 0.01586271 1.98827365 1.42360646# add weights x <- weight_draws(x, weights = wts) # extract weights head(weights(x)) # defaults to normalized weights#> [1] 2.943483e-04 1.200939e-03 1.013260e-03 3.724149e-05 4.667947e-03 #> [6] 3.342256e-03#> [1] 0.12537521 0.51153003 0.43158989 0.01586271 1.98827365 1.42360646#> [1] -8.130747 -6.724652 -6.894582 -10.198087 -5.367036 -5.701109#> [1] -2.0764444 -0.6703490 -0.8402795 -4.1437844 0.6872667 0.3531934#> [1] 2.943483e-04 1.200939e-03 1.013260e-03 3.724149e-05 4.667947e-03 #> [6] 3.342256e-03#> [1] -2.0764444 -0.6703490 -0.8402795 -4.1437844 0.6872667 0.3531934