inmoose.limma.tmixture_matrix

inmoose.limma.tmixture_matrix(tstat, stdev_unscaled, df, proportion, v0_lim=None)

Estimate scale factor in mixture of t-distributions

This function estimates the unscaled standard deviation of the true (unobserved) log fold changes for differentially expressed genes. It is used internally by eBayes() and is not intended to be called directly by users.

The values in each column of tstat are assumed to follow a mixture of an ordinary t-distribution, with mixing proportion 1-proportion, and (v0+v1)/v1 times a t-distribution, with mixing proportion proportion. Here v1 is stdev_unscaled**2 and v0 is the value to be estimated.

Parameters:
  • tstat (ndarray) – matrix of t-statistics

  • stdev_unscaled (ndarray) – matrix, conformal with tstat, containing the unscaled standard deviations of the coefficients used to compute the t-statistics

  • df (array_like) – array giving the degrees of freedom associated with tstat

  • proportion (float) – assumed proportion of genes that are differentially expressed

  • v0_lim (pair of floats, optional) – lower and upper limits for the estimated unscaled standard deviations

Returns:

estimated v0 values, one for each column of tstat

Return type:

ndarray