Package: fbrglm 0.1.0

Koki Tsuyuzaki

fbrglm: Safe Formula-Based Regularized Generalized Linear Models

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'.

Authors:Koki Tsuyuzaki [aut, cre]

fbrglm_0.1.0.tar.gz
fbrglm_0.1.0.zip(r-4.7-any)fbrglm_0.1.0.zip(r-4.6-any)fbrglm_0.1.0.zip(r-4.5-any)
fbrglm_0.1.0.tgz(r-4.6-any)fbrglm_0.1.0.tgz(r-4.5-any)
fbrglm_0.1.0.tar.gz(r-4.7-any)fbrglm_0.1.0.tar.gz(r-4.6-any)
fbrglm_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
fbrglm/json (API)

# Install 'fbrglm' in R:
install.packages('fbrglm', repos = c('https://dsc-chiba-u.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/dsc-chiba-u/fbrglm/issues

On CRAN:

Conda:

5.15 score 14 scripts 196 downloads 5 exports 21 dependencies

Last updated from:7e34df1017. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK110
source / vignettesOK282
linux-releaseOK123
macos-releaseOK174
macos-oldrelOK204
windows-develOK59
windows-releaseOK126
windows-oldrelOK80
wasm-releaseOK115

Exports:as_cv_glmnetas_glmnetfbrglmglancetidy

Dependencies:clicodetoolsforeachgenericsglmnetglueiteratorslatticelifecyclemagrittrMatrixpillarpkgconfigRcppRcppEigenrlangshapesurvivaltibbleutf8vctrs

An end-to-end real-data analysis with fbrglm
1. Overview | 2. Data | 3. Train / test split | 4. Preprocessing | 5. Fit with fbrglm | 6. Prediction | 7. Evaluation | 8. Visualization | 9. Inspecting and reusing the fit | 10. What fbrglm saved us from | 11. Reproducibility

Last update: 2026-07-26
Started: 2026-07-26

Getting started with fbrglm
What fbrglm is for | A small binomial example | Choosing lambda | Factor predictors | Missing values | Offsets | Reaching the underlying glmnet objects | Scope of the current release

Last update: 2026-07-26
Started: 2026-06-09

Moving from glm and glmnet to fbrglm
1. The same model in glm | 2. The same model in raw glmnet | 3. The same model in fbrglm | 4. Side-by-side comparison | 5. Pipe workflow | 6. Safe prediction under narrowed factor levels | 7. Choosing when to use which interface

Last update: 2026-07-26
Started: 2026-07-26

Families and model types in fbrglm
Overview | Summary of supported model types | Linear regression | Logistic regression | Poisson regression with an offset | Piecewise exponential survival model via Poisson regression | Native Cox regression | Gamma regression | Negative binomial regression (fixed θ) | Multinomial regression (experimental) | Multi-response Gaussian (experimental) | Limitations

Last update: 2026-06-09
Started: 2026-06-09

Readme and manuals

Help Manual

Help pageTopics
Extract the Underlying cv.glmnet Fitas_cv_glmnet
Extract the Underlying glmnet Fitas_glmnet
Fit a Formula-Based Regularized GLMcoef.fbrglm fbrglm nobs.fbrglm plot.fbrglm predict.fbrglm print.fbrglm print.summary.fbrglm summary.fbrglm