sqlm 1.1.0
New Features
Added
warningsparameter tolm_sql()to control warning verbosity:"full"(default): Detailed warnings with diagnostic tips"minimal": One-line abbreviated warnings"none": Suppress all warnings
diagnose_lm_sql()now detects near-perfect collinearity between numeric predictors (correlation >= 0.999).diagnose_lm_sql()now supports dot formulas (y ~ .).
Improvements
All user-facing output now uses the
clipackage for consistent, styled formatting with colors and icons.print.lm_sql_result()andprint.summary_lm_sql_result()now useclifor cleaner output.Progress bar shown during grouped regression when fitting multiple models.
Error messages use
cli_abort()for better formatting and call tracking.
Dependencies
- Added
clito Imports.
sqlm 1.0.0
- Initial CRAN submission.
sqlm 0.1.0
Features
lm_sql()fits OLS linear regression models entirely in-database via a single SQL aggregation query.- Automatic dummy encoding for character and factor predictors with
CASE WHENSQL generation. - Interaction terms (
*,:) fully supported, including interactions between numeric and categorical variables. - Dot expansion (
y ~ .) expands to all non-response columns. - Formula transforms:
I(),log(), andsqrt()translated to SQL equivalents (POWER,LN,SQRT). - Date and datetime predictor support:
DateandPOSIXctcolumns automatically converted to numeric in SQL, matching base R’slm()behavior. - Grouped regression via
dplyr::group_by()computes multiple models in a singleGROUP BYquery. - No-intercept models (
y ~ 0 + x) handled correctly. - S7-based result objects with
broom::tidy()andbroom::glance()methods. orbitalintegration for in-database predictions.- Cholesky decomposition for matrix inversion with
MASS::ginv()fallback for rank-deficient designs.