compare_fit: Compare fits

Description Usage Arguments Value Examples

View source: R/compare_fit.R

Description

Compare empirical distribution of counts with the distribution defined by the model fitted to counts.

Usage

1
compare_fit(count_list, fitlist = fit_counts(count_list, model = "all"))

Arguments

count_list

A list of counts. Each count should be in separate column, rows should represent values of these counts.

fitlist

a list of fits, as created by fit_counts.

Value

A data.frame with distribution values for each unique count. Count is the name of the original count, model is the name of distribution model, x is unique count value, n is the frequency of unique counts, value is result of calculations made by chosen distribution model.

Examples

1
2
df <- data.frame(poisson = rpois(25, 0.3), binomial = rbinom(25, 1, 0.8))
compare_fit(df, fitlist = fit_counts(df, model = "all"))

countfitteR documentation built on Oct. 23, 2020, 5:11 p.m.