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:
- mu
float 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_start
float 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
ANOVAResultNamedTuple instead of a plain tuple. Whenreturn_weights=Truethe NamedTuple holds the same four elements as the legacy tuple, so it unpacks identically and is always returned, with no warning. Whenreturn_weights=Falsethe legacy three-element tuple is returned by default and aFutureWarningis 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. Setuse_namedtuple=Trueto opt in now, oruse_namedtuple=Falseto silence the warning and keep the current return type.
- mu
- Returns:
ANOVAResultortupleIf
use_namedtuple=Trueorreturn_weights=True, a NamedTuple with fieldsllr,pvalue,muandweights. SeeANOVAResult.Otherwise (the deprecated default), the plain
(llr, pvalue, mu)tuple.