How to control for endogeneity through the analysis of panel data. We begin with fixed (and random) effects models. We then treat approaches developed for experimental settings ? difference-in-differences and synthetic controls. These two approaches are examples of matrix completion problems and we discuss the appropriate completion methods in light of the underlying norm, or loss function.