Learn R Programming

countfitteR (version 1.4)

select_model: Select the most appropriate model

Description

Select the most appropriate model

Usage

select_model(fitlist)

Arguments

fitlist

a list of fits, as created by fit_counts.

Value

a data.frame with two columns: count representing the name of the count and chosen model with the model with the lowest BIC.

Examples

Run this code
# NOT RUN {
set.seed(1)
df <- data.frame(poisson1 = rpois(50, 2), 
                 poisson2 = rpois(50, 5),
                 zip1 = rZIP(50, 2, 0.7),
                 zip2 = rZIP(50, 5, 0.7))
fitlist_separate <- fit_counts(df, model = c("pois", "zip")) 
select_model(fitlist_separate)
# }

Run the code above in your browser using DataLab