Skip to content

Fundamentals Tutorials

Learning Path

Prerequisites: Basic Python, pandas, introductory statistics Time: 3--4 hours Level: Beginner -- Intermediate

Overview

These tutorials introduce the core concepts of panel data analysis. You will learn what panel data is, how to structure it, and how to estimate and interpret the fundamental models that form the basis of all panel econometrics.

Panel data combines cross-sectional and time-series dimensions, enabling researchers to control for unobserved heterogeneity and study dynamic relationships. These tutorials build your intuition for within-entity vs between-entity variation, the role of fixed and random effects, and how to choose the right estimator for your research question.

By the end of this series, you will be comfortable loading data into PanelBox, specifying models with formulas, and interpreting regression output -- skills you will use throughout every other tutorial category.

Notebooks

# Tutorial Level Time Colab
1 Introduction to Panel Data Beginner 30 min Open In Colab
2 Formulas & Specification Beginner 30 min Open In Colab
3 Estimation & Interpretation Intermediate 45 min Open In Colab
4 Spatial Fundamentals Intermediate 45 min Open In Colab

Learning Paths

Quick Start (1.5 hours)

Focus on the essentials to get productive quickly:

Notebooks: 1, 2, 3

You will learn how to load panel data, specify models using PanelBox formulas, and interpret estimation results. This is sufficient to move on to the Static Models tutorials.

Comprehensive (3 hours)

Work through all four notebooks in order:

Notebooks: 1, 2, 3, 4

This path adds spatial data fundamentals, which is useful if you plan to work with geographic or network data later.

Key Concepts Covered

  • Panel data structure: Entity (cross-section) and time dimensions
  • Balanced vs unbalanced panels: Handling missing observations
  • Within vs between variation: How panel data decomposes total variation
  • Formula syntax: PanelBox formula interface (y ~ x1 + x2)
  • Entity and time identifiers: Setting up entity_col and time_col
  • Result interpretation: Coefficients, standard errors, p-values, R-squared
  • Programmatic access: Extracting results for further analysis

Quick Example

import panelbox as pb

# Load a built-in dataset
data = pb.load_dataset("grunfeld")

# Estimate a Fixed Effects model
results = pb.FixedEffects(
    data=data,
    formula="invest ~ value + capital",
    entity_col="firm",
    time_col="year"
).fit()

# View the summary
print(results.summary())

Solutions

Tutorial Solution
01. Introduction to Panel Data Solution
02. Formulas & Specification Solution
03. Estimation & Interpretation Solution
04. Spatial Fundamentals Solution

What You Will Be Able To Do

After completing these tutorials, you will be able to:

  • Load and explore panel datasets with PanelBox
  • Understand the structure of balanced and unbalanced panels
  • Specify regression models using the formula interface
  • Estimate Pooled OLS, Fixed Effects, and Random Effects models
  • Interpret coefficients, standard errors, and goodness-of-fit measures
  • Access results programmatically for custom analysis