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:
statisticfloat

The Brunner-Munzel W statistic.

pvaluefloat

p-value based on the t distribution if use_t is True, otherwise based on the normal distribution.

s1float

Variance-like quantity for sample 1 used in the Brunner-Munzel statistic.

s2float

Variance-like quantity for sample 2 used in the Brunner-Munzel statistic.

var1float

Estimated variance contribution of sample 1 to prob1.

var2float

Estimated variance contribution of sample 2 to prob2.

varfloat

Estimated variance of statistic.

var_probfloat

Estimated variance of prob1 (and prob2).

nobs1int

Number of observations in sample 1.

nobs2int

Number of observations in sample 2.

nobsint

Total number of observations, nobs1 + nobs2.

mean1float

Mean rank of sample 1 in the pooled sample.

mean2float

Mean rank of sample 2 in the pooled sample.

prob1float

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).

prob2float

Probability that a random draw from sample 2 is stochastically larger than a random draw from sample 1. Equal to 1 - prob1.

somersd1float

Somers’ D statistic based on prob1, 2 * prob1 - 1.

somersd2float

Somers’ D statistic based on prob2, 2 * prob2 - 1.

dffloat or None

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.

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