EstimatingEquationsRegression.AR1CorType
AR1Cor <: CorStruct

Type that represents a GEE working correlation structure in which the observations within a group are modeled as being serially correlated according to their order in the dataset, with the correlation between two observations that are j positions apart being r^j for a real parameter r that can be estimated from the data.

EstimatingEquationsRegression.ExchangeableCorType
ExchangeableCor <: CorStruct

Type that represents a GEE working correlation structure in which the observations within a group are modeled as exchangeably correlated. Any two observations in a group have the same correlation between them, which can be estimated from the data.

EstimatingEquationsRegression.OrdinalIndependenceCorType
OrdinalIndependenceCor <: CorStruct

Type that represents a GEE working correlation structure in which the ordinal observations within a group are modeled as being independent. Each ordinal observation is converted to a set of binary indicators, and the indicators derived from a common ordinal value are modeled as correlated, with the correlations determined from the marginal means.

EstimatingEquationsRegression.expand_ordinalMethod
expand_ordinal(df, response; response_recoded, var_id, level_var)

Construct a dataframe from source df that converts an ordinal variable into a series of binary indicators. These indicators can then be modeled using binomial GEE with the OrdinalIndependenceCor working correlation structure.

response must be a column name in df containing an ordinal variable. For each threshold t in the unique values of this variable an indicator that the value of the variable is >= t is created. The smallest unique value in response is omitted. The recoded variable is called response_recoded and a default name is created if no name is provided. A variable called var_id is created that gives a unique integer label for each set of indicators derived from a common observed ordinal value. The threshold value used to create each binary indicator is placed into the variable named level_var.

EstimatingEquationsRegression.geeMethod
gee(F, D, args...; kwargs...)

Fit a generalized linear model to data using generalized estimating equations. Alias for fit(GeneralizedEstimatingEquationsModel, ...). See fit for documentation.

EstimatingEquationsRegression.qifMethod
qif(F, D, args...; kwargs...)

Fit a generalized linear model to data using quadratic inference functions. Alias for fit(QIF, ...). See fit for documentation.

EstimatingEquationsRegression.resid_pearsonMethod
resid_pearson(m::AbstractGEE)

Return the Pearson residuals, which are the observed data minus the mean, divided by the square root of the variance function. The scale parameter is not included so the Pearson residuals should have constant variance but not necessarily unit variance.

EstimatingEquationsRegression.scoretestMethod
scoretest(model::AbstractGEE, submodel::AbstractGEE)

GEE score test comparing submodel to model. model need not have been fit before calling scoretest.

StatsAPI.fitFunction
fit(GeneralizedEstimatingEquationsModel, X, y, g, l, v, [c = IndependenceCor()]; <keyword arguments>)

Fit a generalized linear model to data using generalized estimating equations (GEE). This interface emphasizes the "quasi-likelihood" framework for GEE and requires direct specification of the link and variance function, without reference to any distribution/family.

StatsAPI.fitFunction
fit(GeneralizedEstimatingEquationsModel, X, y, g, d, c, [l = canonicallink(d)]; <keyword arguments>)

Fit a generalized linear model to data using generalized estimating equations. X and y can either be a matrix and a vector, respectively, or a formula and a data frame. g is a vector containing group labels, and elements in a group must be consecutive in the data. d must be a UnivariateDistribution, c must be a CorStruct and l must be a Link, if supplied.

Keyword Arguments

  • cov_type::String: Type of covariance estimate for parameters. Defaults

to "robust", other options are "naive", "md" (Mancl-DeRouen debiased) and "kc" (Kauermann-Carroll debiased).xs

  • dofit::Bool=true: Determines whether model will be fit
  • wts::Vector=similar(y,0): Not implemented.

Can be length 0 to indicate no weighting (default).

  • offset::Vector=similar(y,0): offset added to to form eta. Can be of

length 0

  • verbose::Bool=false: Display convergence information for each iteration
  • maxiter::Integer=100: Maximum number of iterations allowed to achieve convergence
  • atol::Real=1e-6: Convergence is achieved when the relative change in

β is less than max(rtol*dev, atol).

  • rtol::Real=1e-6: Convergence is achieved when the relative change in

β is less than max(rtol*dev, atol).

  • start::AbstractVector=nothing: Starting values for beta. Should have the

same length as the number of columns in the model matrix.

  • fitcoef::Bool=true: If false, set the coefficients equal to the GLM coefficients

or to start if provided, and update the correlation parameters and dispersion without using GEE iterations to update the coefficients.`

  • fitcor::Bool=true: If false, hold the correlation parameters equal to their starting

values.

  • bccor::Bool=true: If false, do not compute the Kauermann-Carroll and Mancel-DeRouen

covariances.

StatsAPI.predictMethod
predict(m::AbstractGEE; type=:linear)

Return the fitted values from the fitted model. If type is :linear returns the linear predictor, if type is :response returns the fitted mean.