How to find r square in linear mixed model (fitlme)?

조회 수: 9 (최근 30일)
PRB
PRB 2020년 7월 21일
댓글: Star Strider 2023년 9월 19일
I fit a model with fitlme function.
In my model I have both fixed and random effect. I need to find R square or similar on my model.
Please help to find rsquare. Thanks in advance

채택된 답변

Star Strider
Star Strider 2020년 7월 21일
According to the documentation for LinearMixedModelClass, specifically Rsquared, it appears to be available.
See if:
Rsq = mdl.Rsquared;
reveals it. There should be two results, so you need to choose the one that is most appropriate for your application.
  댓글 수: 4
PRB
PRB 2023년 9월 19일
Just wondering whether r-squared values reflect the proportion of total variance explained by both the fixed and random effects, or just fixed effect?
Star Strider
Star Strider 2023년 9월 19일
The documentation on Rsquared seems to be slilent on that, although it seems to be fixed efects.
The fixedEffects and randomEffects objects have the relevant statistics on each. (This is the R2023b documentation, and there could be version differencces. I haven’t explored fitlme recently.)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resampling Techniques에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by