Dirichlet multinomial GLM likelihood ratio test for a single cluster

dirichlet_multinomial_anova_mc(
  xFull,
  xNull,
  y,
  concShape = 1.0001,
  concRate = 1e-04,
  robust = T,
  outlier_prior_a = 1.01,
  outlier_prior_b = 100,
  fit_null = NULL,
  debug = F,
  init = "smart",
  smart_init_regularizer = 0.001,
  ...
)

Arguments

xFull

[samples] x [covariates] matrix for the alternative model

xNull

[samples] x [covariates] matrix for the null model

y

[samples] x [introns] matrix of intron usage counts

concShape

Gamma shape parameter for concentration parameter

concRate

Gamma rate parameter for concentration parameter

robust

Whether to include an outlier model (i.e. use dm_glm_multi_conc_robust rather than dm_glm_multi_conc)

outlier_prior_a

Only used for robust model. The outlier probability outlier_prob ~ Beta(outlier_prior_a,outlier_prior_b)

outlier_prior_b

Only used for robust model. The outlier probability outlier_prob ~ Beta(outlier_prior_a,outlier_prior_b)

fit_null

Optionally cache the fitted null model to save repeatedly fitting the null for each cis-SNP when sQTL mapping)

debug

Whether to give verbose output from rstan.

init

Can be one of "smart", "random". smart uses an method of moments estimator to get a reasonable initialization. The seed for "random" can be set through the ... arguments passed to rstan::optimizing.

smart_init_regularizer

Used to protect against colinear covariates.

...

will be passed on the rstan::optimizing, so can be used for example to set the algorithm used (default is LBFGS) or the random seed if random initialization is requested.