mqr.anova.

groups#

mqr.anova.groups(result, *, value: str, factor: str, conf=0.95, formatted=True)#

The value column from a dataframe averaged over factor, and annotated with confidence intervals per level.

See [1] (pp. 538-541) for construction of t-statistic.

Parameters:
dfpandas.DataFrame

A dataframe of measurements and categories.

valuestr

Name of the column to average into groups.

factorstr

Name of the column (categorical) to group by.

conffloat, optional

The confidence level used to form an interval (decimal).

formattedbool, optional

When True, returns a formatted DataFrame. Set this to False to access the calculated values.

Returns:
pandas.DataFrame or pandas.io.formats.style.Styler

Average values per group with confidence intervals. A DataFrame when formatted is True, a Styler otherwise.

References

[1]

Saville, David J., and Graham R. Wood. Statistical methods: The geometric approach. Springer Science & Business Media, 2012.