statsmodels.emplike.elanova.ANOVA.compute_ANOVA#

ANOVA.compute_ANOVA(mu=None, mu_start=0, return_weights=False, *, use_namedtuple=None)[source]#

Returns -2 log likelihood, the pvalue and the maximum likelihood estimate for a common mean

Parameters:
mufloat

If a mu is specified, ANOVA is conducted with mu as the common mean. Otherwise, the common mean is the maximum empirical likelihood estimate of the common mean. Default is None.

mu_startfloat

Starting value for common mean if specific mu is not specified. Default = 0.

return_weightsbool

if TRUE, returns the weights on observations that maximize the likelihood. Default is FALSE.

use_namedtuplebool, optional

Flag indicating whether to return the results as an ANOVAResult NamedTuple instead of a plain tuple. When return_weights=True the NamedTuple holds the same four elements as the legacy tuple, so it unpacks identically and is always returned, with no warning. When return_weights=False the legacy three-element tuple is returned by default and a FutureWarning is issued.

Deprecated since version 0.15.0: In release 0.16.0 or after July 2027, whichever is later, the default will change to always return an ANOVAResult. Set use_namedtuple=True to opt in now, or use_namedtuple=False to silence the warning and keep the current return type.

Returns:
ANOVAResult or tuple

If use_namedtuple=True or return_weights=True, a NamedTuple with fields llr, pvalue, mu and weights. See ANOVAResult.

Otherwise (the deprecated default), the plain (llr, pvalue, mu) tuple.