Group Based Dual Trajectory Models R