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

11 visualizaciones (últimos 30 días)
Timbro
Timbro el 6 de Abr. de 2022
Comentada: Timbro el 8 de Abr. de 2022
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 ?

Respuesta aceptada

Ive J
Ive J el 6 de Abr. de 2022
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 comentarios
Ive J
Ive J el 8 de Abr. de 2022
You cannot use anova on a GLM, but only an LM. The link you provided is the same. I assume your response is continuous, so you can use fitlm. Also, it's easier if you share your data.
Timbro
Timbro el 8 de Abr. de 2022
Indeed, the response is continuous, and using fitlm I can use anova
Thank you !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by