Skip to content

Instantly share code, notes, and snippets.

// almost word-for-word transcribed from the qrLMM R package
// if you want to operate in unconstrained space,
// mu can be left be
// sigma should be > 0, so log transform
// p should be 0 < p < 1, so logit transform
namespace ald {
// density function
template<class Type>
Type dald(Type y, Type mu, Type sigma, Type p) {