Skip to content
ModellingECON3006· 5:40 runtime

Data Handling, getting your data ready before any regression runs

The prep that turns raw files into one clean panel: merge two sources on an id-time key, reshape wide to long, declare the panel with xtset, and check each firm-year is unique.

Modelling· 5:40· ECON3006

Data Handling, getting your data ready before any regression runs

The prep that turns raw files into one clean panel: merge two sources on an id-time key, reshape wide to long, declare the panel with xtset, and check each firm-year is unique.

InteractiveExplore Data Handling: Preparing Data for Analysis in the Atlas

A 5.5 minute lesson on data handling, the unglamorous prep that turns raw files into one clean panel before any regression runs. Built for ECON3006 and FIN301 students at Western Sydney University, worked in Stata.

The video starts with two firms and one question. To answer it you first merge the sources that hold different pieces of the story, such as firm accounts and market data, on a shared id-time key. Then you reshape the data between wide and long so it sits one row per firm-year, declare the panel with xtset, and confirm with duplicates report that each firm-year appears exactly once.

Get this wrong and every later coefficient is built on a broken frame. Get it right and you have a tidy panel ready for the models that follow. Pair the video with the Atlas concept page for the Stata commands, a worked example, a quiz, and citations.

Pair with the Atlas
Data Handling: Preparing Data for Analysis
Formulas, worked examples, common mistakes, and a quick check quiz — open the concept page for the full Atlas treatment.
Open concept page →
← All lessons