Doubly classified model with R (2017)