CoxBcv.mbnmr: Hybrid MBNMR bias-corrected sandwich variance estimator In XueqiWang/CoxBcv_R_package: Bias-Corrected Sandwich Variance Estimators for Marginal Cox Analysis of Cluster Randomized Trials

 CoxBcv.mbnmr R Documentation

Hybrid MBNMR bias-corrected sandwich variance estimator

Description

Calculate the hybrid MBNMR bias-corrected sandwich variance estimator for marginal Cox analysis of cluster randomized trials, proposed by Wang et al. (under review). MBN: Morel, Bokossa, and Neerchal (2003); MR: martingale residual.

Usage

```CoxBcv.mbnmr(Y, Delta, X, ID)
```

Arguments

 `Y` vector of observed time-to-event data. `Delta` vector of censoring indicators. `X` matrix of marginal mean covariates with one column for one covariate (design matrix excluding intercept). `ID` vector of cluster identifiers.

Value

• coef - estimate of coefficients.

• exp(coef) - estimate of hazard ratio.

• MBNMR-var - MBNMR bias-corrected sandwich variance estimate of coef.

References

Morel, J. G., Bokossa, M. C., & Neerchal, N. K. (2003). Small sample correction for the variance of GEE estimators. Biometrical Journal: journal of mathematical methods in biosciences, 45(4), 395-409.

Wang, X., Turner, E. L., & Li, F. Improving sandwich variance estimation for marginal Cox analysis of cluster randomized trials. Under Review.

Examples

```Y <- c(11,19,43,100,7,100,100,62,52,1,7,6)
Delta <- c(1,1,1,0,1,0,0,1,1,1,1,1)
X1 <- c(0,0,0,0,0,0,1,1,1,1,1,1)
X2 <- c(-19,6,-25,48,10,-25,15,22,17,-9,45,12)
ID <- c(1,1,2,2,3,3,4,4,5,5,6,6)

X <- X1
CoxBcv.mbnmr(Y,Delta,X,ID)

X <- cbind(X1,X2)
CoxBcv.mbnmr(Y,Delta,X,ID)

```

XueqiWang/CoxBcv_R_package documentation built on April 2, 2022, 11:57 p.m.