statsmodels.stats.nonparametric.RankCompareResult#
- class statsmodels.stats.nonparametric.RankCompareResult(statistic, pvalue, s1, s2, var1, var2, var, var_prob, nobs1, nobs2, nobs, mean1, mean2, prob1, prob2, somersd1, somersd2, df, use_t)[source]#
Results for rank comparison
This includes results from intermediate computations, as well as methods for hypothesis tests, confidence intervals and summary.
- Parameters:
- statistic
float The Brunner-Munzel W statistic.
- pvalue
float p-value based on the t distribution if use_t is True, otherwise based on the normal distribution.
- s1
float Variance-like quantity for sample 1 used in the Brunner-Munzel statistic.
- s2
float Variance-like quantity for sample 2 used in the Brunner-Munzel statistic.
- var1
float Estimated variance contribution of sample 1 to prob1.
- var2
float Estimated variance contribution of sample 2 to prob2.
- var
float Estimated variance of statistic.
- var_prob
float Estimated variance of prob1 (and prob2).
- nobs1
int Number of observations in sample 1.
- nobs2
int Number of observations in sample 2.
- nobs
int Total number of observations,
nobs1 + nobs2.- mean1
float Mean rank of sample 1 in the pooled sample.
- mean2
float Mean rank of sample 2 in the pooled sample.
- prob1
float Probability that a random draw from sample 1 is stochastically larger than a random draw from sample 2,
P(x1 > x2) + 0.5 * P(x1 = x2).- prob2
float Probability that a random draw from sample 2 is stochastically larger than a random draw from sample 1. Equal to
1 - prob1.- somersd1
float Somers’ D statistic based on prob1,
2 * prob1 - 1.- somersd2
float Somers’ D statistic based on prob2,
2 * prob2 - 1.- df
floatorNone Degrees of freedom used for the t distribution if use_t is True, otherwise None.
- use_tbool
Whether the t distribution (True) or normal distribution (False) is used for pvalue and inference in the instance methods.
- statistic
- Attributes:
- df
- mean1
- mean2
- nobs
- nobs1
- nobs2
- prob1
- prob2
- pvalue
- s1
- s2
- somersd1
- somersd2
- statistic
- use_t
- var
- var1
- var2
- var_prob
Methods
conf_int([value, alpha, alternative])Confidence interval for probability that sample 1 has larger values
confint_lintransf([const, slope, alpha, ...])Confidence interval of a linear transformation of prob1
effectsize_normal([prob])Cohen's d, standardized mean difference under normality assumption
summary([alpha, xname])Summary table for probability that random draw x1 is larger than x2
test_prob_superior([value, alternative])Test for superiority probability
tost_prob_superior(low, upp)Test of stochastic (non-)equivalence of p = P(x1 > x2)
Notes
Unpacks as
statistic, pvalue = result. Other values are only accessible using attributes.Methods
conf_int([value, alpha, alternative])Confidence interval for probability that sample 1 has larger values
confint_lintransf([const, slope, alpha, ...])Confidence interval of a linear transformation of prob1
effectsize_normal([prob])Cohen's d, standardized mean difference under normality assumption
summary([alpha, xname])Summary table for probability that random draw x1 is larger than x2
test_prob_superior([value, alternative])Test for superiority probability
tost_prob_superior(low, upp)Test of stochastic (non-)equivalence of p = P(x1 > x2)
Properties