R implementation of accountability model