Project cumulative loss across the cohort x development grid using the
stage-adaptive (SA) method: ED before the maturity point, CL after.
SA composes both projection paradigms anchored on a per-group maturity
switch – a 2-pass fit (maturity detection via fit_ata(), then the
SA projection itself).
SA is a worker – standalone, no internal method dispatch. The
role-specific entry point fit_loss() dispatches method = "sa" to
this function; users can also call fit_sa() directly.
Usage
fit_sa(
x,
loss = "loss",
exposure = "premium",
alpha = 1,
exposure_fit = NULL,
exposure_method = c("ed", "cl"),
exposure_alpha = 1,
sigma_method = c("locf", "min_last2", "loglinear", "mack", "none"),
recent = NULL,
regime = NULL,
maturity = "auto",
tail = FALSE,
conf_level = 0.95,
bootstrap = NULL,
B = 999L,
seed = NULL,
type = c("parametric", "nonparametric", "analytical")
)Arguments
- x
A
"Triangle"object. The standardized"loss"and"premium"columns are used (as_triangle()produces these).- loss
Cumulative loss column name. Default
"loss".- exposure
Cumulative premium column name. Default
"premium".- alpha
Variance-structure exponent for the loss fit. Default
1.- exposure_fit
Optional pre-built
PremiumFitsupplying the premium projection. WhenNULL,fit_sa()builds the premium projection internally – a worker-layerfit_cl()on thepremiumcolumn – usingexposure_method,exposure_alpha, and the resolvedregime.- exposure_method
One of
"ed"(default) or"cl". Used only whenexposure_fit = NULL.- exposure_alpha
Variance-structure exponent for the premium fit. Default
1.- sigma_method
Method used to extrapolate
sigmafor links where it cannot be estimated. One of"locf"(default),"min_last2","loglinear","mack", or"none"."mack"applies the Mack (1993, Appendix B) tail estimator to the last unestimated link only, falling back to LOCF for any earlier ones with a warning."none"performs no extrapolation;sigmastaysNAand downstream variance terms drop those links via finite-value guards. Passed to.extrapolate_sigma_ata().- recent
Optional positive integer; calendar-diagonal filter.
- regime
Optional regime specification (loss-side). Accepts the standard 4-type dispatch (
NULL/Regime/"auto"/ function). In SA mode the resolved regime drives the hybrid 2-pass filter (cohort cut for the ED phase, calendar-diagonal wedge for the CL phase).- maturity
Maturity specification. Default
"auto". Accepts the standard 4-type dispatch (NULL/Maturity/"auto"/ function). SA requires a maturity –NULLdisables SA entirely (use ED or CL directly in that case).- tail
Logical or numeric; tail factor for the CL phase. Forwarded to the internal premium fit when relevant.
- conf_level
Confidence level for the analytical CI on the loss projection. Default
0.95.- bootstrap
Bootstrap configuration (NULL / TRUE / FALSE / "auto" /
BootstrapTriangle/ lazy function). DefaultNULLresolves to"auto"(residual bootstrap) for SA.- B
Integer number of bootstrap replicates. Default
999.- seed
Optional integer seed.
- type
Bootstrap process type. Default
"parametric". (Only used whenbootstrap = "auto".)
Value
An object of class "SAFit". List with components mirroring
LossFit: full, proj, maturity, loss_ata_fit,
premium_ata_fit, premium_fit, ed, factor, selected, plus
metadata (method = "sa", alpha, sigma_method, recent,
regime, conf_level, ci_type, bootstrap, usage).
Examples
if (FALSE) { # \dontrun{
data(experience)
tri <- as_triangle(
experience[coverage == "surgery"],
groups = "coverage",
cohort = "uy_m",
calendar = "cy_m",
loss = "incr_loss",
premium = "incr_premium"
)
sa <- fit_sa(tri)
summary(sa)
} # }
