{
  "name": "Components of summary(lm) in R: where each reported number is stored",
  "description": "Compiled from the R reference manual pages for lm and summary.lm: for each component of the object returned by summary() on an lm fit, the code that extracts it and the documentation's description of what it holds.",
  "page": "https://casrai.org/guides/lm-in-r",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-22T11:40:00Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Component",
      "unit": "",
      "description": ""
    },
    {
      "name": "Extraction code",
      "unit": "",
      "description": ""
    },
    {
      "name": "Documented meaning",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Component": "r.squared",
      "Extraction code": "summary(fit)$r.squared",
      "Documented meaning": "Fraction of variance explained by the model: 1 minus residual sum of squares over the sum of squares of the response deviations."
    },
    {
      "Component": "adj.r.squared",
      "Extraction code": "summary(fit)$adj.r.squared",
      "Documented meaning": "R-squared adjusted for the number of fitted parameters."
    },
    {
      "Component": "sigma",
      "Extraction code": "summary(fit)$sigma",
      "Documented meaning": "Square root of the estimated error variance (weighted squared residuals divided by n - p)."
    },
    {
      "Component": "coefficients",
      "Extraction code": "summary(fit)$coefficients",
      "Documented meaning": "p x 4 matrix of estimate, standard error, t value and two-sided p value; aliased coefficients omitted."
    },
    {
      "Component": "fstatistic",
      "Extraction code": "summary(fit)$fstatistic",
      "Documented meaning": "Three numbers: F value, numerator df, denominator df; only for models with terms other than an intercept."
    },
    {
      "Component": "df",
      "Extraction code": "summary(fit)$df",
      "Documented meaning": "Three numbers: p, n - p and the number of non-aliased coefficients."
    },
    {
      "Component": "cov.unscaled",
      "Extraction code": "summary(fit)$cov.unscaled",
      "Documented meaning": "p x p matrix; multiplied by the error variance it gives the covariance of the estimates."
    }
  ],
  "sources": [
    {
      "title": "R documentation: summary.lm",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/summary.lm.html",
      "accessed": "2026-11-20"
    },
    {
      "title": "R documentation: lm",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html",
      "accessed": "2026-11-20"
    }
  ]
}