R implementation of the logit link for stpm2