Plotting estimates (fixed effects) of a linear mixed-model
16 次查看(过去 30 天)
显示 更早的评论
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 个评论
Lea Kerciku
2022-6-19
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.
回答(1 个)
the cyclist
2019-7-25
编辑:the cyclist
2020-1-7
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!