statsmodels.emplike.descriptive.DescStatUV.test_skew#

DescStatUV.test_skew(skew0, return_weights=False, *, result_object=None)[source]#

Returns -2 x log-likelihood and p-value for the hypothesized skewness.

Parameters:
skew0float

Skewness value to be tested

return_weightsbool, optional

If True, function also returns the weights that maximize the likelihood ratio. Default is False.

result_objectbool, optional

Flag indicating whether to return the results as an EmpLikeTestResult NamedTuple instead of a plain tuple. When return_weights=True the NamedTuple holds the same three elements as the legacy tuple, so it unpacks identically and is always returned, with no warning. When return_weights=False the legacy two-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 EmpLikeTestResult. Set result_object=True to opt in now, or result_object=False to silence the warning and keep the current return type.

Returns:
EmpLikeTestResult or tuple

If result_object=True or return_weights=True, a NamedTuple with fields llr, pvalue and weights. See EmpLikeTestResult.

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