View source: R/pareto_smooth.R
pareto_khat | R Documentation |
Estimate Pareto k value by fitting a Generalized Pareto Distribution to one or two tails of x. This can be used to estimate the number of fractional moments that is useful for convergence diagnostics. For further details see Vehtari et al. (2022).
pareto_khat(x, ...)
## Default S3 method:
pareto_khat(
x,
tail = c("both", "right", "left"),
r_eff = NULL,
ndraws_tail = NULL,
verbose = FALSE,
...
)
## S3 method for class 'rvar'
pareto_khat(x, ...)
x |
(multiple options) One of:
|
... |
Arguments passed to individual methods (if applicable). |
tail |
(string) The tail to diagnose/smooth:
The default is |
r_eff |
(numeric) relative effective sample size estimate. If
|
ndraws_tail |
(numeric) number of draws for the tail. If
|
verbose |
(logical) Should diagnostic messages be printed? If
|
khat
estimated Generalized Pareto Distribution shape parameter k
Aki Vehtari, Daniel Simpson, Andrew Gelman, Yuling Yao and Jonah Gabry (2022). Pareto Smoothed Importance Sampling. arxiv:arXiv:1507.02646
mu <- extract_variable_matrix(example_draws(), "mu")
pareto_khat(mu)
d <- as_draws_rvars(example_draws("multi_normal"))
pareto_khat(d$Sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.