estimateDirichDist: Nonlinear Parameter Estimation for Dirichlet Distribution

View source: R/estimateDirichDist.R

estimateDirichDistR Documentation

Nonlinear Parameter Estimation for Dirichlet Distribution

Description

The parameter estimation is accomplished using a count data matrix. The estimation is based on the fact that if a variable x = (x_1, x_2, ...x_n) follows Dirichlet Distribution with parameters \alpha = \alpha_1, ... , \alpha_n (all positive reals), in short, x ~ Dir(\alpha), then x_i ~ Beta(\alpha_i, \alpha_0 - \alpha_i), where Beta(.) stands for the Beta distribution and \alpha_0 = \sum \alpha_i.

Dirichlet distribution is a family of continuous multivariate probability distributions, a multivariate generalization of the Beta distribution.

Usage

estimateDirichDist(
  x,
  start = NULL,
  num.cores = 1L,
  tasks = 0L,
  seed = 123,
  refit = TRUE,
  verbose = TRUE,
  ...
)

Arguments

x

A matrix or a data.frame object carrying count data.

start

Initial parameter values for \alpha = \alpha_1, ... , \alpha_n (all positive reals). Defaults is NULL.

num.cores, tasks

Parameters for parallel computation using BiocParallel-package: the number of cores to use, i.e. at most how many child processes will be run simultaneously (see bplapply and the number of tasks per job (only for Linux OS).

verbose

if TRUE, prints the function log to stdout and a progress bar

...

Further arguments for betaDistEstimation function.

Details

As any non-linear fitting, results strongly depends on the start parameter values.

Value

A vector of estimated parameter values

Author(s)

Robersy Sanchez <https://genomaths.com>

See Also

betaDistEstimation and betaBinPost

Examples

#' ## A random generation numerical vectors with
x <- rdirichlet(n = 1000, alpha = c(2.1, 3.1, 1.2))
head(x)

estimateDirichDist(x)


genomaths/usefr documentation built on April 18, 2023, 3:35 a.m.