statsmodels.genmod.qif.QIF#

class statsmodels.genmod.qif.QIF(endog, exog, groups, family=None, cov_struct=None, missing='none', **kwargs)[source]#

Fit a regression model using quadratic inference functions (QIF).

QIF is an alternative to GEE that can be more efficient, and that offers different approaches for model selection and inference.

Parameters:
endogarray_like

The dependent variables of the regression.

exogarray_like

The independent variables of the regression.

groupsarray_like

Labels indicating which group each observation belongs to. Observations in different groups should be independent.

familygenmod family, optional

An instance of a GLM family. The default is Gaussian.

cov_structQIFCovariance instance, optional

An instance of a QIFCovariance. The default is QIFIndependence.

missingstr, optional

Available options are ‘none’, ‘drop’, and ‘raise’. If ‘none’, no nan checking is done. If ‘drop’, any observations with nans are dropped. If ‘raise’, an error is raised.

Attributes:
endog_names

Names of endogenous variables

exog_names

Names of exogenous variables

Methods

estimate_scale(params)

Estimate the dispersion/scale.

fit([maxiter, start_params, tol, gtol, ...])

Fit a GLM to correlated data using QIF.

from_formula(formula, groups, data[, subset])

Create a QIF model instance from a formula and dataframe.

objective(params)

Calculate the QIF objective function and its gradient.

predict(params[, exog])

After a model has been fit, predict returns the fitted values

References

A. Qu, B. Lindsay, B. Li (2000). Improving Generalized Estimating Equations using Quadratic Inference Functions, Biometrika 87:4. www.jstor.org/stable/2673612

Methods

estimate_scale(params)

Estimate the dispersion/scale.

fit([maxiter, start_params, tol, gtol, ...])

Fit a GLM to correlated data using QIF.

from_formula(formula, groups, data[, subset])

Create a QIF model instance from a formula and dataframe.

objective(params)

Calculate the QIF objective function and its gradient.

predict(params[, exog])

After a model has been fit, predict returns the fitted values

Properties

endog_names

Names of endogenous variables

exog_names

Names of exogenous variables