mc_robust_std: Robust Standard Errors for Regression Parameters

View source: R/mc_robust_std.R

mc_robust_stdR Documentation

Robust Standard Errors for Regression Parameters

Description

Computes cluster-robust (sandwich-type) standard errors for the regression parameters of an object of class mcglm, accounting for within-cluster correlation.

Usage

mc_robust_std(object, id)

Arguments

object

An object of class mcglm representing a fitted marginal model.

id

An integer or factor vector identifying clusters or subjects. Its length and ordering must match the number and ordering of the observations used to fit the model.

Details

The robust variance–covariance matrix is obtained using an empirical estimator based on clustered residuals and the sensitivity matrix of the estimating equations. The implementation assumes that the data are correctly ordered such that observations belonging to the same cluster are stored in contiguous rows.

Value

A list with two components:

Std.Error

A numeric vector containing the robust standard errors of the regression parameter estimates.

vcov

A numeric matrix giving the robust variance–covariance matrix of the regression parameter estimates.

The returned objects are computed under the assumption that the data are in the correct cluster order.

Author(s)

Wagner Hugo Bonat, wbonat@ufpr.br

Source

Nuamah, I. F., Qu, Y., and Aminu, S. B. (1996). A SAS macro for stepwise correlated binary regression. Computer Methods and Programs in Biomedicine, 49, 199–210.

See Also

mc_bias_correct_std


mcglm documentation built on Jan. 9, 2026, 1:07 a.m.