#include #include template ; inline T1 gammaCDFderiv(T1 alpha, T1 x){ using std::pow; T1 y = x; stan::math::var a = alpha; stan::math::var cdf = 0; cdf += gamma_cdf(x, a, 1); cdf.grad(); return a.adj(); }