http://stackoverflow.com/questions/29014170/matlabs-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

 

 

4down voteaccepted

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Posted by uniqueone
,