Pg correlations
Skill Exekiel179/pingouin-psych-stats/skills/pg-correlations
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-correlationsAssembled 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 Pearson, Spearman, Kendall, partial, repeated-measures, distance, and pairwise correlations with APA-style reporting.
SKILL.md
2.3 KB, 496 tokens by cl100k_base, as published. Nobody here has run it
PG Correlations
Use for association analyses between continuous or ordinal variables.
Load
Read:
../../references/supervision-gates.md../../references/pingouin-api-quickref.md../../references/apa-output-template.mdif writing results.
Function Choice
- Two continuous variables, linear association ->
pg.corr(..., method="pearson"). - Ordinal or monotonic/non-normal association ->
method="spearman"ormethod="kendall". - Association controlling covariates ->
pg.partial_corr. - Many variables ->
pg.pairwise_corrwithpadjust. - Repeated observations per participant ->
pg.rm_corr. - Nonlinear dependence screening ->
pg.distance_corrif appropriate.
Required Inputs
- Variables to correlate.
- Whether observations are independent.
- Covariates, if partial correlation is requested.
- Multiple-comparison family and correction.
- Hypothesis direction; default to two-sided.
Code Patterns
Basic correlation:
res = pg.corr(x=df["x"], y=df["y"], method="pearson",
alternative="two-sided").round(3)
pg.print_table(res)
Partial correlation:
res = pg.partial_corr(data=df, x="x", y="y",
covar=["age", "baseline"],
method="pearson").round(3)
Pairwise correlations:
res = pg.pairwise_corr(data=df, columns=["x", "y", "z"],
method="spearman", padjust="holm").round(3)
Repeated-measures correlation:
res = pg.rm_corr(data=df, x="x", y="y", subject="id").round(3)
Reporting
Report n, r, CI, p-value, Bayes factor if returned, and method. Include a scatterplot recommendation when interpretation depends on linearity or outliers.
Guardrails
- Correlation is not causation.
- Do not use ordinary
pg.corrwhen observations repeat within participants. - If outliers drive the effect, report sensitivity analysis or robust alternative.
- If many correlations are explored, use and report p-value adjustment.
- Do not interpret partial correlation as causal control.
- End result-bearing answers with one compact S0-S5 audit line.