API Reference
Explore
Exploratory analysis — descriptive / correlation / extreme-observation tables, distributions, time trends, group comparisons, missing-value maps, scatter plots, within/between variation, per-unit trajectories, panel-structure diagnostics, distribution & transition dynamics, and animated composition (treemap / sunburst).
| explore_descriptive_table(df[, stats, digits, …]) | Report descriptive statistics for the numeric/logical variables of df. |
| explore_correlation_table(df[, digits, bold, …]) | Correlation table with Pearson above and Spearman below the diagonal. |
| explore_ext_obs_table(df[, n, var, …]) | Display the top and bottom n observations sorted by var. |
| explore_histogram(df[, var, bins, …]) | Histogram of a numeric variable, optionally with density overlays. |
| explore_bar_plot(df, var[, order_by_count, color, …]) | Bar chart of category counts for a (typically categorical) variable. |
| explore_correlation_plot(df[, style, title, …]) | Visualise a correlation matrix (Pearson above, Spearman below the diagonal). |
| explore_trend_plot(df[, var, time, …]) | Line-plot the mean (with standard-error bars) of variables over time. |
| explore_quantile_trend_plot(df[, quantiles, var, …]) | Line-plot quantiles of a single variable over time. |
| explore_bar_plot_by_group(df, by_var, var[, stat_fun, order_by_stat, …]) | Bar chart of a statistic of var computed within each by_var group. |
| explore_trend_plot_by_group(df, group_var, var[, time, points, …]) | Line-plot the mean of var over time, one line per group_var level. |
| explore_violin_plot_by_group(df, by_var, var[, order_by_mean, group_on_y, …]) | Violin plots of var distribution across by_var groups. |
| explore_box_plot(df, by_var, var[, time, order_by_mean, …]) | Box plots of var across by_var groups, animated over time when available. |
| explore_strip_plot(df, by_var, var[, time, order_by_mean, …]) | Strip plots of var across by_var groups, animated over time when available. |
| explore_missing_values_plot(df[, time, entity, …]) | Heatmap of missing-value frequency by variable and panel dimension. |
| explore_scatter_plot(df[, x, y, …]) | Scatter plot of y against x with optional aesthetics and a LOESS smoother. |
| explore_animated_scatter_plot(df, x, y[, size, color, …]) | Animated bubble scatter of y against x over time (a Gapminder-style view). |
| explore_xtsum_table(df[, var, entity, …]) | Decompose each variable’s variation into overall / between / within (Stata xtsum). |
| explore_scatter_plot_within_between(df[, x, y, …]) | Scatter that decomposes the x-y relationship into between and within parts. |
| explore_spaghetti_plot(df, var[, entity, time, …]) | Plot every unit’s trajectory of var over time, with a central-tendency overlay. |
| explore_panel_structure(df[, entity, time, …]) | Summarise the panel’s balance and coverage, with a unit-by-period presence grid. |
| explore_value_heatmap(df, var[, entity, time, …]) | Heatmap of a variable over the unit-by-time grid (units by periods, colour = value). |
| explore_distribution_over_time(df, var[, entity, time, …]) | Show how the distribution of var shifts across periods. |
| explore_transition_matrix(df, var[, entity, time, …]) | Period-to-period transition matrix of a discrete (or binned) state within units. |
| explore_within_persistence(df, var[, entity, time, …]) | Within-unit serial correlation: this period’s value against the previous one. |
| explore_treemap_plot(df[, path, size, …]) | Treemap of a hierarchy sized by size, animated over time when available. |
| explore_sunburst_plot(df[, path, size, …]) | Sunburst of a hierarchy sized by size, animated over time when available. |
Analyze
Panel estimators — OLS with fixed effects and clustered SEs, stepwise / Newey–West / Driscoll–Kraay estimation, instrumental variables / 2SLS (cross-section and panel, with a first-stage weak-instrument F), the Frisch–Waugh–Lovell and coefficient plots, pooled / between / fixed / random effects, correlated random effects (Mundlak), the Hausman test, post-estimation, robust inference, event-study / difference-in-differences, β-convergence (unconditional / conditional with speed, half-life and a rolling view), σ-convergence (the trend in cross-sectional dispersion over time), and club convergence (the Phillips–Sul log(t) test with data-driven clustering).
| analyze_regression_table(df[, dvs, idvs, …]) | Build a regression table of one or more OLS models. |
| analyze_estimation(df, dv[, idvs, feffects, …]) | Estimate an OLS model, optionally several nested or multi-outcome models at once. |
| analyze_iv_regression(df, dv, endog, instruments[, exog, feffects, …]) | Fit an instrumental-variables (2SLS) regression with a weak-instrument diagnostic. |
| analyze_panel_iv_regression(df, dv, endog, instruments[, exog, entity, …]) | Fit a panel IV (2SLS) regression absorbing entity (and time) fixed effects. |
| analyze_fwl_plot(df, dv, var[, controls, feffects, …]) | Frisch-Waugh-Lovell scatter of dv against the focal regressor var. |
| analyze_coefficient_plot(models[, keep, drop, …]) | Plot coefficient estimates with confidence intervals for one or more models. |
| analyze_marginal_effects_plot(df, dv, focal, moderator[, controls, feffects, …]) | Plot the marginal effect of focal across moderator for an interaction model. |
| analyze_panel_table(df, dv, idvs[, entity, time, …]) | Estimate pooled / between / fixed / random-effects models side by side. |
| analyze_cre_table(df, dv, idvs[, entity, time, …]) | Estimate a Correlated Random Effects (Mundlak) model. |
| analyze_hausman_test(df, dv, idvs[, entity, time]) | Run the Hausman test comparing fixed-effects and random-effects estimates. |
| analyze_fixef_plot(result_or_model[, fixef, top_n, …]) | Plot the estimated group intercepts (fixed effects) of a model, ranked by value. |
| analyze_predictions(result_or_model[, newdata]) | Return fitted values from a model (and residuals/actuals on the estimation sample). |
| analyze_joint_test(result_or_model[, hypotheses, distribution]) | Run a Wald joint-significance test that a set of coefficients are all zero. |
| analyze_robust_inference(result_or_model, param[, method, reps, …]) | Run robust inference on one coefficient via randomization inference or wild bootstrap. |
| analyze_event_study(df[, outcome, unit, …]) | Estimate and plot an event study for staggered treatment adoption. |
| analyze_panel_view(df[, unit, time, …]) | Visualize the treatment structure of a panel (a themed panelview). |
| analyze_beta_convergence(df, var[, controls, entity, …]) | Unconditional and conditional β-convergence for a panel variable. |
| analyze_sigma_convergence(df, var[, entity, time, …]) | σ-convergence: track and test the cross-sectional dispersion of a panel variable. |
| analyze_convergence_clubs(df, var[, entity, time, …]) | Phillips-Sul log(t) convergence test and data-driven club clustering for a panel. |
| analyze_kuznets_waves(df[, inequality, development, …]) | Estimate the extended Kuznets curve (“Kuznets waves”) across three panel estimators. |
Learn
The teaching layer — concept sandboxes (simulated demonstrations) and concept explainers. Plain-language interpretation lives on the result objects via .interpret().
| learn_omitted_variable_bias([n, beta_x, …]) | Show how omitting a correlated confounder biases a regression coefficient. |
| learn_pooled_vs_fixed_effects([n_units, n_periods, …]) | Show how pooled OLS is biased by unit effects, and fixed effects fix it. |
| learn_clustering_se([n_clusters, cluster_size, …]) | Show that clustering changes the standard error, not the point estimate. |
| learn_first_differences([n_units, n_periods, …]) | Show that first differencing removes the unit effect — matching the within estimator. |
| learn_within_vs_lsdv([n_units, n_periods, …]) | Show that within (demeaning) and least-squares dummy variables give the same slope. |
| learn_beta_convergence([n_units, n_years, …]) | Show unconditional vs conditional β-convergence on a known-parameter panel. |
| learn_sigma_convergence([n_units, n_years, …]) | Show σ-convergence on a panel whose dispersion narrows at a known rate. |
| learn_convergence_clubs([n_per_club, levels, …]) | Show Phillips-Sul club clustering recovering a planted club structure. |
| learn_kuznets_waves([n_units, n_years, …]) | Show the three Kuznets-waves estimators recovering a planted polynomial wave. |
| learn_hausman_test([n_units, n_periods, …]) | Show why the Hausman test prefers fixed effects when unit effects are correlated. |
| learn_correlated_random_effects([n_units, n_periods, …]) | Show the Mundlak (correlated random effects) device recovering the fixed-effects slope. |
| learn_nickell_bias([n_units, rho, …]) | Show the Nickell bias in dynamic-panel fixed-effects estimates. |
| learn_measurement_error([n, beta, …]) | Show classical measurement-error attenuation: noise in the regressor biases OLS to zero. |
Utilities
Cross-cutting helpers shared across modules — panel declaration, data-dictionary inference, outlier treatment, and the concept-explainer registry.
| set_panel(df[, entity, time, …]) | Declare the panel’s entity, time (and optional entity_name) columns on df. |
| resolve_panel(df[, entity, time, …]) | Resolve the (entity, time) ids for df: explicit args win, else df.attrs. |
| set_roles(df[, outcome, covariates]) | Declare the main outcome and covariates on df and return it. |
| build_data_def(df[, entity, time, …]) | Infer a best-guess data dictionary (df_def) for df. |
| treat_outliers(x[, percentile, truncate, …]) | Treat numerical outliers by winsorizing or truncating. |
| set_palette(mode) | Switch the global expdpy color palette. |
| get_palette() | Return the name of the currently active palette ("default" / "colorblind"). |
| explain(topic[, lang]) | Return the :class:Explainer for a method or concept. |
| list_topics() | Return the sorted list of canonical topic keys (for app menus and docs). |
Interactive apps
The three no-code ExPdPy apps (Streamlit) — one per module.
| ExploreApp([df]) | Launch the Explore app — exploratory analysis of panel / cross-sectional data. |
| AnalyzeApp([df]) | Launch the Analyze app — panel estimators, panel models, CRE and event studies. |
| LearnApp([df]) | Launch the Learn app — concept sandboxes and the explainer index. |
Datasets
| load_kuznets() | Load the synthetic kuznets dataset (country-year, N-shaped regional Kuznets curve). |
| load_kuznets_data_def() | Return variable definitions for :func:load_kuznets. |
| load_gapminder() | Load the gapminder dataset (life expectancy, population, GDP per capita). |
| load_staggered_did() | Load the synthetic staggered difference-in-differences dataset. |
| load_productivity() | Load the cross-country labor-productivity convergence panel (PWT9.0, 1990-2014). |
| load_productivity_data_def() | Return variable definitions for :func:load_productivity. |
| load_bolivia112_gdppc() | Load the Bolivian subnational GDP-per-capita panel (112 provinces, 1990-2024). |
| load_bolivia112_gdppc_data_def() | Return variable definitions for :func:load_bolivia112_gdppc. |
| load_colonial_origins() | Load the Colonial Origins cross-section (Acemoglu, Johnson & Robinson 2001). |
| load_colonial_origins_data_def() | Return variable definitions for :func:load_colonial_origins. |
| load_regional_conflict() | Load the African regional-conflict panel (a focused teaching subset). |
| load_regional_conflict_data_def() | Return variable definitions for :func:load_regional_conflict. |
| get_config(name) | Return a startup configuration for ExPdPy. |