Restricted Maximum Likelihood to estimate variance components for mixed models with two random factors