I have cumulative loss observations for multiple insurance cohorts observed over development times, together with known premiums. I want to fit a growth-curve model in which each cohort has its own ultimate loss ratio and the fraction developed through time follows either a Weibull or log-logistic curve.

My model is:
For development time `t`, let `g(t; omega, theta)` be the growth factor:
`g(t; omega, theta) = 1 - exp(-(t / theta)^omega)` in the Weibull version,
and
`g(t; omega, theta) = t^omega / (t^omega + theta^omega)` in the log-logistic version.

For cohort `c`,

`LR_c ~ LogNormal(mu_LR, sd_LR),`

and for observed data point `i`,

`lm_i = LR_{cohort_i} premium_{cohort_i} g(t_i; omega, theta),`
`loss_i ~ Normal(lm_i, loss_sd premium_{cohort_i}).`

The hyperpriors are

`mu_LR ~ Normal(0, 0.5),`
`sd_LR ~ LogNormal(0, 0.5),`
`loss_sd ~ LogNormal(0, 0.7),`
`omega ~ LogNormal(0, 0.5),`
`theta ~ LogNormal(0, 0.5).`

Here:
`loss_i` is the observed cumulative loss for data point i,
`cohort_i` identifies the cohort for data point i,
`t_i` is the observed development-time index for data point i,
`premium_c` is the known premium for cohort c,
`LR_c` is the cohort-specific ultimate loss ratio,
`g(t; omega, theta)` is the parametric growth curve,
`mu_LR` and `sd_LR` are the hyperparameters governing the distribution of cohort loss ratios,
`loss_sd` controls residual dispersion relative to premium,
`omega` and `theta` are the growth-curve parameters,
`growthmodel_id` selects the Weibull version when it equals 1 and the log-logistic version otherwise.

Parameterization notes:
In `LogNormal(mu, sigma)`, `mu` and `sigma` are the mean and standard deviation on the log scale.
In `Normal(mu, sigma)`, `sigma` is a standard deviation.
