fitting groupwise additive index models