{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $X$ be a fixed real $n \\times p$ matrix of rank $p$, and let $y = X\\beta + \\varepsilon$ with $\\beta \\in \\R^p$ unknown.\nAssume $E[\\varepsilon] = 0$ and $\\operatorname{Cov}(\\varepsilon) = \\sigma^2 \\Omega$, where $\\sigma^2 \u003e 0$ and $\\Omega$ is a known symmetric [[positive definite|0KX66CZMBB]] $n \\times n$ matrix.\nThe *generalized least squares estimator* of $\\beta$ is the minimiser of\n$$(y - X b)^T \\Omega^{-1} (y - X b)$$\nover $b \\in \\R^p$, which is\n$$\\hat\\beta_{\\mathrm{GLS}} = (X^T \\Omega^{-1} X)^{-1} X^T \\Omega^{-1} y.$$\n\n## Remarks\n\nEquivalent form: let $P$ be an invertible matrix with $P^T P = \\Omega^{-1}$, for example $P = \\Omega^{-1/2}$.\nThen $P y = P X \\beta + P \\varepsilon$ with $\\operatorname{Cov}(P\\varepsilon) = \\sigma^2 I_n$.\nThe estimator $\\hat\\beta_{\\mathrm{GLS}}$ is the [[ordinary least squares|YM708KHV2W]] estimator of this transformed model.\nBy the [[Gauss–Markov theorem|N3YMNMWANM]] applied to the transformed model, it is the best linear unbiased estimator; this is Aitken's theorem.\nIts covariance matrix is $\\sigma^2 (X^T \\Omega^{-1} X)^{-1}$.\n\nExample: if $\\Omega = I_n$, the estimator reduces to ordinary least squares.\nIf $\\Omega$ is diagonal, it is the weighted least squares estimator with weights $1/\\Omega_{ii}$.\n\nNon-example: if $\\Omega$ is only positive semidefinite and singular, then $\\Omega^{-1}$ does not exist and the formula is not defined.\n\nWhen $\\Omega$ is unknown and is replaced by an estimate, the method is called *feasible* generalized least squares.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "P142WXJCF3",
    "kind": "definition",
    "msc": [
      "62J05"
    ],
    "name": "Generalized least squares",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Generalized_least_squares"
      }
    ],
    "tag": "XK7W504YEW",
    "uses": [
      "A06SGFCSCE",
      "YM708KHV2W",
      "0V7G6WMFK0",
      "0KX66CZMBB",
      "N3YMNMWANM"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/XK7W504YEW/",
  "links": [
    {
      "field": "defines",
      "target": "P142WXJCF3"
    },
    {
      "field": "uses",
      "target": "A06SGFCSCE"
    },
    {
      "field": "uses",
      "target": "YM708KHV2W"
    },
    {
      "field": "uses",
      "target": "0V7G6WMFK0"
    },
    {
      "field": "uses",
      "target": "0KX66CZMBB"
    },
    {
      "field": "uses",
      "target": "N3YMNMWANM"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/XK7W504YEW.md",
  "msc": [
    "62J05"
  ],
  "name": "Generalized least squares",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/XK7/XK7W504YEW.md",
  "status": null,
  "tag": "XK7W504YEW",
  "uri": "m2://XK7W504YEW",
  "url": "https://tamnd.github.io/math2/wiki/generalized-least-squares-definition/",
  "writing": {
    "tag": "XK7W504YEW",
    "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
      }
    ]
  }
}
