Panel data is everywhere in applied econometrics. Firms tracked over time, countries across decades, individuals in longitudinal surveys — if your data has both a cross-sectional and a time dimension, you are in panel territory. Stata has deep support for it. The challenge is that the methods scatter across a wide range: fixed effects, GMM, ARDL, quantile regression, cointegration, structural breaks.
This playlist organises 55 videos into a sensible learning path. Work through the stages in order. Each one assumes the previous. The methods build on each other in ways that are not always obvious from the title of a single video.
Data Preparation
Every analysis is only as reliable as the data behind it. Before a single model runs, you need your panel structured correctly — declared to Stata, free of gaps, clean of problem rows, and consistent across sources. This stage covers the full preparation workflow, including some often-overlooked tasks: handling repeated time values, constructing composite indices, and diagnosing missing data patterns. It is unglamorous work, but skipping it is where most analyses silently go wrong.
Start here. This video walks through the full cleaning, graphing, and transformation pipeline for a raw panel dataset — labelling variables, handling outliers, reshaping from wide to long, and producing exploratory graphs before any estimation begins.
Watch VideoA second worked treatment of the same time-gap problem — useful if the first video left open questions. Covers additional interpolation strategies and edge cases that arise with irregular panel structures.
Watch VideoWhen your data comes from multiple sources at different frequencies — annual firm data merged with quarterly macro indicators, for instance — this video covers the full merging and frequency transformation workflow in Stata.
Watch VideoBefore running descriptives, the panel must be reduced to a common sample so every statistic is computed on the same set of observations. This video covers removing missing rows and aligning the sample across variables, so summary statistics and later models are built on identical, comparable data rather than shifting subsets.
Watch VideoUnbalanced panels — where not every entity appears in every period — require special handling. This video covers the key management techniques for working with unbalanced structures without distorting your estimation sample.
Watch VideoDuplicate time entries for the same panel unit cause xtset to fail and xtreg to give wrong results. This video diagnoses why repeated time values appear and walks through the fix — either dropping duplicates or collapsing them correctly.
For Urdu-speaking researchers, this is a full panel data management lecture covering the same core preparation topics in Urdu — cleaning, declaring, managing time gaps, and structuring for estimation.
Watch VideoAn extended treatment that combines missing value diagnosis with interpolation — covering both how to detect the pattern of missingness and how to fill it using the xtmispanel framework before passing a complete dataset to your estimator.
When your analysis requires a balanced panel — every entity observed in every period — this video shows how to achieve it using the xtbalfront command, covering the frontier-based balancing approach and when balancing is preferable to modelling the unbalancedness directly.
When multiple variables measure the same underlying concept — institutional quality, financial development, environmental performance — combining them into a single index is often preferable to entering each separately. This video covers the entropy weighting method for index construction in Stata, which avoids the subjectivity of manual weighting.
Watch VideoFactor analysis extracts latent dimensions from a set of correlated variables and is a principled alternative to entropy-based index construction. This video covers how to build a composite index using factor analysis in Stata and how to validate the resulting index before using it in panel regression.
Watch VideoModel Foundations & Diagnostics
With a clean panel in hand, this stage builds the core models — fixed and random effects, difference-in-differences — and the diagnostic tests that justify your specification before you trust a single coefficient.
The core of panel econometrics. This step-by-step video covers fixed and random effect estimation, the Hausman test, and how to interpret results correctly — including the three R-squared values Stata reports and what each one means.
Watch VideoTheory meets practice. This video builds the conceptual foundation for panel models and then works through diagnostic tests and graphical outputs together — serial correlation, heteroskedasticity, and cross-sectional dependence checks included.
Watch VideoDifference-in-differences has become one of the most-used identification strategies in applied work. This video covers both the cross-sectional and panel versions, including parallel trends, the interaction term specification, and common pitfalls in interpretation.
Watch VideoA full integrative lecture that ties the foundational pieces together — useful as a review after completing the earlier videos in this stage, or as a standalone overview before diving deeper into the advanced methods.
Watch VideoBefore committing to a model, xtpretest runs the full battery of pre-estimation diagnostics — cross-sectional dependence, slope homogeneity, stationarity, and cointegration — in a single command. This video covers how to read the output and use it to justify your modelling choices to reviewers.
Introduces xttestpanel, a single command that runs the essential diagnostic battery on a simple panel regression — checking the assumptions a fixed/random effects model relies on so you can confirm model validity before interpreting results.
Raw regression coefficients are often on incompatible scales, making direct comparison across variables misleading. The coefconv command converts and standardises coefficients so that variable contributions can be meaningfully compared within a single model.
A nomograph provides a visual summary of how much each variable contributes to the model's predicted values — more intuitive than a table of coefficients. This video covers how to produce and read a panel data nomograph in Stata.
Watch VideoAdvanced Estimation & Projection
Where panel econometrics gets serious: dynamic ARDL families, GMM, thresholds, cointegrating estimators, spatial spillovers, and projecting fitted relationships forward. Choose estimators by what your diagnostics in Stages 1–2 revealed.
The essential trio of panel ARDL estimators. Mean Group (MG) allows fully heterogeneous slopes; Pooled Mean Group (PMG) constrains long-run coefficients to be equal; Dynamic Fixed Effects (DFE) constrains both. This video covers all three and how to choose between them using the Hausman test.
Watch VideoStandard ARDL ignores cross-sectional dependence — a serious problem in most macro panels. This video introduces CCEMG (Common Correlated Effects Mean Group) and AMG (Augmented Mean Group), the two second-generation estimators that account for it.
Watch VideoA strategic guide to selecting the correct Panel ARDL specification. Rather than a single command, this walks through how diagnostic tests for structural breaks (Fourier terms) and cross-sectional dependence steer you toward the right ARDL variant — first vs. second generation, with or without Fourier augmentation.
Watch VideoWhen your regressors are endogenous or your relationship shifts at some estimated cutoff, standard panel models are misspecified. This video covers both threshold specifications and endogeneity-robust estimation together.
Watch VideoAn extension of the threshold regression framework to settings where multiple regressors interact with the threshold variable simultaneously. This video covers implementation and interpretation of multi-variable threshold specifications.
Watch VideoA second, complementary video on panel GMM that addresses scenarios left open in the first — including instrument proliferation, weak instrument diagnostics, and how to handle the collapse option to control instrument count.
Watch VideoFeasible Generalised Least Squares is the preferred estimator when you have many cross-sections observed over few time periods. This video covers the xtgls command, when FGLS outperforms OLS, and how to handle heteroskedasticity and autocorrelation within the FGLS framework.
When the relationship between two variables follows a curve rather than a line — an inverted-U, for instance — linear panel models miss it. This video covers polynomial regression in a panel context to detect and visualise nonlinear relationships across cross-sections.
Watch VideoA quadratic model implies a turning point — but that turning point is only meaningful if it falls within the data range and is statistically significant. This video covers the formal turning point test for quadratic panel specifications, ensuring the identified inflection point is both real and interpretable.
Watch VideoThe Cross-Sectionally Augmented ARDL (CSARDL) model accounts for cross-sectional dependence within an ARDL framework by augmenting the model with cross-section averages of the dependent variable and regressors. This video covers the CSARDL estimator, its advantages over standard panel ARDL, and implementation in Stata.
Watch VideoThe Common Unit-root Process Factor Model (CUPFM) is a panel estimator that accounts for cross-sectional dependence through common factors — related to the CCE family but with a distinct estimation approach. This video covers when to use it and how to implement and interpret it in Stata.
Watch VideoWhen both endogeneity and cross-sectional dependence are present simultaneously, neither standard IV nor first-generation panel estimators are sufficient. This video covers xtivreg2 for IV estimation with cross-sectionally robust standard errors, and xtcce for common correlated effects estimation.
Propensity Score Matching isolates treatment effects by constructing a comparison group that is statistically similar to the treated group on observable characteristics. In panel settings, PSM is used to assess whether key findings hold after matching — making it a powerful robustness check. This video covers PSM implementation in Stata and how to integrate matched samples with panel estimators.
Watch VideoA comprehensive long-form lecture (3+ hours) on spatial panel data. Covers modelling geographic dependence with spatial weight matrices and decomposing effects into direct, indirect, and total spillovers — typically implemented in Stata with xsmle (community) or spxtregress (official).
Uses regproject to generate forward projections of independent variables — useful for scenario building and out-of-sample forecasting once a model is estimated. This is the "Project" half of the estimate-and-project workflow, and is one of the instructor’s own SSC-archive packages.
Specialised Models & Tests
Distributional, nonlinear, and second-generation methods for harder problems — quantile ARDL, causality tests, unit-root and cointegration testing under cross-sectional dependence, and publication-ready effect visualisation.
Visualising quantile coefficients across the distribution makes results interpretable in a way that coefficient tables cannot. This video uses the PQR command to produce publication-ready coefficient plots across quantiles.
The xtpqardl command provides a dedicated Stata implementation for panel quantile ARDL. This video walks through its syntax, options, and how to interpret the long-run and short-run quantile output.
This video extends panel quantile ARDL to account for cross-sectional dependence — combining the distributional flexibility of quantile estimation with the cross-sectional robustness of second-generation panel methods.
Watch VideoNon-linear panel ARDL using the pnardl command covers asymmetric long-run effects estimated within a panel ARDL structure — allowing positive and negative shocks to have separate long-run paths.
Extends the nonlinear panel ARDL (pnardl) into a second-generation framework that corrects for cross-sectional correlation across units. Combines asymmetric long-run/short-run decomposition with common-factor robustness for valid inference in dependent panels.
Quantile-on-quantile regression examines how one variable's quantiles affect another variable's quantiles — a more flexible method for distributional relationships than standard quantile regression. This video covers the panel implementation.
Watch VideoIn a panel quantile setup, each entity sits at a different position within the conditional distribution — so the relevant quantile is entity-specific, not a single fixed level. This video covers how to generate and interpret effects at each country- or firm-specific quantile position, producing a richer picture of heterogeneity than standard quantile regression tables.
Watch VideoA second Panel VAR video covering additional topics: lag selection criteria, Granger causality in the VAR framework, forecast error variance decomposition, and how to handle cross-sectional heterogeneity in VAR specifications.
Watch VideoDriscoll-Kraay standard errors are robust to heteroskedasticity, autocorrelation, and cross-sectional dependence simultaneously — via the xtscc command. This video covers when they are appropriate and how to implement them correctly.
The Dumitrescu-Hurlin test is the standard approach for panel Granger non-causality in heterogeneous panels. This video covers the test, the W-bar and Z-bar statistics, and how to interpret results — including the bootstrap variant for cross-sectionally dependent panels.
Watch VideoWhen causal relationships are nonlinear or the standard Granger framework is too restrictive, the Fourier Toda-Yamamoto approach captures smooth structural shifts, while quantile causality tests whether the causal relationship holds across the full distribution. This video covers both methods and their complementary roles in a thorough causality analysis.
Watch VideoA deeper follow-up on count data panel models, covering marginal effects interpretation, zero-inflation issues, fixed vs random effects specifications for count models, and publication-ready output formatting.
Watch VideoUnit root tests that account for quantile-specific behaviour and structural breaks — going beyond first- and second-generation panel unit root tests to detect non-stationarity at specific quantiles of the distribution.
Watch VideoStructural breaks in panel data can invalidate long-run estimates if ignored. This video covers detection methods for identifying breakpoints in panel series — essential before cointegration testing when regime shifts are plausible.
Watch VideoTesting whether slopes are homogeneous across quantiles is a diagnostic step before pooling in quantile panel models. This video covers the relevant tests and what to do when homogeneity is rejected.
Watch VideoCross-sectional dependence varies across the distribution. This video covers how to test for it at different quantile levels — informing whether second-generation estimators are needed at specific parts of the conditional distribution.
Watch VideoTests for unit roots when cross-sectional dependence is present, where first-generation tests (LLC, IPS) are biased. Covers second-generation procedures such as Pesaran’s CIPS/CADF — implemented via commands like xtcips, pescadf or multipurt — as the correct pre-cointegration step in dependent panels.
Second-generation panel cointegration tests account for cross-sectional dependence, which first-generation tests (Pedroni, Kao) ignore. This video covers the key procedures combining cross-sectional robustness with structural break allowance.
Watch VideoThe Westerlund-Edgerton bootstrap cointegration test is robust to both cross-sectional dependence and structural breaks simultaneously. This video rounds out the cointegration toolkit and is the recommended test when both problems are present in your panel.
Watch VideoStandard quantile regression for panel data does not account for cross-sectional dependence. This video covers second-generation panel quantile regression — combining distributional estimation with common factor correction for valid inference across quantiles.
Watch VideoPolynomial and interaction terms produce results that coefficient tables alone cannot communicate. This video covers how to visualise quadratic relationships and moderator effects in panel data — producing marginal effect plots and interaction graphs that make nonlinear dynamics immediately readable for papers and presentations.
Watch VideoA note on sequencing
Stages 1 and 2 are prerequisites, not suggestions. If your panel is not declared correctly, commands like xtreg and xtdpd will either fail or silently produce wrong results. If you do not understand what fixed effects are doing, the logic of GMM instruments will not make sense when you reach Stage 3.
Stages 3 and 4 have more flexibility depending on your research focus. If you are working on cointegration, you can pull those Stage 4 videos in after finishing Stage 3. If your interest is distributional analysis, the quantile videos can run alongside the Stage 3 estimators. The more foundation you have before specialising, the better your instincts will be when something goes wrong — and in panel econometrics, something usually does.
The course is long. That seems right. These methods are genuinely hard to use well, and the places where they tend to break are not always obvious until a reviewer asks a question you should have been asking yourself.