starsimhub / starsim

Starsim disease modeling framework
http://starsim.org
MIT License
11 stars 4 forks source link

Allow distributions to accept quantiles #485

Open robynstuart opened 2 months ago

robynstuart commented 2 months ago

Something like dur_inf = ss.lognorm_ex(quantiles=([0.5, 0.9], [5, 10]) to specify that 50% of durations are <5 days and 90% are <10 days.

cliffckerr commented 1 month ago

@robynstuart do you have an implementation in mind for this? I almost feel this could be a separate function, e.g.

pars = ss.quantiles_to_pars(type='lognorm_ex', qantiles=[0.5, 0.9], values=[5, 10])
dur_inf = ss.lognorm_ex(**pars)

(Could even be a Sciris function!)

robynstuart commented 1 month ago

@cliffckerr we have a basic implementation in HPVsim for lognormal -- I'd be fine to start with something like that, with updated syntax