{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nConsider the linear model $y_i = x_i^T \\beta + \\varepsilon_i$, $i = 1, \\dots, n$, with $x_i \\in \\R^k$, $\\beta \\in \\R^k$ unknown and $E[\\varepsilon_i] = 0$, where $E[x_i \\varepsilon_i] \\ne 0$ is allowed.\nA random vector $z_i \\in \\R^L$ with $L \\ge k$ is a vector of *instruments* if:\n\n1. (exogeneity) $E[z_i \\varepsilon_i] = 0$;\n2. (relevance) the $L \\times k$ matrix $E[z_i x_i^T]$ has [[rank|0ZC9YTXZRY]] $k$.\n\nLet $X$, $Z$ and $y$ stack the $x_i^T$, $z_i^T$ and $y_i$ as rows, and assume $Z^T Z$ and $X^T P_Z X$ are invertible, where $P_Z = Z (Z^T Z)^{-1} Z^T$.\nThe *two-stage least squares* or *instrumental variables estimator* is\n$$\\hat\\beta_{\\mathrm{IV}} = (X^T P_Z X)^{-1} X^T P_Z y.$$\nWhen $L = k$ and $Z^T X$ is invertible, it reduces to $\\hat\\beta_{\\mathrm{IV}} = (Z^T X)^{-1} Z^T y$.\n\n## Remarks\n\nThe name two-stage least squares comes from its computation.\nFirst regress each column of $X$ on $Z$, which gives $\\hat X = P_Z X$, the [[orthogonal projection|0B8KZRT28M]] of $X$ onto the column space of $Z$.\nThen regress $y$ on $\\hat X$ by [[ordinary least squares|YM708KHV2W]].\nUnder clauses 1 and 2, for independent and identically distributed observations with finite second moments, $\\hat\\beta_{\\mathrm{IV}}$ is [[consistent|0AS800VAYX]] for $\\beta$, while ordinary least squares in general is not.\n\nExample: $k = L = 1$, no intercept, $y_i = \\beta x_i + \\varepsilon_i$.\nExogeneity gives $E[z_i y_i] = \\beta E[z_i x_i]$, so $\\beta = E[z_i y_i] / E[z_i x_i]$.\nThe estimator $\\sum_i z_i y_i / \\sum_i z_i x_i$ is the sample analogue.\n\nNon-example: if $z_i$ is independent of $x_i$ and $E[z_i] = 0$, then $E[z_i x_i] = 0$ and clause 2 fails; the ratio above has a denominator tending to $0$ and does not identify $\\beta$.\nInstruments that satisfy clause 2 only barely, called weak instruments, give unreliable estimates in finite samples.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "6ETK64HYK6",
    "kind": "definition",
    "msc": [
      "62P20",
      "62J05"
    ],
    "name": "Instrumental variables estimation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Instrumental_variables_estimation"
      }
    ],
    "tag": "KHA4WMRDKY",
    "uses": [
      "41FVC4P5JB",
      "YM708KHV2W",
      "0AS800VAYX",
      "0KBFAWYRTE",
      "0WQNRCNY3M",
      "0ZC9YTXZRY",
      "0B8KZRT28M"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/KHA4WMRDKY/",
  "links": [
    {
      "field": "defines",
      "target": "6ETK64HYK6"
    },
    {
      "field": "uses",
      "target": "41FVC4P5JB"
    },
    {
      "field": "uses",
      "target": "YM708KHV2W"
    },
    {
      "field": "uses",
      "target": "0AS800VAYX"
    },
    {
      "field": "uses",
      "target": "0KBFAWYRTE"
    },
    {
      "field": "uses",
      "target": "0WQNRCNY3M"
    },
    {
      "field": "uses",
      "target": "0ZC9YTXZRY"
    },
    {
      "field": "uses",
      "target": "0B8KZRT28M"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/KHA4WMRDKY.md",
  "msc": [
    "62P20",
    "62J05"
  ],
  "name": "Instrumental variables estimation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KHA/KHA4WMRDKY.md",
  "status": null,
  "tag": "KHA4WMRDKY",
  "uri": "m2://KHA4WMRDKY",
  "url": "https://tamnd.github.io/math2/wiki/instrumental-variables-estimation-definition/",
  "writing": {
    "tag": "KHA4WMRDKY",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
