Уважаемые коллеги,
Хочу уточнит задачу.
Фактически требуется решить задачу которая изложена в публикациях:
Monte Carlo comparison of ANOVA, MIVQUE, REML, and ML estimators of variance components (https://www.researchgate.net/publication/254332308_Monte_Carlo_comparison_of_ANOVA_MIVQUE_REML_and_ML_estimators_of_variance_components) пункт 2.3 REML (итеративно решить уравнение)
That BLUP is a Good Thing: The Estimation of Random Effects (https://projecteuclid.org/euclid.ss/1177011926) - mixed model equation.
Также см.
A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity https://aae.wisc.edu/aae637/handouts/whites_hetero_estimator.pdf
Estimation of Variance Components in Mixed Linear Models (https://www.researchgate.net/publication/2800796_Estimation_of_Variance_Components_in_Mixed_Linear_Models)
An Overview of Variance Component Estimation (https://ecommons.cornell.edu/bitstream/handle/1813/31816/BU-1231-M.pdf;sequence=1)
Estimation of variance and covariance components in linear models containing multiparameter matrices (http://www.sciencedirect.com/science/article/pii/0895717788906644)
Возможно сотрудничество в решении задачи частично. Работа оплачивается.