How does fitlme specify the residuals covariance matrix structure?

조회 수: 4 (최근 30일)
Emmett Larsen
Emmett Larsen 2023년 10월 17일
편집: Emmett Larsen 2023년 10월 30일
I am new to linear mixed effects models and still learning the nomenclature and decision points. I am running fitlme to estimate a model with multiple fixed and random effects, and I was asked by one of my advisors "how I specified the structure of the covariance matrix of the residuals". The documentation does not seem to say anything on this point, as I understand the 'CovariancePattern' argument to relate only to the matrix of random effects covariances, not to the residuals.
Is matlab doing something specific under the hood on this point?
Thanks in advance!

답변 (1개)

Yash
Yash 2023년 10월 23일
Hi Emmett,
I understand that you are facing issues while specifying the structure of the matrix of residuals in a Liner Mixed Effects Model.
In MATLAB's "fitlme" function, the "CovariancePattern" argument does indeed relate to the specification of the random effects covariance structure, not the residuals. This is clearly specified in the documentation: https://www.mathworks.com/help/stats/fitlme.html.
When you fit a linear mixed effects model using the "fitlme" function in MATLAB, the estimation procedure automatically estimates the covariance matrix of the residuals based on the specified model and the observed data. MATLAB employs maximum likelihood estimation (MLE) to estimate the model parameters, including the covariance matrix of the residuals.
To obtain the residuals matrix, you can utilize the "residuals" function. This function allows you to extract the residuals from the fitted linear mixed effects model. For further information on the "residuals" function, you can refer to the MATLAB documentation at the following link: https://www.mathworks.com/help/stats/linearmixedmodel.residuals.html.
Hope this helps.
Best Regards,
Yash
  댓글 수: 1
Emmett Larsen
Emmett Larsen 2023년 10월 30일
Thank you for this, Yash! I think this helps, but I am still wondering whether matlab is freely estimating all components of the residuals covariance matrix or if it is making any assumptions that certain parts of the matrix will be specific values (eg I understand that softwares sometimes default to assuming values of 0 on outside the diagonal of the matrix)...
Emmett

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by