statsmodels.genmod.generalized_linear_model.GLM.fit¶
-
GLM.
fit
(start_params=None, maxiter=100, method='IRLS', tol=1e-08, scale=None, cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs)[source]¶ Fits a generalized linear model for a given family.
Parameters: maxiter : int, optional
Default is 100.
method : string
Default is ‘IRLS’ for iteratively reweighted least squares. This is currently the only method available for GLM fit.
scale : string or float, optional
scale can be ‘X2’, ‘dev’, or a float The default value is None, which uses X2 for Gamma, Gaussian, and Inverse Gaussian. X2 is Pearson’s chi-square divided by df_resid. The default is 1 for the Binomial and Poisson families. dev is the deviance divided by df_resid
tol : float
Convergence tolerance. Default is 1e-8.
start_params : array-like, optional
Initial guess of the solution for the loglikelihood maximization. The default is family-specific and is given by the
family.starting_mu(endog)
. If start_params is given then the initial mean will be calculated asnp.dot(exog, start_params)
.Notes
This method does not take any extra undocumented
kwargs
.