Quasars in a merger model: comparison with the observed luminosity function