Package 'crrcbcv'

Title: Bias-Corrected Variance for Competing Risks Regression with Clustered Data
Description: A user friendly function 'crrcbcv' to compute bias-corrected variances for competing risks regression models using proportional subdistribution hazards with small-sample clustered data. Four types of bias correction are included: the MD-type bias correction by Mancl and DeRouen (2001) <doi:10.1111/j.0006-341X.2001.00126.x>, the KC-type bias correction by Kauermann and Carroll (2001) <doi:10.1198/016214501753382309>, the FG-type bias correction by Fay and Graubard (2001) <doi:10.1111/j.0006-341X.2001.01198.x>, and the MBN-type bias correction by Morel, Bokossa, and Neerchal (2003) <doi:10.1002/bimj.200390021>.
Authors: Xinyuan Chen [aut, cre, cph], Fan Li [aut]
Maintainer: Xinyuan Chen <[email protected]>
License: MIT + file LICENSE
Version: 1.0
Built: 2024-12-24 06:40:10 UTC
Source: CRAN

Help Index


Clustered competing risks simulated data

Description

sample of 20 clusters with an average cluster size of 20

Usage

data(cls)

Format

A data frame containing 20 clusters with an average cluster size of 20 and the following five variables. Simulation is detailed in the paper Finite-sample adjustments in variance estimators for clustered competing risks regression. Chen, Li. 2022. Under Review. Statistics in Medicine.

I

id of clusters

X_1

a cluster-level covariate generated from the standard normal distribution

X_2

an individual-level covariate generated from the standard normal distribution

eps

event type. 0=censored, 1, 2

T_obs

observed event time

Author(s)

Xinyuan Chen, ⁠<[email protected]>⁠

Fan Li, ⁠<[email protected]>⁠

References

Chen X, Li F. (2022). Finite-sample adjustments in variance estimators for clustered competing risks regression. Statistics in Medicine. 00(Under Review): 1-24.

Examples

data(cls)

Bias-Corrected Variance for Competing Risks Regression with Clustered Data

Description

Small-sample bias-corrected variance for regression modeling using proportional subdistribution hazards with clustered right censored data. (Zhou et al., 2012) Failure times within the same cluster are dependent.

Four types of bias correction are included: the MD-type correction by Mancl and DeRouen (2001), the KC-type correction by Kauermann and Carroll (2001), the FG-type correction by Fay and Graubard (2001), and the MBN-type correction by Morel, Bokossa, and Neerchal (2003).

Usage

crrcbcv(
  beta,
  ftime,
  fstatus,
  cov1,
  cov2,
  tf,
  cluster,
  failcode = 1,
  cencode = 0,
  subset,
  na.action = na.omit,
  var.type = "MD"
)

Arguments

beta

the estimated regression coefficients from crrc

ftime

vector of failure/censoring times

fstatus

vector with a unique code for each failure type and a separate code for censored observations

cov1

matrix (nobs x ncovs) of fixed covariates (either cov1, cov2, or both are required)

cov2

matrix of covariates that will be multiplied by functions of time; if used, often these covariates would also appear in cov1 to give a prop hazards effect plus a time interaction

tf

functions of time. A function that takes a vector of times as an argument and returns a matrix whose jth column is the value of the time function corresponding to the jth column of cov2 evaluated at the input time vector. At time tk, the model includes the term cov2[,j]*tf(tk)[,j] as a covariate

cluster

clustering indicator

failcode

code of fstatus that denotes the failure type of interest

cencode

code of fstatus that denotes censored observations

subset

a logical vector specifying a subset of cases to include in the analysis

na.action

a function specifying the action to take for any cases missing any of ftime, fstatus, cov1, cov2, cengroup, or subset

var.type

a string or a vector of strings with value(s) selected from {"MD", "KC", "FG", "MBN"}

Value

Returns a list of class crr, with components corresponding to var.type

⁠$MD⁠

the MD-type bias-corrected variance covariance matrix for beta

⁠$KC⁠

the KC-type bias-corrected variance covariance matrix for beta

⁠$FG⁠

the FG-type bias-corrected variance covariance matrix for beta

⁠$MBN⁠

the MBN-type bias-corrected variance covariance matrix for beta

Author(s)

Xinyuan Chen, ⁠<[email protected]>⁠

Fan Li, ⁠<[email protected]>⁠

References

Chen X, Li F. (2022). Finite-sample adjustments in variance estimators for clustered competing risks regression. Statistics in Medicine. 00(Under Review): 1-24.

Zhou B, Fine J, Latouche A, Labopin M. (2012). Competing risks regression for clustered Data. Biostatistics. 13(3): 371-383.

See Also

crrSC

Examples

library(crrcbcv)
data(cls)
mod.est = crrc(ftime=cls$T_obs, fstatus=cls$eps, cov1=cls[,c('X_1','X_2')], cluster=cls$I)
crrcbcv(beta=mod.est$coef, ftime=cls$T_obs, fstatus=cls$eps, cov1=cls[,c('X_1','X_2')],
cluster=cls$I, var.type=c('MD','KC','FG','MBN'))