Pg multivariate
Skill Exekiel179/pingouin-psych-stats/skills/pg-multivariate
Skill plugin for Claude Code, Codex & other AI agents: small, safety-first Pingouin workflows for psychology statistics — assumption checks, S0–S5 supervision gates, reproducible Python, and APA-style reporting.
npx -y skills add Exekiel179/pingouin-psych-stats --skill pg-multivariateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Run or generate Pingouin code for multivariate comparisons — Hotelling's T-squared test (multivariate_ttest) — plus the multivariate assumption checks box_m (equal covariance) and multivariate_normality, for designs with several dependent variables.
SKILL.md
2.7 KB, 684 tokens by cl100k_base, as published. Nobody here has run it
PG Multivariate
Use when several continuous dependent variables are compared together (a mean-vector / profile question), rather than one outcome at a time.
Load
Read:
../../references/supervision-gates.md../../references/pingouin-api-quickref.md../../references/apa-output-template.mdif writing results.
Decision Rules
- Compare one group's mean vector to a reference (one-sample) ->
pg.multivariate_ttest(X). - Compare mean vectors of two independent groups ->
pg.multivariate_ttest(X, Y). - Paired multivariate comparison (same participants) ->
pg.multivariate_ttest(X, Y, paired=True). - Check equal covariance matrices across groups (assumption) ->
pg.box_m(data, dvs, group). - Check multivariate normality (assumption) ->
pg.multivariate_normality(X).
Required Inputs
- Two or more continuous dependent variables (the outcome vector).
- Grouping column for the two-sample test and Box's M.
- Whether the comparison is one-sample, independent, or paired.
X/Yare arrays or frames of shape (n, k); drop rows with missing DVs first.
Code Patterns
Hotelling's T-squared, two independent groups:
X = df.loc[df["group"].eq("A"), ["v1", "v2", "v3"]].to_numpy()
Y = df.loc[df["group"].eq("B"), ["v1", "v2", "v3"]].to_numpy()
res = pg.multivariate_ttest(X, Y).round(3)
pg.print_table(res)
One-sample (mean vector vs zero; subtract a reference first if needed):
res = pg.multivariate_ttest(df[["v1", "v2", "v3"]].to_numpy()).round(3)
pg.print_table(res)
Assumption checks:
pg.box_m(df, dvs=["v1", "v2", "v3"], group="group") # equal covariance
pg.multivariate_normality(df[["v1", "v2", "v3"]], alpha=0.05) # Henze-Zirkler
Output Checks
multivariate_ttest returns index hotelling with T2, F, df1, df2, pval. box_m returns Chi2, df, pval, equal_cov (bool). multivariate_normality returns (hz, pval, normal); normal=False warns against assuming multivariate normality.
Guardrails
- Hotelling's T-squared needs n greater than the number of DVs and roughly multivariate-normal data; check
multivariate_normality. - A significant Box's M (unequal covariance) undermines the pooled test; report it.
- Pingouin covers Hotelling's T-squared, not full factorial MANOVA — for that recommend statsmodels or R.
- Report T2, F, df, p, and which assumption checks were run.
- End result-bearing answers with one compact S0-S5 audit line.