Cell-based models for the switching statistics of RRAM