Solution (source code)

= Solution

The core <instrumental variable> assumptions are:

* <Instrument relevance>: the genetic variant changes educational attainment.
* <Instrumental-variable independence>: it is independent of unmeasured common causes of education and myopia, after any justified ancestry adjustment.
* The <exclusion restriction>: it affects myopia only through education, with no <horizontal pleiotropy>.

For a local average effect one additionally uses <instrumental-variable monotonicity>. Because the valid instrument supplies variation in education independent of the confounders and has no direct route to the outcome, the instrument-outcome association can be attributed to the education changed by the instrument without measuring every confounder.