Repository navigation
Expand file tree
/
Copy pathcompare_ic.Rd
More file actions
57 lines (52 loc) · 1.53 KB
/
Copy pathcompare_ic.Rd
File metadata and controls
57 lines (52 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loo.R
\name{compare_ic}
\alias{compare_ic}
\title{Compare Information Criteria of Different Models}
\usage{
compare_ic(..., x = NULL, ic = c("loo", "waic", "kfold"))
}
\arguments{
\item{...}{At least two objects returned by
\code{\link{waic}} or \code{\link{loo}}.
Alternatively, \code{brmsfit} objects with information
criteria precomputed via \code{\link{add_ic}}
may be passed, as well.}
\item{x}{A \code{list} containing the same types of objects as
can be passed via \code{...}.}
\item{ic}{The name of the information criterion to be extracted
from \code{brmsfit} objects. Ignored if information
criterion objects are only passed directly.}
}
\value{
An object of class \code{iclist}.
}
\description{
Compare information criteria of different models fitted
with \code{\link{waic}} or \code{\link{loo}}.
Deprecated and will be removed in the future. Please use
\code{\link{loo_compare}} instead.
}
\details{
See \code{\link{loo_compare}} for the recommended way
of comparing models with the \pkg{loo} package.
}
\examples{
\dontrun{
# model with population-level effects only
fit1 <- brm(rating ~ treat + period + carry,
data = inhaler)
waic1 <- waic(fit1)
# model with an additional varying intercept for subjects
fit2 <- brm(rating ~ treat + period + carry + (1|subject),
data = inhaler)
waic2 <- waic(fit2)
# compare both models
compare_ic(waic1, waic2)
}
}
\seealso{
\code{\link{loo}},
\code{\link{loo_compare}}
\code{\link{add_criterion}}
}