Equation (4) in the main text gives an expression for our measurement-error-corrected estimator, but it cannot be implemented directly because Vg and Ω are based on unobserved variables. In the Supplementary Methods we derive an equivalent expression in terms of variables that can all be consistently estimated using sample analogues: (7)αcorr=P[1ρ2ΣGΣG^,zΣz]−1 Vgαg^, where ΣG≡[1ρ2Cov(w^,g^i)ρ2Σw^−(ρ2−1)Σint,z], ΣG^,z≡Covg^i,w^i,zi, Σz ≡ Var(zi), Σw^≡Varw^i, Σint,z ≡ Var(zint,i), and zint,i is the vector of the covariates that are interacted with gi to form the vector wi.