glmfit
Fit generalized linear regression model
Syntax
Description
specifies additional options using one or more name-value arguments. For example, you can
specify b = glmfit(X,y,distr,Name,Value)'Constant','off' to omit the constant term from the model.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Alternative Functionality
glmfit is useful when you simply need the output arguments of the
function or when you want to repeat fitting a model multiple times in a loop. If you need to
investigate a fitted model further, create a generalized linear regression model object GeneralizedLinearModel by using fitglm or stepwiseglm. A
GeneralizedLinearModel object provides more features than
glmfit.
Use the properties of
GeneralizedLinearModelto investigate a fitted model. The object properties include information about the coefficient estimates, summary statistics, fitting method, and input data.Use the object functions of
GeneralizedLinearModelto predict responses and to modify, evaluate, and visualize the generalized linear regression model.You can find the information in the output of
glmfitusing the properties and object functions ofGeneralizedLinearModel.Output of glmfitEquivalent Values in GeneralizedLinearModelbSee the Estimatecolumn of theCoefficientsproperty.devSee the Devianceproperty.statsSee the model display in the Command Window. You can find the statistics in the model properties (
CoefficientCovariance,Coefficients,Dispersion,DispersionEstimated, andResiduals).The dispersion parameter in
ofstats.sglmfitis the scale factor for the standard errors of coefficients, whereas the dispersion parameter in theDispersionproperty of a generalized linear model is the scale factor for the variance of the response. Therefore,stats.sis the square root of theDispersionvalue.
References
[1] Dobson, A. J. An Introduction to Generalized Linear Models. New York: Chapman & Hall, 1990.
[2] McCullagh, P., and J. A. Nelder. Generalized Linear Models. New York: Chapman & Hall, 1990.
[3] Collett, D. Modeling Binary Data. New York: Chapman & Hall, 2002.
Extended Capabilities
Version History
Introduced before R2006a
