View source: R/model_fitting.R
fit_wo_copula | R Documentation |
This function only fits the marginal distribution for each gene.
fit_wo_copula(
x,
marginal = c("auto_choose", "zinb", "nb", "poisson"),
jitter = TRUE,
min_nonzero_num = 2
)
x |
A matrix of shape p by n that contains count values. |
marginal |
Specification of the types of marginal distribution. Default value is 'auto_choose' which chooses between ZINB, NB, ZIP and Poisson by a likelihood ratio test (lrt) and whether there is underdispersion. 'zinb' will fit the ZINB model. If there is underdispersion, it will choose between ZIP and Poisson by a lrt. Otherwise, it will try to fit the ZINB model. If in this case, there is no zero at all or an error occurs, it will fit an NB model instead. 'nb' fits the NB model that chooses between NB and Poisson depending on whether there is underdispersion. 'poisson' simply fits the Poisson model. |
jitter |
Logical, whether a random projection should be performed in the distributional transform. |
The genes of x
will be partitioned into two groups. The first group contains
genes with at least min_non_zero_num
non-zero values. The second group contains the
other genes. For the first group, the marginal distribution of each gene will be fitted.
For the last group, no model will be fitted and only the index of these genes will be
recorded. A list that contains the above fitted model will be returned that contains the
following components.
A matrix of the parameters for the marginal distributions of genes in group one.
A numeric vector of the row indices of the genes in group one.
A numeric vector of the row indices of the genes in group two.
Same as the input.
A character string that says 'ind', short for 'independent'. To be distinguished with the copula model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.