statsmodels.stats.oneway.AnovaResult#

class statsmodels.stats.oneway.AnovaResult(*, statistic, pvalue, df, df_num, df_denom, nobs_total, n_groups, means, nobs, vars_, use_var, welch_correction, df2=None, df_num2=None, pvalue2=None)[source]#

Result of anova_generic and anova_oneway.

Parameters:
statisticfloat

Test statistic for k-sample mean comparison which is approximately F-distributed.

pvaluefloat

If use_var="bf", then the p-value is based on corrected degrees of freedom following Mehrotra 1997.

dftuple

Degrees of freedom (df_num, df_denom) for the F-distribution used for pvalue.

df_numfloat

Numerator degrees of freedom.

df_denomfloat

Denominator degrees of freedom used for pvalue.

nobs_totalfloat

Total number of observations across all samples.

n_groupsint

Number of samples being compared.

meansndarray

Mean of each sample.

nobsndarray

Number of observations in each sample.

vars_ndarray

Residual (within) variance of each sample.

use_var{“unequal”, “equal”, “bf”}

The use_var option that was used to compute the test.

welch_correctionbool

Whether the Welch correction was included in the test statistic.

df2tuple or None

Degrees of freedom (df_num2, df_denom) for the Brown-Forsythe 1974 p-value. Only set if use_var="bf", otherwise None.

df_num2float or None

Numerator degrees of freedom for the Brown-Forsythe 1974 p-value. Only set if use_var="bf", otherwise None.

pvalue2float or None

p-value based on degrees of freedom as in Brown-Forsythe 1974. Only set if use_var="bf", otherwise None.

Attributes:
df
df2
df_denom
df_num
df_num2
means
n_groups
nobs
nobs_total
pvalue
pvalue2
statistic
use_var
vars_
welch_correction

Notes

Unpacks as statistic, pvalue = result. Other values are only accessible using attributes.

Methods

Properties