ic_tbl | R Documentation |
This is a helper function for creating a model comparison
<data.frame>
primarily for use in the superspreading vignettes. It
is designed specifically for handling fitdistrplus::fitdist()
output and
not a generalised function. See bbmle::ICtab()
for a more general use
function to create information criteria tables.
ic_tbl(..., sort_by = c("AIC", "BIC", "none"))
... |
dots One or more model fit results from
|
sort_by |
A |
A <data.frame>
.
if (requireNamespace("fitdistrplus", quietly = TRUE)) {
cases <- rnbinom(n = 100, mu = 5, size = 0.7)
pois_fit <- fitdistrplus::fitdist(data = cases, distr = "pois")
geom_fit <- fitdistrplus::fitdist(data = cases, distr = "geom")
nbinom_fit <- fitdistrplus::fitdist(data = cases, distr = "nbinom")
ic_tbl(pois_fit, geom_fit, nbinom_fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.