{
  "name": "Binomial glm in R: accepted response forms and fitting defaults",
  "description": "Compiled from the R stats reference pages (glm, family, glm.control, confint) and the PSI CAMIS R/SAS comparison page: how a binomial glm reads its response, which settings apply by default, and which interval method each confint function uses. Each row cites the page it was read on.",
  "page": "https://casrai.org/guides/logistic-regression-in-r",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-22T18:19:17Z",
  "temporalCoverage": "R 4.6.0",
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Item",
      "unit": "",
      "description": ""
    },
    {
      "name": "Rule or default",
      "unit": "",
      "description": ""
    },
    {
      "name": "Extra argument or note",
      "unit": "",
      "description": ""
    },
    {
      "name": "Source",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Item": "Factor response",
      "Rule or default": "First level = failure, all other levels = success",
      "Extra argument or note": "Check levels(); success is usually level 2",
      "Source": "R family/glm manual"
    },
    {
      "Item": "Numeric response in [0,1]",
      "Rule or default": "Proportion of successes",
      "Extra argument or note": "Totals supplied with weights",
      "Source": "R family manual"
    },
    {
      "Item": "Two-column integer matrix response",
      "Rule or default": "Column 1 = successes, column 2 = failures",
      "Extra argument or note": "None",
      "Source": "R family/glm manual"
    },
    {
      "Item": "Default link for binomial",
      "Rule or default": "logit",
      "Extra argument or note": "Alternatives: probit, cauchit, log, identity, cloglog",
      "Source": "R family manual"
    },
    {
      "Item": "glm.control epsilon",
      "Rule or default": "1e-8",
      "Extra argument or note": "Convergence tolerance",
      "Source": "R glm.control manual"
    },
    {
      "Item": "glm.control maxit",
      "Rule or default": "25",
      "Extra argument or note": "Maximum IRLS iterations",
      "Source": "R glm.control manual"
    },
    {
      "Item": "confint() on a glm",
      "Rule or default": "Profile likelihood (test = LRT by default)",
      "Extra argument or note": "Rao score also available",
      "Source": "R confint manual"
    },
    {
      "Item": "confint.default()",
      "Rule or default": "Wald interval from coef and vcov",
      "Extra argument or note": "Matches SAS PROC LOGISTIC default",
      "Source": "R confint manual; PSI CAMIS"
    },
    {
      "Item": "Factor reference level",
      "Rule or default": "First level is baseline (contr.treatment)",
      "Extra argument or note": "contr.sum changes the coding",
      "Source": "PSI CAMIS"
    }
  ],
  "sources": [
    {
      "title": "R stats: family",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/family.html",
      "accessed": "2026-11-22"
    },
    {
      "title": "R stats: glm",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/glm.html",
      "accessed": "2026-11-22"
    },
    {
      "title": "R stats: glm.control",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/glm.control.html",
      "accessed": "2026-11-22"
    },
    {
      "title": "R stats: confint",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/confint.html",
      "accessed": "2026-11-22"
    },
    {
      "title": "PSI CAMIS: Logistic Regression in R",
      "url": "https://psiaims.github.io/CAMIS/R/logistic_regr.html",
      "accessed": "2026-11-22"
    }
  ]
}