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
tstatare assumed to follow a mixture of an ordinary t-distribution, with mixing proportion1-proportion, and(v0+v1)/v1times a t-distribution, with mixing proportionproportion. Herev1isstdev_unscaled**2andv0is 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-statisticsdf (array_like) – array giving the degrees of freedom associated with
tstatproportion (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
v0values, one for each column oftstat- Return type:
ndarray