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
GeneralizedLinearModel
to 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
GeneralizedLinearModel
to predict responses and to modify, evaluate, and visualize the generalized linear regression model.You can find the information in the output of
glmfit
using the properties and object functions ofGeneralizedLinearModel
.Output of glmfit
Equivalent Values in GeneralizedLinearModel
b
See the Estimate
column of theCoefficients
property.dev
See the Deviance
property.stats
See 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
.sglmfit
is the scale factor for the standard errors of coefficients, whereas the dispersion parameter in theDispersion
property of a generalized linear model is the scale factor for the variance of the response. Therefore,stats.s
is the square root of theDispersion
value.
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