Duration and frequency of water stress in vegetation: An analytical model