# \[RFC\] Kirstine.jl - Bayesian Optimal Design for Nonlinear Regression

**URL:** <https://discourse.julialang.org/t/rfc-kirstine-jl-bayesian-optimal-design-for-nonlinear-regression/103993>\
**Category:** Package Announcements\
**Tags:** rfc\
**Created:** [September 18, 2023, 3:50pm UTC](https://discourse.julialang.org/t/rfc-kirstine-jl-bayesian-optimal-design-for-nonlinear-regression/103993 "2023-09-18T15:50:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lsandig](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@lsandig](https://discourse.julialang.org/u/lsandig)\
**Post date:** [September 18, 2023, 3:50pm UTC](https://discourse.julialang.org/t/rfc-kirstine-jl-bayesian-optimal-design-for-nonlinear-regression/103993/1 "2023-09-18T15:50:46Z")

</div>

I wrote [Kirstine.jl](https://sr.ht/~lsandig/Kirstine.jl), a package for finding Bayesian optimal designs for nonlinear regression models, i.e. for answering the question “What proportion of measurements should I take at which covariate settings in order to maximize the expected precision of the parameter estimates?”.

Features:

- D- and A-optimal design
- Bayesian and locally optimal design
- Arbitrary transformations of the model parameter
- Arbitrary priors via Monte-Carlo integration
- Particle swarm optimization
- Extendable with new design regions, design criteria, or particle-based optimizers.

(Note that this is a different thing than factorial designs, which are covered by ExperimentalDesign.jl)

Caveats:

- The interface is not as polished as it could be, hence not yet fully stable.
- The Jacobian matrices of the mean function and the transformation must be specified manually for now. I might look into integration with one of the autodiff packages at a later time.
- Random effects models are not supported.
- Not yet registered.

Feedback Wanted:

I think the package is basically usable now and I would be happy about feedback, especially on whether there is a better way to use macros for [boilerplate code generation](https://git.sr.ht/~lsandig/Kirstine.jl/tree/main/item/src/user.jl#L101) (I don’t want to have to tell it the module name explicitly).

This is my first Julia package, so if I have made obvious mistakes somewhere, I would be happy to hear about them, too!
