* Grunfeld (1950) / Kleiber and Zeileis (2008): public-domain data. * Download grunfeld-panel.csv to the same folder and set Stata working directory there. * Educational example; not a causal analysis. version 15.1 clear all set more off import delimited using "grunfeld-panel.csv", clear varnames(1) encode firm, gen(firm_id) isid firm_id year assert _N == 220 bysort firm_id: assert _N == 20 xtset firm_id year xtdescribe summarize invest value capital * Baseline firm fixed effects, without year fixed effects. xtreg invest value capital, fe * Sensitivity: cluster by firm; only 11 clusters, interpret inference cautiously. xtreg invest value capital, fe vce(cluster firm_id) * Sensitivity: common year shocks. xtreg invest value capital i.year, fe vce(cluster firm_id)