A Cox model for gradually disappearing events