View source: R/bwqs_main-revised.R
bwqs_waic | R Documentation |
This function compute the WAIC and LOO given a posterior distribution. The values of the logarithmic likelihood are extracted from Stan object of the bwqs function.
bwqs_waic(stanfit)
stanfit |
Object |
This function is implemented based on the formulas given
in http://www.stat.columbia.edu/~gelman/research/unpublished/waic_stan.
For examples of this function see example of bwqs
function
The function returns a list with:
waic |
value of total WAIC for the model |
elpd_waic |
expected log pointwise predictive density for a new dataset |
p_waic |
the estimated effective number of parameters |
elpd_loo |
approximation to the actual out-of-sample prediction error under the model |
p_loo |
effective number of parameters as the bias adjustment corresponding to the overfitting inherent |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.