Analyzing the length of welfare spells