3.5.2.2.1. statsmodels.genmod.cov_struct.Autoregressive

class statsmodels.genmod.cov_struct.Autoregressive(dist_func=None)[source]

An autoregressive working dependence structure.

The dependence is defined in terms of the time component of the parent GEE class. Time represents a potentially multidimensional index from which distances between pairs of observations can be determined. The correlation between two observations in the same cluster is dep_params^distance, where dep_params is the autocorrelation parameter to be estimated, and distance is the distance between the two observations, calculated from their corresponding time values. time is stored as an n_obs x k matrix, where k represents the number of dimensions in the time index.

The autocorrelation parameter is estimated using weighted nonlinear least squares, regressing each value within a cluster on each preceeding value in the same cluster.

Parameters:

dist_func: function from R^k x R^k to R^+, optional

A function that computes the distance between the two observations based on their time values.

References

B Rosner, A Munoz. Autoregressive modeling for the analysis of longitudinal data with unequally spaced examinations. Statistics in medicine. Vol 7, 59-71, 1988.

__init__(dist_func=None)[source]

3.5.2.2.1.1. Methods

__init__([dist_func])
covariance_matrix(endog_expval, index) Returns the working covariance or correlation matrix for a given cluster of data.
covariance_matrix_solve(expval, index, ...) Solves matrix equations of the form covmat * soln = rhs and returns the values of soln, where covmat is the covariance matrix represented by this class.
initialize(model) Called by GEE, used by implementations that need additional setup prior to running fit.
summary()
update(params) Updates the association parameter values based on the current regression coefficients.