inmoose.limma.fitFDist
- inmoose.limma.fitFDist(x, df1, covariate=None)
Moment estimation of the parameters of a scaled F-distribution given one of the degrees of freedom.
This function is called internally by
eBayes()andsqueezeVar()and is not usually called directly by a user.This function implements an algorithm proposed by [Smyth2004] and [Phipson2016]. It estimates
scaleanddf2under the assumption thatxis distributed asscaletimes an F-distributed random variable ondf1anddf2degrees of freedom. The parameters are estimated using the method of moments, specifically from the mean and variance of thexvalues on the log-scale.When
covariateis supplied, a spline curve trend will be estimated for thexvalues and the estimation will be adjusted for this trend [Phipson2016].- Parameters:
x (array_like) – 1-D array of positive values representing a sample from a scaled F-distribution
df1 (array_like) – the first degrees of freedom of the F-distribution. Can be a single value or an array of the same length as
x.covariate – if not
None, the estimated scale value will depend on this numeric covariate.
- Returns:
a dictionary with the following components:
"scale", a scale factor for F-distribution. An array ifcovariateis notNone, a scalar otherwise."df2", the second degrees of freedom of the fitted F-distribution.
- Return type:
dict