Plotting estimates (fixed effects) of a linear mixed-model

I am familiar with standard linear regression (non-nested) where, after employing fitresult = fitlm(domain,range,'poly1'), you can use plot(fitresult) to plot the fitted linear line with also dotted lines for the confidence bounds of that fit over the domain specified within the fit.
I am now interested in fitting the data to a linear mixed-effects model, by using fitresult = fitlme(HLM_Table,'response ~ predictor + (1|cluster)'), but I cannot find any documentation about plotting the fitted linear regression (fixed coefficients). I have found equivalent documentaruon for plotting residuals and the like, but nothing at all about plotting the actual fitted model. I could do this manually by extracting the fitted fixed coefficients and plotting a line with these over the respective domain, but I am wondering if there is a built in function such as the plot(fitresult) that I used with standard linear regression?

댓글 수: 2

Hi, could you share your solution on how you plotted the fitted model in the end? My statistics are not so strong and I am having the same issue. Thank you.
Dan Hallatt
Dan Hallatt 2022년 7월 29일
편집: Dan Hallatt 2022년 7월 29일
Hi Lea, I'm quite sorry.. I'm pretty far removed from this and it would honestly take quite a bit of work to dig up this work years ago.
If I have some time in the next while I can post a solution, but I doubt I'll be able to help.
I hope you've found a solution in the meantime!

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

답변 (1개)

the cyclist
the cyclist 2019년 7월 25일
편집: the cyclist 2020년 1월 7일

1 개 추천

I could find no mention in the documentation of the LinearMixedModel class that there is an equivalent object function or method. I think you'll have to construct it.

댓글 수: 1

I just realized that I forgot to respond to this but I wanted to say thanks! I agree and this is what I ended up doing.

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

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

질문:

2019년 7월 25일

편집:

2022년 7월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by