Models for the diagonal backtest
odp_glm_spec.RdSettings objects that say which models diagonal_backtest() fits on
each training triangle. They hold the settings of the model and no data:
the triangle, the column and the premium come from the backtest, and so
do the number of simulations and the seed, so these functions take the
settings of bayes_odp() and meyers() without triangle, column,
premium, n_sims and seed, with the same names, defaults and
checks.
Usage
odp_glm_spec()
bayes_odp_spec(
intercept_sd = 10,
origin_sd = 10,
development_sd = 10,
process = c("gamma", "none"),
chains = 4,
tune = 1000,
draws = 1000,
target_accept = 0.95,
max_depth = 10
)
meyers_spec(
model = c("crc", "csr", "cay"),
logelr_mean = -0.4,
logelr_sd = 3.162,
origin_sd = 3.162,
development_sd = 3.162,
gamma_sd = 0.05,
rho_shape = 2,
chains = 4,
tune = 1000,
draws = 2000,
target_accept = 0.95,
max_depth = 10
)Arguments
- intercept_sd, origin_sd, development_sd
Standard deviations of the normal priors of
bayes_odp(): on the intercept, on each origin effect and on each development effect. Formeyers_spec(),origin_sdanddevelopment_sdare those of the priors onalpha[w]andbeta[d].- process
Process error of
bayes_odp():"gamma"or"none".- chains, tune, draws
NUTS chains, warm-up draws per chain and kept draws per chain.
- target_accept
Target mean acceptance rate of the step-size adaptation.
- max_depth
Largest NUTS tree depth.
- model
Meyers' model:
"crc","csr"or"cay".- logelr_mean, logelr_sd
Mean and standard deviation of the normal prior on the log expected loss ratio.
- gamma_sd
Standard deviation of the normal prior on
gamma("csr"only).- rho_shape
Both shapes of the beta prior on
(1 - rho) / 2("cay"only).
Value
A bayes_odp_spec, meyers_spec or odp_glm_spec object, to
put in the models list of diagonal_backtest().
Details
odp_glm_spec()is the over-dispersed Poisson GLM of the incremental values with an intercept, an origin factor and a development factor (the chain ladder's model), fitted by quasi-likelihood. It has no sampler, so the backtest reports no diagnostics for it.bayes_odp_spec()is the Bayesian chain ladder ofbayes_odp().meyers_spec()is Meyers' CRC, CSR or CAY model ofmeyers(); the backtest needs itspremium.
Examples
bayes_odp_spec(chains = 2, tune = 200, draws = 200)
#> <bayes_odp_spec> prior sds 10 (intercept), 10 (origin), 10 (development), gamma process
#> 2 chains of 200 draws after 200 warm-up, target_accept 0.95, max_depth 10
meyers_spec(model = "csr")
#> <meyers_spec> csr, logelr ~ N(-0.4, 3.162), origin sd 3.162, development sd 3.162, gamma sd 0.05
#> 4 chains of 2000 draws after 1000 warm-up, target_accept 0.95, max_depth 10
odp_glm_spec()
#> <odp_glm_spec> over-dispersed Poisson GLM: intercept, origin factor, development factor