Functions

ANOVA and T-test

anova([dv, between, data, ss_type, …])

One-way and N-way ANOVA.

ancova([dv, covar, between, data, …])

ANCOVA with one or more covariate(s).

rm_anova([data, dv, within, subject, …])

One-way and two-way repeated measures ANOVA.

epsilon(data[, dv, within, subject, correction])

Epsilon adjustement factor for repeated measures.

mixed_anova([dv, within, subject, between, …])

Mixed-design (split-plot) ANOVA.

welch_anova([dv, between, data, export_filename])

One-way Welch ANOVA.

tost(x, y[, bound, paired, correction])

Two One-Sided Test (TOST) for equivalence.

ttest(x, y[, paired, tail, correction, r])

T-test.

Bayesian

bayesfactor_binom(k, n[, p])

Bayes factor of a binomial test with \(k\) successes, \(n\) trials and base probability \(p\).

bayesfactor_ttest(t, nx[, ny, paired, tail, r])

Bayes Factor of a T-test.

bayesfactor_pearson(r, n[, tail, method, kappa])

Bayes Factor of a Pearson correlation.

Circular

circ_axial(alpha, n)

Transforms n-axial data to a common scale.

circ_corrcc(x, y[, tail])

Correlation coefficient between two circular variables.

circ_corrcl(x, y[, tail])

Correlation coefficient between one circular and one linear variable random variables.

circ_mean(alpha[, w, axis])

Mean direction for circular data.

circ_r(alpha[, w, d, axis])

Mean resultant vector length for circular data.

circ_rayleigh(alpha[, w, d])

Rayleigh test for non-uniformity of circular data.

circ_vtest(alpha[, dir, w, d])

V test for non-uniformity of circular data with a specified mean direction.

Contingency

chi2_independence(data, x, y[, correction])

Chi-squared independence tests between two categorical variables.

chi2_mcnemar(data, x, y[, correction])

Performs the exact and approximated versions of McNemar’s test.

dichotomous_crosstab(data, x, y)

Generates a 2x2 contingency table from a pandas.DataFrame that contains only dichotomous entries, which are converted to 0 or 1.

Correlation and regression

corr(x, y[, tail, method])

(Robust) correlation between two variables.

pairwise_corr(data[, columns, covar, tail, …])

Pairwise (partial) correlations between columns of a pandas dataframe.

partial_corr([data, x, y, covar, x_covar, …])

Partial and semi-partial correlation.

pcorr(self)

Partial correlation matrix (pandas.DataFrame method).

rcorr(self[, method, upper, decimals, …])

Correlation matrix of a dataframe with p-values and/or sample size on the upper triangle (pandas.DataFrame method).

distance_corr(x, y[, tail, n_boot, seed])

Distance correlation between two arrays.

rm_corr([data, x, y, subject, tail])

Repeated measures correlation.

linear_regression(X, y[, add_intercept, …])

(Multiple) Linear regression.

logistic_regression(X, y[, coef_only, …])

(Multiple) Binary logistic regression.

mediation_analysis([data, x, m, y, covar, …])

Mediation analysis using a bias-correct non-parametric bootstrap method.

Distribution

anderson(*args[, dist])

Anderson-Darling test of distribution.

gzscore(x)

Geometric standard (Z) score.

homoscedasticity(data[, dv, group, method, …])

Test equality of variance.

normality(data[, dv, group, method, alpha])

Univariate normality test.

sphericity(data[, dv, within, subject, …])

Mauchly and JNS test for sphericity.

Effect sizes

compute_effsize(x, y[, paired, eftype])

Calculate effect size between two set of observations.

compute_effsize_from_t(tval[, nx, ny, N, eftype])

Compute effect size from a T-value.

convert_effsize(ef, input_type, output_type)

Conversion between effect sizes.

compute_esci([stat, nx, ny, paired, eftype, …])

Parametric confidence intervals around a Cohen d or a correlation coefficient.

compute_bootci(x[, y, func, method, paired, …])

Bootstrapped confidence intervals of univariate and bivariate functions.

Multiple comparisons and post-hoc tests

pairwise_corr(data[, columns, covar, tail, …])

Pairwise (partial) correlations between columns of a pandas dataframe.

pairwise_ttests([dv, between, within, …])

Pairwise T-tests.

pairwise_tukey([dv, between, data, alpha, …])

Pairwise Tukey-HSD post-hoc test.

pairwise_gameshowell([dv, between, data, …])

Pairwise Games-Howell post-hoc test.

multicomp(pvals[, alpha, method])

P-values correction for multiple comparisons.

bonf(pvals[, alpha])

P-values correction with Bonferroni method.

holm(pvals[, alpha])

P-values correction with Holm method.

fdr(pvals[, alpha, method])

P-values FDR correction with Benjamini/Hochberg and Benjamini/Yekutieli procedure.

Multivariate tests

multivariate_normality(X[, alpha])

Henze-Zirkler multivariate normality test.

multivariate_ttest(X[, Y, paired])

Hotelling T-squared test (= multivariate T-test)

Non-parametric

cochran([dv, within, subject, data, …])

Cochran Q test.

friedman([dv, within, subject, data, …])

Friedman test for repeated measurements.

kruskal([dv, between, data, detailed, …])

Kruskal-Wallis H-test for independent samples.

mad(a[, normalize, axis])

Median Absolute Deviation (MAD) along given axis of an array.

madmedianrule(a)

Robust outlier detection based on the MAD-median rule.

mwu(x, y[, tail])

Mann-Whitney U Test (= Wilcoxon rank-sum test).

wilcoxon(x, y[, tail])

Wilcoxon signed-rank test.

Others

print_table(df[, floatfmt, tablefmt])

Pretty display of table.

remove_na(x[, y, paired, axis])

Remove missing values along a given axis in one or more (paired) numpy arrays.

remove_rm_na([dv, within, subject, data, …])

Remove missing values in long-format repeated-measures dataframe.

read_dataset(dname)

Read example datasets.

list_dataset()

List available example datasets.

Plotting

plot_blandaltman(x, y[, agreement, …])

Generate a Bland-Altman plot to compare two sets of measurements.

plot_paired([data, dv, within, subject, …])

Paired plot.

plot_shift(x, y[, n_boot, percentiles, ci, …])

Shift plot.

plot_skipped_corr(x, y[, xlabel, ylabel, …])

Plot the bootstrapped 95% confidence intervals and distribution of a robust Skipped correlation.

qqplot(x[, dist, sparams, confidence, …])

Quantile-Quantile plot.

Power analysis

power_anova([eta, k, n, power, alpha])

Evaluate power, sample size, effect size or significance level of a one-way balanced ANOVA.

power_rm_anova([eta, m, n, power, alpha, …])

Evaluate power, sample size, effect size or significance level of a balanced one-way repeated measures ANOVA.

power_chi2(dof[, w, n, power, alpha])

Evaluate power, sample size, effect size or significance level of chi-squared tests.

power_corr([r, n, power, alpha, tail])

Evaluate power, sample size, correlation coefficient or significance level of a correlation test.

power_ttest([d, n, power, alpha, contrast, tail])

Evaluate power, sample size, effect size or significance level of a one-sample T-test, a paired T-test or an independent two-samples T-test with equal sample sizes.

power_ttest2n(nx, ny[, d, power, alpha, tail])

Evaluate power, effect size or significance level of an independent two-samples T-test with unequal sample sizes.

Reliability and consistency

cronbach_alpha([data, items, scores, …])

Cronbach’s alpha reliability measure.

intraclass_corr([data, items, raters, …])

Intra-class correlation coefficient.