Maximizing L(π) is a convex optimization problem, which we solve using EM37, accelerated using SQUAREM38. If B^ has a large number of rows, we can reduce computational effort by taking a random subset of rows. In the GTEx analysis, we use a random subset of 20,000 rows. (It is important that this is a random subset, and not just the J˜ rows of strong effects.)