R Observatory
Search

insurancerating

insurancerating 0.7.3 to 0.8.2

CRAN

Record of 0.7.3Record of 0.8.2Both records side by side

Daily mean of CRAN downloads while each release was the newest, as blocks, and in 30-day steps as a line, one scale up to 40. Choose a release to compare from or to it.
  • 0.7.3 and 0.8.2
  • between them
  • other releases
  • daily mean, in 30-day steps
  • after this copy’s series ends on 26 Oct 2026
010203040
Time between
845 days4 releases between
Advisories, method
None knownfor either release
Exports, method
1 removed40 added
Dependencies
16 changes11 added, 3 removed, 1 bound, 1 moved11 added, 3 removed
Licence
SameGPL (>= 2)
Maintainer
SameMartin Haringa

Downloads while newest

Method, downloads

ReleaseDays newestDays countedCRAN downloadsDaily mean
0.8.2
1 Sep to 28 Oct 2026, still the newest
58561,31123
0.7.3
9 to 19 May 2024
1127325

Daily mean while newest, 0.8.2 −5.7% down since 0.7.3

Counted on the CRAN mirror from each release's day to the day before the next release. This copy's daily series ends on 26 Oct 2026, so a span that runs past it is counted to that day and its daily mean covers the days counted. Other channels repackage on their own schedules, so they are not split by release.

  • added
  • removed
  • bound or field changed
PackageField0.7.30.8.2
changedRDepends>= 3.3>= 4.1.0
changedclassIntImports to Suggestsany versionany version
removedcolorspaceImportsany version–
addedDBISuggests–any version
addeddbplyrSuggests–any version
addedduckdbSuggests–any version
addedggbeeswarmSuggests–any version
addedggrepelSuggests–any version
addedgtSuggests–any version
removedinsightImportsany version–
addedlifecycleImports–any version
removedmagrittrImportsany version–
addedpartykitImports–any version
addedrlangImports–any version
addedscamImports–any version
addedtibbleImports–any version
Side by side
Measure0.7.30.8.2Change
R>= 3.3>= 4.1.0changed
Imports16 packages17 packages+5 −3, 1 bound
Suggests4 packages11 packages+6, 1 bound

Exports

added Added (40)

  • active_rows_by_date
  • add_observed_experience
  • add_portfolio_experience
  • add_rebasing
  • add_relativities
  • add_restriction
  • add_shrinkage
  • add_smoothing
  • add_tariff_segments
  • assess_excess_threshold
  • as_gt
  • audit_refinement
  • bootstrap_coefficients
  • bootstrap_performance
  • calibrate_model
  • derive_tariff_segments
  • edit_smoothing
  • extract_model_data
  • factor_analysis
  • fisher_classify
  • fit_truncated_severity
  • merge_date_ranges
  • merge_date_ranges_db
  • outlier_histogram
  • plot_severity_distribution
  • premium_change
  • prepare_refinement
  • rating_factors2
  • rating_grid
  • rating_grid_db
  • rating_table
  • redistribute_excess_loss
  • refit
  • relativities
  • riskfactor_gam
  • risk_factor_gam
  • set_reference_level
  • split_level
  • split_periods_to_months
  • split_relativities

removed Removed (1)

  • %>%
Measure0.7.30.8.2Change
Lines of R code5,05828,743+23,685 up
Files109183+74 up
Public exports2766+39 up
Internal functions67329+262 up
Mean complexity5.37.8+2.5 up
Highest complexity4979+30 up
Download size890 KB1.0 MB+162 KB up
Source, unpacked1.1 MB2.7 MB+1.6 MB up

1 other figure of the code is the same in both.

Side by side
Measure0.7.30.8.2Change
Lines of R code5,05828,743+23,685
Lines of compiled code00
Files109183+74
Public exports2766+39
Internal functions67329+262
Mean complexity5.37.8+2.5
Highest complexity4979+30
Download size890 KB1.0 MB+162 KB
Source, unpacked1.1 MB2.7 MB+1.6 MB
Analysed withrpkg-analyzer 0.5.2rpkg-analyzer 0.5.2
Measure0.7.30.8.2Change
Lines run by testsNot measured80.7%
a test file threw an error
Test cases28351+323 up
Lines of tests4109,914+9,504 up
Test lines per line of code0.080.34+0.26 up
Exports named in tests55.6%95.5%+39.9 points up

Test coverage is measured on each CRAN package's newest release since July 2026.

Side by side
Measure0.7.30.8.2Change
Lines run by testsNot measured80.7%, a test file threw an error
Test cases28351+323
Lines of tests4109,914+9,504
Test lines per line of code0.080.34+0.26
Exports named in tests55.6%95.5%+39.9 points
Measure0.7.30.8.2Change
Exports documented96.3%100.0%+3.7 points up
Arguments documented100.0%90.7%−9.3 points down
Return value documented96.2%98.5%+2.3 points up
Lines of documentation2,0118,117+6,106 up
Lines of guides02,595+2,595 up
Side by side
Measure0.7.30.8.2Change
Exports documented96.3%100.0%+3.7 points
Arguments documented100.0%90.7%−9.3 points
Return value documented96.2%98.5%+2.3 points
Lines of documentation2,0118,117+6,106
Lines of guides02,595+2,595

