pub struct PtfOptions {
pub accident: AccidentSpec,
pub development: DevelopmentSpec,
pub calendar: CalendarSpec,
pub exposure: Option<Vec<f64>>,
pub dev_weights: Option<Vec<f64>>,
pub future_calendar_rate: Option<f64>,
pub mean_mode: LogNormalMeanMode,
}Expand description
Configuration for fit_ptf.
Fields§
§accident: AccidentSpecAccident-year trend parameterization.
development: DevelopmentSpecDevelopment-period trend parameterization.
calendar: CalendarSpecCalendar-year inflation trend parameterization.
exposure: Option<Vec<f64>>Optional positive exposure vector E_i (length n) used as log offset.
dev_weights: Option<Vec<f64>>Optional per-development-period observation weights w_j > 0 (length n)
for heteroscedastic weighted OLS (Barnett & Zehnwirth 2000, §5).
future_calendar_rate: Option<f64>Future calendar inflation assumption beyond the last observed diagonal
(t >= n): when Some(r), overrides future calendar slope beyond t = n - 1
with constant rate r; when None, continues the final estimated
calendar-year inflation regime.
mean_mode: LogNormalMeanModeLog-normal mean bias-correction convention.
Implementations§
Source§impl PtfOptions
impl PtfOptions
Sourcepub fn with_accident(self, accident: AccidentSpec) -> Self
pub fn with_accident(self, accident: AccidentSpec) -> Self
Set the accident-year trend specification.
Sourcepub fn with_development(self, development: DevelopmentSpec) -> Self
pub fn with_development(self, development: DevelopmentSpec) -> Self
Set the development-period trend specification.
Sourcepub fn with_calendar(self, calendar: CalendarSpec) -> Self
pub fn with_calendar(self, calendar: CalendarSpec) -> Self
Set the calendar-year inflation specification.
Sourcepub fn with_exposure(self, exposure: impl Into<Vec<f64>>) -> Self
pub fn with_exposure(self, exposure: impl Into<Vec<f64>>) -> Self
Supply a positive exposure vector E_i used as a ln(E_i) offset.
Sourcepub fn with_dev_weights(self, dev_weights: impl Into<Vec<f64>>) -> Self
pub fn with_dev_weights(self, dev_weights: impl Into<Vec<f64>>) -> Self
Supply per-development-period observation weights w_j > 0.
Sourcepub const fn with_future_calendar_rate(self, rate: f64) -> Self
pub const fn with_future_calendar_rate(self, rate: f64) -> Self
Override the future calendar inflation rate beyond the last observed diagonal.
Sourcepub const fn with_mean_mode(self, mean_mode: LogNormalMeanMode) -> Self
pub const fn with_mean_mode(self, mean_mode: LogNormalMeanMode) -> Self
Set the log-normal mean bias-correction convention.