I believe the current version of the code in trunc_normal_lpdf (in src/zcurveEM.cpp) is incorrect in that in order to compute normalize the log density, it subtracts the difference in log probabilities instead of taking the log of the difference in probabilities. This will lead to an incorrect normalization factor.
See difference here: 05cd624