pseudo_res_discrete function

Calculate pseudo-residuals for discrete-valued observations