sand_fun: sand_fun

View source: R/MARGE_package.R

sand_funR Documentation

sand_fun

Description

A function that calculates the sandwich (or Pan's) standard error using estimates from the fitted GEE under an independent working correlation.

Usage

sand_fun(Y, X, N, n_vec, mu.est, V.est, nb = TRUE, omega = 1, ...)

Arguments

Y

: the response variable.

X

: the model matrix.

N

: the number of clusters.

n_vec

: a vector consisting of the cluster sizes for each cluster.

mu.est

: estimates of the fitted mean function under the null model.

V.est

: estimates of the fitted variance function under the null model.

nb

: a logical argument, is the model a negative binomial model? The default is FALSE.

omega

: a regularization constant that is applied if data is of high dimension (n>N). The default is omega = 1.

...

: further arguments passed to or from other methods.

Details

This function was used for the Arthropod example.

Value

sand_fun returns the sandwich (or Pan's) standard error using estimates from the fitted GEE under an independent working correlation.

Author(s)

Jakub Stoklosa and David I. Warton.

References

Liang, K. Y. and Zeger, S. L. (1986). Longitudinal data analysis using generalized linear models. Biometrika, 73, 13–22.

Stoklosa, J., Gibb, H. and Warton, D.I. (2014). Fast forward selection for generalized estimating equations with a large number of predictor variables. Biometrics, 70, 110–120.

Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. Journal of Computational and Graphical Statistics, 27, 245–253.


JakubStats/marge documentation built on Feb. 25, 2024, 9:38 p.m.