Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB's glmfit vs fitglm

I'm trying to perform logistic regression to do classification using MATLAB. There seem to be two different methods in MATLAB's statistics toolbox to build a generalized linear model 'glmfit' and 'fitglm'. I can't figure out what the difference is between the two. Is one preferable over the other?

Here are the links for the function descriptions.

http://uk.mathworks.com/help/stats/glmfit.html http://uk.mathworks.com/help/stats/fitglm.html

like image 688
Physman Avatar asked Mar 12 '15 15:03

Physman


1 Answers

The difference is what the functions output. glmfit just outputs a vector of the regression coefficients (and some other stuff if you ask for it). fitglm outputs a regression object that packs all sorts of information and functionality inside (See the docs on GeneralizedLinearModel class). I would assume the fitglm is intended to replace glmfit.

like image 101
Dan Avatar answered Sep 18 '22 14:09

Dan