model_param | R Documentation |
This function returns model parameters based on the best fit distribution
as selected by distr_fit
and models fitted by fit_models
model_param(fit.model, gof.res, model = NULL)
fit.model |
A list of models fitted by 'glm' from |
gof.res |
A list of selected model distributions for genes |
model |
A specific model to fit (1:P, 2:NB, 3:ZIP, 4:ZINB, NULL:All) |
A list of model parameters estimated. Estimated model parameters include mean (for all 4 models), theta (over-dispersion parameter for NB & ZINB models), pi (zero-inflation parameter for ZIP & ZINB models).
data(scData) # apply the model_param function to extract the parameters of the best fit # model obtained by running the select_model function library(BiocParallel) scData_models <- fit_models(counts=scData$counts, cexpr=scData$covariates, lib.size=scData$lib_size, BPPARAM=bpparam()) scData_bicvals <- model_bic(scData_models) scData_least.bic <- lbic_model(scData_bicvals, scData$counts) scData_gof <- gof_model(scData_least.bic, cexpr=scData$covariates, lib.size=scData$lib_size, BPPARAM=bpparam()) scData_fit <- select_model(scData_gof) scData_params <- model_param(scData_models, scData_fit, model=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.