ercomp function

Estimation of the error components