Files changed

Files changed
259over 5 releases
Lines added
65,257
Lines deleted
14,245
Most changed files (12 of 259)
FileLines addedLines deleted
R/model_refinement.R6,5331,065
R/excess_loss.R2,346525
tests/testthat/test_model_refinement.R2,75757
R/model_rating_table.R2,204160
inst/doc/refinement-workflow.html1,769498
R/oud_model_refinement.R1,6665
inst/doc/pricing-workflow-building-blocks.html1,265394
R/univariate.R1,019477
inst/doc/refinement-workflow.Rmd1,134315
vignettes/refinement-workflow.Rmd1,134315
R/gam_construct_tariff_classes.R956381
inst/doc/getting-started.html1,098195

Each release is counted against the release before it, so a line changed twice counts twice.

Release notes

From the NEWS file of 0.8.2. Only the section for the newest release on record is kept.

  • rating_table() gains estimate_name for assigning exact names to fitted coefficient or relativity columns. It accepts one name for one model, a vector in model order, or a named vector for multi-model comparisons; autoplot() and as_gt() retain the custom columns.
  • edit_smoothing() gains slope_adjustment, using from as its anchor, for changing the remaining development of an effective smoothing after a selected anchor. Values before the anchor remain unchanged and the edited curve is continuous at the anchor. The default slope_adjustment = 1 leaves the smoothing unchanged.
  • calibrate_model() adds a final multiplicative calibration step for refined log-link GLMs. It changes only the overall fitted level, records the applied factor and intercept shift, and remains compatible with rating_table() and add_prediction().
  • add_restriction() now warns when a newly added numeric interval overlaps the existing interval classification. The message identifies the conflicting levels and explains how a separate replacement variable can be supplied with replaces when the intention is to replace the original classification.
  • autoplot.rating_refinement() gains show_segments = FALSE for inspecting a continuous smoothing curve without displaying the proposed tariff segments.
  • premium_change() interprets the effective smoothing in a refinement using either the existing doubling comparison or a fixed increment supplied with increment. Current and historical refinement states can be selected with steps and compared with print and as_gt() methods. The default basis = "curve" evaluates the continuous effective smoothing; basis = "segments" compares the implemented tariff-interval relativities.
  • add_restriction() gains replaces, which allows a new fixed tariff factor to explicitly replace an existing standalone model term during refit(). The replacement is retained in refinement summaries and audits. The default replaces = NULL preserves the existing additive behaviour for new factors.
  • rating_grid_db() and merge_date_ranges_db() add lazy database variants for portfolios that should be reduced before they are imported into R. rating_grid_db() translates grouped counts and sums through dbplyr, while merge_date_ranges_db() implements temporal gaps-and-islands reduction in DuckDB. A new large-portfolio vignette compares local and database workflows and illustrates lazy reduction of portfolios with 10 and 50 million records.
  • rating_grid() and merge_date_ranges() are now documented together as portfolio-reduction functions. Both use grouped data.table operations internally and return ordinary data.frame objects for downstream use.
  • split_periods_to_months() and active_rows_by_date() are now documented as portfolio time operations. Their calculations use local data.table objects internally, while their public output is always a regular data.frame. split_periods_to_months() now uses data as its first argument (df remains available as a deprecated named argument) and expands periods without a row-wise R loop. active_rows_by_date() replaces the technical nomatch and mult arguments with unmatched and multiple_matches; the old names remain available with deprecation warnings.
  • merge_date_ranges() now uses merge_gap_days = 1 by default, so only overlapping and directly adjacent coverage periods are merged unless a wider administrative gap is selected explicitly. The interval reduction is now performed as a grouped data.table calculation, avoiding row-wise R loops for large portfolios. Empty inputs, nested intervals and aggregation functions without a na.rm argument are handled explicitly. The deprecated reduce() wrapper retains its historical default for compatibility. The first argument is now named data (df remains available as a deprecated named argument), and the result is a regular data.frame subclass while data.table remains an internal implementation detail. Together with rating_grid(), the function is documented as part of the portfolio reduction workflow.
  • rating_table() now distinguishes structural and comparative level order. Pure numeric levels and numeric intervals are ordered from low to high, explicitly ordered factors retain their declared level sequence, and nominal factors are ordered from the highest to the lowest fitted effect by default. Numeric and ordinal order are not displaced by the fitted reference level. The new level_order_by_risk_factor argument can preserve model order or select alphabetical or estimate-based ordering for individual factors. Risk factors can retain formula order or be sorted alphabetically, and comparisons with several models can select the model that determines the estimate ordering. The resulting order is retained by as_gt() and autoplot().
  • add_rebasing() can rescale the current relativities of a categorical tariff factor so that an explicit reference level equals 1. When no level is supplied, the level with the largest portfolio weight is selected. Rebasing preserves every ratio between factor levels and can be applied after restrictions, shrinkage or sublevel relativities.
  • add_shrinkage() can reduce differences between categorical tariff relativities before refitting. Relativities are blended with a weighted centre on the log scale and rescaled to preserve their weighted arithmetic mean. Explicit GLM weights or a simple exposure offset are detected when possible; a column name or weights = "equal" can be supplied directly. The selected credibility, weighting basis and before/after relativities are retained in the ordered refinement specification.
  • audit_refinement() now provides a reproducible comparison between the unrestricted and refined GLM on common observed model points. It records the package version, formulas and ordered refinement steps, and reports the portfolio and exposure-weighted level effects before and after refinement. summary() on a pre-refit rating_refinement object now gives a structured review of the proposed specification, while as_gt() formats the fitted audit for reporting.
  • bootstrap_coefficients() now assesses GLM coefficient stability by resampling the estimation portfolio rows and refitting the model. Individual failed fits are retained as missing replicates instead of stopping the full run. summary() reports link-scale or exponentiated results, with "relativity" available as an alias, and as_gt() provides a formatted coefficient table.
  • The function documentation, README and vignettes now use a consistent, practical actuarial style. The documentation distinguishes observed portfolio experience, fitted model effects, explicit tariff assumptions and model diagnostics, and states relevant interpretation limits more clearly. Experimental documentation badges have been removed, and the low-level rmse() helper is listed with the package utilities in the reference index.
  • add_smoothing() keeps "spline" as its general-purpose default and fits it as an unconstrained penalized cubic regression spline. Polynomial smoothing is selected explicitly with "poly", while "gam" provides a thin-plate GAM comparison. degree is limited to polynomial fits, k is limited to spline methods, and an omitted k is adapted to the available grouped model points. Its arguments now follow the modelling sequence of variables, required breaks, smoothing method, complexity and weights. Shape-constrained methods now use readable values such as "increasing", "decreasing", "increasing_convex" and "increasing_concave"; the former short SCOP codes remain accepted as compatibility aliases. add_smoothing() now focuses only on the initial smoothing and its structural shape. The former global strength adjustment has been removed. edit_smoothing() now supports a multiplicative local adjustment, such as 1.05 for an increase of up to 5 percent, together with continuous inherited or linear transitions and an explicit discontinuous "step" transition. Relative adjustments are anchored to the unchanged smoothing at both interval boundaries and remain separate from explicit target-value edits. Each edit_smoothing() call is stored as a separate cumulative refinement step. In addition, edit_smoothing() now supports slope_adjustment, with from as its anchor. This leaves the curve unchanged through the anchor and scales only its remaining change, allowing a continuous effect to become steeper or flatter above a selected source-variable value. In autoplot.rating_refinement(), step selects the cumulative smoothing state and show_initial_smoothing = TRUE overlays the original add_smoothing() curve for comparison.
  • add_restriction() recognises a split variable created by an earlier add_relativities() step without requiring allow_new_risk_factors = TRUE. A partial restriction changes the supplied levels and fixes all remaining levels at their current derived relativities.
  • add_relativities() now validates sublevels against the observed split_variable and parent categories against model_variable before storing a refinement step. Closely matching observed values are suggested for likely spelling or spacing errors. The resulting hybrid tariff factor is now named with output_variable; its default is the model variable followed by _refined, while application-specific names such as sbi_tariff_segment can be supplied explicitly.
  • split_level() and relativities() are now the primary helpers for defining named sublevel splits and share one reference page describing their combined use. The low-level split_relativities() constructor is deprecated because it does not record the parent model level required by add_relativities().
  • Spline, GAM and shape-constrained smoothing validate the requested basis dimension against the number of unique grouped covariate values before model fitting.
  • autoplot.rating_table() and autoplot.factor_analysis() abbreviate long risk-factor level labels by default. Shortened labels use one terminal period, can be disabled, and can be replaced by explicitly supplied display labels. Both methods now also provide legend_position for consistent legend placement.
  • autoplot.riskfactor_gam() and autoplot.tariff_segments() now use one shared plotting implementation and are documented on one reference page. Segment plots retain their boundaries by default and can show the underlying GAM curve alone with show_segments = FALSE.
  • derive_tariff_segments() now uses segmentation_penalty as its primary split-control argument; complexity remains available as a deprecated alias. The method divides the fitted GAM curve without applying a second exposure or claim-volume weight; these quantities have already informed the GAM estimate and remain available through summary() as diagnostics. Validation now covers malformed GAM objects, non-finite values and whole-number search controls. Tree splits are read from the fitted tree structure rather than parsed from printed rules. add_tariff_segments() reapplies stored boundaries to the continuous risk factor, so filtering or reordering rows no longer misaligns assignments and unsupported values outside the fitted range fail explicitly.

Unchanged and not compared

Licence, maintainer and the people named are the same in both releases. No advisory is known for either release.

Checks, the install tree, dependents and the repository describe the package as it is now, so they are on the package page.