trips function

Estimates propensity scores for three groups