genmod.cov_struct.Nested()

statsmodels.genmod.cov_struct.Nested

class statsmodels.genmod.cov_struct.Nested(cov_nearest_method='clipped') [source]

A nested working dependence structure.

A working dependence structure that captures a nested hierarchy of groups, each level of which contributes to the random error term of the model.

When using this working covariance structure, dep_data of the GEE instance should contain a n_obs x k matrix of 0/1 indicators, corresponding to the k subgroups nested under the top-level groups of the GEE instance. These subgroups should be nested from left to right, so that two observations with the same va