glmFit
glmFit, commonly written glmfit, is a function in MATLAB's Statistics and Machine Learning Toolbox that fits generalized linear models (GLMs) to data. It estimates model coefficients using the iteratively reweighted least squares (IRLS) algorithm and supports responses that follow distributions in the exponential family, such as normal, binomial, Poisson, and gamma. Users can specify a link function, choosing from canonical or alternative options, and may provide weights and offsets to model varying exposure or known effects.
Inputs and options: The main inputs are X, an n-by-p design matrix, and y, an n-by-1 response
Outputs: B contains the estimated coefficients for the predictors and the intercept. DEV is the model deviance,
Applications and behavior: GLMs fitted with glmfit enable a range of common analyses, including logistic regression
History and context: glmfit is part of MATLAB’s Statistics and Machine Learning Toolbox and has long been