% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ELPDweight.R
\name{ELPDweight}
\alias{ELPDweight}
\title{Return the probability of models compared with loo being the best for prediction}
\usage{
ELPDweight(
  loos = stop("A named list of loo data must be provided."),
  nreplicates = 10000
)
}
\arguments{
\item{loos}{A named list of loos}

\item{nreplicates}{Number of replicates.}
}
\value{
A vector with the probabilities
}
\description{
Calculate the probability of models compared with loo being the best for prediction.
It uses simulation using the pointwise LOO log-predictive densities. This preserves the correlation
between models, because all models are evaluated on the same observations. This is the approach
recommended by Aki Vehtari et al. (2017) when uncertainty in model comparison matters.
}
\details{
ELPDweight calculates the probability that each model is best for prediction
}
\examples{
\dontrun{
model1_loo <- loo::loo(model1)
model2_loo <- loo::loo(model2)
ELPDweight(list(model1=model1_loo, model2=model2_loo))
}
}
\references{
Vehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27(5), 1413-1432. https://doi.org/10.1007/s11222-016-9696-4
}
\seealso{
Other AIC:
\code{\link[=ExtractAIC.glm]{ExtractAIC.glm()}},
\code{\link[=FormatCompareAIC]{FormatCompareAIC()}},
\code{\link[=compare_AIC]{compare_AIC()}},
\code{\link[=compare_AICc]{compare_AICc()}},
\code{\link[=compare_BIC]{compare_BIC()}}
}
\author{
Marc Girondot \email{marc.girondot@gmail.com}
}
\concept{AIC}
