← Back to all sparks
L

logbin

INFRA · APIS
Velocity0.0

Relative Risk Regression Using the Log-Binomial Model

Relative-risk regression that converges where glm fails, under an unreadable tag order

relative-risklog-binomialglm-compatibilityem-algorithmbackfilled-tags
Current state
logbin fits log-binomial models to estimate relative risk, a fit standard glm frequently fails to converge on because of the constrained parameter space. Its answer is a choice of algorithms — adaptive barrier, combinatorial EM, and expectation-maximisation on an overparameterised model — selected through a method argument and optionally accelerated with turboEM. The most recent release, in April 2025, replaces the variance-covariance calculation in summary.logbin so it matches summary.glm, and adds a testthat suite.
Where it's heading
The method work concluded in 2021 and the package has since been aligned with base R conventions rather than extended: the vcov calculation now mirrors glm's, and earlier releases added the contrasts, qr, R and effects components so standard glm S3 methods such as influence() and plot() work on logbin objects. Be warned that the feed's tag order is unusable — versions 2.0, 2.0.1, 2.0.2 and 2.0.4 were all pushed within ninety seconds on 23 July 2021 in non-monotonic order, while 2.0.3 carries a 2017 timestamp and restates 2.0.2's notes. Read the bodies, not the sequence.
Prediction
Expect continued alignment with glm conventions and occasional CRAN maintenance; the algorithm set has been stable for four years and nothing in these entries suggests another is planned.

Recent moves

  1. 1y ago

    vcov in summary.logbin now matches summary.glm

    Replaces the variance-covariance calculation in summary.logbin with the one summary.glm uses, and adds testthat tests. Standard errors from this package now agree with what users expect from a glm summary, which matters more than the release's size suggests.

    View source ↗
  2. 5y ago

    Factor reparameterisation fix and faster parameter expansion

    Fixes reparameterisation of factor variables under the combinatorial EM method, moves parameter expansion to a transformation-matrix approach, and corrects an error when an offset is supplied. The convergence check now runs on the reduced parameter vector, which is why conv.test() stopped being exported.

    View source ↗
  3. 5y ago

    Version bump to satisfy a CRAN check

    A version increment with no content, needed only to get a corrected package past CRAN. One of four tags pushed within ninety seconds on the same day, so its position in the feed means nothing.

    View source ↗
  4. 5y ago

    method and accelerate options: adaptive barrier, CEM, EM, turboEM

    The release that defines what the package offers: a method argument selecting between glm, glm2, adaptive barrier, combinatorial EM and single EM on an overparameterised model, plus an accelerate option using turboEM to speed convergence. Everything since has been about making the results of these fits behave like glm results.

    View source ↗
  5. 5y ago

    glm S3 method support via contrasts, qr, R and effects components

    Returns the contrasts, qr, R and effects components so glm's S3 methods — influence(), plot() and the rest — work on logbin objects, and lets inner and outer iteration limits be set separately. The start of the long alignment with glm conventions that the 2025 release continued.

    View source ↗
  6. 5y ago

    Journal of Statistical Software citation added

    Adds the JSS article citation. A single line, pushed in the same ninety-second burst as three other tags.

    View source ↗