fit.and.evaluate: Fits the QC data to distributions and returns the KS test...

View source: R/fit.and.evaluate.R

fit.and.evaluateR Documentation

Fits the QC data to distributions and returns the KS test result and BIC score

Description

This function takes the accumulated QC scores, a vector of distributions and a trimming factor. It then returns the results for each distribution in a dataframe. This function supports the following distributions:

  • 'weibull'

  • 'norm'

  • 'gamma'

  • 'exp'

  • 'lnorm'

  • 'cauchy'

  • 'logis'

Usage

fit.and.evaluate(
  quality.scores,
  distributions = c("weibull", "norm", "gamma", "exp", "lnorm", "cauchy", "logis"),
  trim.factor = 0.05
)

Arguments

quality.scores

The accumulated QC scores, the output of accumulate.zscores

distributions

A vector of distributions to fit and test

trim.factor

The fraction of extremes on each end to trim before fitting

Value

A dataframe of the results with the following columns

distribution

Name of the fitted distribution

KS.rejected

Whether the Kolmogorov-Smirnov test rejects the fit; see fitdistrplus::gofstat - kstest

BIC.value

Bayesian Information Criterion


OmicsQC documentation built on May 29, 2024, 11:14 a.m.