Skip to content

fbrglm

Safe Formula-Based Regularized Generalized Linear Models

v0.0.1 · Jun 22, 2026 · MIT + file LICENSE

Description

A formula-based wrapper around 'glmnet' that brings the 'glm()'-compatible modeling workflow to regularized generalized linear models. Training-time 'terms', 'xlevels', and 'contrasts' are stored on the fit object and reused at predict time, so the design matrix is reconstructed consistently across sessions. Complete-case bookkeeping is exposed via 'nobs_info', and linearly dependent columns are detected by a QR pivot and reported as 'NA' in 'coef()' and 'summary()' (the 'stats::glm()' convention), distinguishing "not identifiable" from "shrunk to zero by the penalty". Novel factor levels at predict time raise the same error 'stats::predict.glm()' does by default, with 'on_new_levels = "na"' as a production-style opt-in. Accepts character family strings ('gaussian', 'binomial', 'poisson', 'cox', 'multinomial', 'mgaussian') and any 'glm' family object the underlying 'glmnet' itself accepts, including 'Gamma' and fixed-theta negative binomial via 'MASS::negative.binomial'.

Downloads

CRAN

176

Last 30 days

23765th

176

Last 90 days

176

Last year

autoCRAN

0

Last 7 days

0

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 6 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 23, 2026

Code

Structure

Lines of code

2,282

Files

23

Compiled share

0%

Has compiled src

No

Language breakdown

R 705 (30.9%)Tests 874 (38.3%)Docs 154 (6.7%)Vignettes 549 (24.1%)

API

Exported functions

3

Internal functions

10

Recent export changes

v0.0.1+3 as_cv_glmnet, as_glmnet, fbrglm

Testing & CI

Has tests

Yes

Test-to-code ratio

1.24

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

1

First release

2026-06-22

Latest release

2026-06-22

Avg cadence

Cold removal rate

Dep drift

0

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies glmnet fbrglm

Version History

1 tracked
new 0.0.1 Jun 22, 2026