Takes an mcpfit
as input and computes information criteria using loo or WAIC. Compare models using loo_compare
and loo_model_weights
. more in loo
.
criterion(fit, criterion = "loo", ...) # S3 method for mcpfit loo(x, ...) # S3 method for mcpfit waic(x, ...)Arguments fit
An mcpfit
object.
One of "loo"
(calls loo
) or "waic"
(calls waic
).
Currently ignored
xAn mcpfit
object.
a loo
or psis_loo
object.
loo
: Computes loo on mcpfit objects
waic
: Computes WAIC on mcpfit objects
# \donttest{ # Define two models and sample them # options(mc.cores = 3) # Speed up sampling model1 = list(y ~ 1 + x, ~ 1) model2 = list(y ~ 1 + x) # Without a change point fit1 = mcp(model1, ex_plateaus) fit2 = mcp(model2, ex_plateaus) # Compute LOO for each and compare (works for waic(fit) too) fit1$loo = loo(fit1) fit2$loo = loo(fit2) loo::loo_compare(fit1$loo, fit2$loo) # }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4