How to get the sum of squares in GLM model summary ?

9 ビュー (過去 30 日間)
Timbro
Timbro 2022 年 4 月 6 日
コメント済み: Timbro 2022 年 4 月 8 日
I want to calculate the % of variance explained by each variable in a GLM, for that I need the summ of square. Can we get it from the fitglm function output ?

採用された回答

Ive J
Ive J 2022 年 4 月 6 日
You can get SST, SSE and SSR:
mdl = fitglm(rand(100, 2), randi([0 1], 100, 1), 'dist', 'binomial', 'link', 'logit');
mdl.SSE
ans = 23.9711
mdl.SSR
ans = 1.0278
mdl.SST
ans = 24.9900
  3 件のコメント
Timbro
Timbro 2022 年 4 月 8 日
Indeed, the response is continuous, and using fitlm I can use anova
Thank you !

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by