I am using the stan::math::choose function which fails if you try large values of N, e.g. choose(40, 20) -> “choose: n choose k is … but must be less than or equal to 2147483647”.
Is there something in Stan that replicates the choose or lchoose functions from R so that large outputs can be obtained?