Functions#

ANOVA and T-test#

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

One-way and N-way ANOVA.

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

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([data, dv, within, subject, ...])

Mixed-design (split-plot) ANOVA.

welch_anova([data, dv, between])

One-way Welch ANOVA.

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

Two One-Sided Test (TOST) for equivalence.

ttest(x, y[, paired, alternative, ...])

T-test.

ptests(self[, paired, decimals, padjust, ...])

Pairwise T-test between columns of a dataframe.

Bayesian#

bayesfactor_binom(k, n[, p, a, b])

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

bayesfactor_ttest(t, nx[, ny, paired, ...])

Bayes Factor of a T-test.

bayesfactor_pearson(r, n[, alternative, ...])

Bayes Factor of a Pearson correlation.

Circular#

convert_angles(angles[, low, high, positive])

Element-wise conversion of arbitrary-unit circular quantities to radians.

circ_axial(angles, n)

Transforms n-axial data to a common scale.

circ_corrcc(x, y[, correction_uniform])

Correlation coefficient between two circular variables.

circ_corrcl(x, y)

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

circ_mean(angles[, w, axis])

Mean direction for (binned) circular data.

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

Mean resultant vector length for circular data.

circ_rayleigh(angles[, w, d])

Rayleigh test for non-uniformity of circular data.

circ_vtest(angles[, 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[, alternative, method])

(Robust) correlation between two variables.

pairwise_corr(data[, columns, covar, ...])

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[, alternative, n_boot, seed])

Distance correlation between two arrays.

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

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, *[, axis, ddof, nan_policy])

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

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

pairwise_tests([data, dv, between, within, ...])

Pairwise tests.

pairwise_tukey([data, dv, between, effsize])

Pairwise Tukey-HSD post-hoc test.

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

Pairwise Games-Howell post-hoc test.

ptests(self[, paired, decimals, padjust, ...])

Pairwise T-test between columns of a dataframe.

multicomp(pvals[, alpha, method])

P-values correction for multiple comparisons.

Multivariate tests#

box_m(data, dvs, group[, alpha])

Test equality of covariance matrices using the Box's M test.

multivariate_normality(X[, alpha])

Henze-Zirkler multivariate normality test.

multivariate_ttest(X[, Y, paired])

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

Non-parametric#

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

Cochran Q test.

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

Friedman test for repeated measurements.

kruskal([data, dv, between, 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[, alternative])

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

wilcoxon(x[, y, alternative])

Wilcoxon signed-rank test.

harrelldavis(x[, quantile, axis])

Harrell-Davis robust estimate of the \(q^{th}\) quantile(s) of the data.

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.

read_dataset(dname)

Read example datasets.

list_dataset()

List available example datasets.

set_default_options()

Reset Pingouin's default global options (e.g. rounding).

Plotting#

plot_blandaltman(x, y[, agreement, xaxis, ...])

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

plot_circmean(angles[, square, ax, ...])

Plot the circular mean and vector length of a set of angles on the unit circle.

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

Paired plot.

plot_shift(x, y[, paired, n_boot, ...])

Shift plot.

plot_rm_corr([data, x, y, subject, legend, ...])

Plot a repeated measures correlation.

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

Quantile-Quantile plot.

Power analysis#

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

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

power_rm_anova([eta_squared, m, n, power, ...])

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, alternative])

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

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

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

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, targets, raters, ...])

Intraclass correlation.