Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates publication-quality descriptive statistics, balance tables, and correlation matrices for econometric analysis in Python and R.
86% 100%+14 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 19 of 22 without it.
3 of 3 safety checks passed
Not used yet
This skill generates publication-quality summary statistics tables, balance tables, and correlation matrices — the essential "Table 1" found in every empirical economics paper.
# Python — publication-quality summary stats
import pandas as pd
# Basic summary stats
desc = df[['income', 'age', 'education', 'hours_worked']].describe().T
desc = desc[['count', 'mean', 'std', 'min', '25%', '50%', '75%', 'max']]
desc.columns = ['N', 'Mean', 'SD', 'Min', 'P25', 'Median', 'P75', 'Max']
print(desc.round(3).to_string())
# Using tableone for clinical/econ style Table 1
# pip install tableone
from tableone import TableOne
table1 = TableOne(df, columns=['income', 'age', 'education', 'hours_worked'],
categorical=['female', 'race'],
groupby='treatment', pval=True)
print(table1.tabulate(tablefmt="github"))
table1.to_excel("table1.xlsx")
# R — modelsummary::datasummary
library(modelsummary)
Next to this one in the catalogue, plus more from the same author.