compare_fit {countfitteR}R Documentation

Compare fits

Description

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

Usage

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

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

[Package countfitteR version 1.4 Index]