Inferring competitive market structure based on a model of interpurchase intervals