Calculate Bayesian-\(R^2\), LOO-\(R^2\), and leave-one-out predictive metrics for a regression model. Currently this is only calculated for IPD regression models. Any models with both IPD and AgD (e.g. ML-NMR) will ignore the AgD part for this calculation.
Arguments
- object, x
A
stan_nmaobject.- ...
Not used.
- probs
Numeric vector of quantiles of interest to present in computed summary, default
c(0.025, 0.25, 0.5, 0.75, 0.975)- summary
Logical, calculate posterior summaries? Default
TRUE.- metric
The type of predictive metric to be calculated. See
loo::loo_predictive_metric(). The default is root mean squared error ("rmse") for continuous or poisson outcomes, and true positive prediction rate ("acc") for binary outcomes.
Value
For bayes_R2() and loo_R2(): a nma_summary object if summary = TRUE, otherwise a 3D MCMC array of samples of the Bayesian or LOO
\(R^2\). For loo_predictive_metric(): a list with the estimate and
standard error.