MATLAB Answers

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

21 ビュー (過去 30 日間)
Dan Hallatt
Dan Hallatt 2019 年 7 月 25 日
編集済み: the cyclist 2020 年 1 月 7 日
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?

  0 件のコメント

サインイン to comment.

回答 (1 件)

the cyclist
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.

  1 件のコメント

Dan Hallatt
Dan Hallatt 2020 年 1 月 7 日
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.

サインイン to comment.

サインイン してこの質問に回答します。

Translated by