bayes_R2.hsstan: Bayesian and LOO-adjusted R-squared
Description
Compute the Bayesian and the LOO-adjusted R-squared from the posterior
samples. For Bayesian R-squared it uses the modelled residual variance
(rather than the variance of the posterior distribution of the residuals).
The LOO-adjusted R-squared uses Pareto smoothed importance sampling LOO
residuals and Bayesian bootstrap.
The mean, standard deviation and posterior interval of R-squared if
summary=TRUE, or a vector of R-squared values with length equal to
the size of the posterior sample if summary=FALSE.
Arguments
object
An object of class hsstan.
prob
Width of the posterior interval (0.95, by default). It is
ignored if summary=FALSE.
summary
Whether a summary of the distribution of the R-squared
should be returned rather than the pointwise values (TRUE by
default).
...
Currently ignored.
References
Andrew Gelman, Ben Goodrich, Jonah Gabry and Aki Vehtari (2019),
R-squared for Bayesian regression models,
The American Statistician, 73 (3), 307-309.
tools:::Rd_expr_doi("10.1080/00031305.2018.1549100")