statsmodels.genmod.generalized_estimating_equations.GEE.fit

GEE.fit(maxiter=60, ctol=1e-06, start_params=None, params_niter=1, first_dep_update=0, cov_type='robust', ddof_scale=None, scaling_factor=1.0, scale=None)[source]

Fits a marginal regression model using generalized estimating equations (GEE).

Parameters:
maxiterint

The maximum number of iterations

ctolfloat

The convergence criterion for stopping the Gauss-Seidel iterations

start_paramsarray_like

A vector of starting values for the regression coefficients. If None, a default is chosen.

params_niterint

The number of Gauss-Seidel updates of the mean structure parameters that take place prior to each update of the dependence structure.

first_dep_updateint

No dependence structure updates occur before this iteration number.

cov_typestr

One of “robust”, “naive”, or “bias_reduced”.

ddof_scalescalar or None

The scale parameter is estimated as the sum of squared Pearson residuals divided by N - ddof_scale, where N is the total sample size. If ddof_scale is None, the number of covariates (including an intercept if present) is used.

scaling_factorscalar

The estimated covariance of the parameter estimates is scaled by this value. Default is 1, Stata uses N / (N - g), where N is the total sample size and g is the average group size.

scalestr or float, optional

scale can be None, ‘X2’, or a float If a float, its value is used as the scale parameter. The default value is None, which uses X2 (Pearson’s chi-square) for Gamma, Gaussian, and Inverse Gaussian. The default is 1 for the Binomial and Poisson families.

Returns:
An instance of the GEEResults class or subclass

Notes

If convergence difficulties occur, increase the values of first_dep_update and/or params_niter. Setting first_dep_update to a greater value (e.g. ~10-20) causes the algorithm to move close to the GLM solution before attempting to identify the dependence structure.

For the Gaussian family, there is no benefit to setting params_niter to a value greater than 1, since the mean structure parameters converge in one step.


Last update: Dec 23, 2024