ca_test function

Commenges-Andersen test for heterogeneity

Commenges-Andersen test for heterogeneity

ca_test(object, id = NULL)

Arguments

  • object: A coxph object with a cluster() statement in the right-hand side of the formula.
  • id: Optionally, a vector determining the grouping to be tested. See details.

Returns

A named vector containing the test statistic, variance, and p-value

Details

The Cox model with a +cluster() statement has the same point estimates as the one without that statmenet. The only difference is in the adjusted standard errors. In some cases, a model with +cluster() statments can't be fitted. For example, when there are no covariates. In that case, a vector may be passed on in the cluster argument.

Examples

mcox1 <- coxph(Surv(time, status) ~ rx + sex + cluster(litter), rats, model = TRUE, x = TRUE) ca_test(mcox1) mcox2 <- coxph(Surv(time, status) ~ 1, rats, x = TRUE) ca_test(mcox2, rats$litter)

References

Commenges, D. and Andersen, P.K., 1995. Score test of homogeneity for survival data. Lifetime Data Analysis, 1(2), pp.145-156.

  • Maintainer: Theodor Adrian Balan
  • License: GPL (>= 2)
  • Last published: 2019-09-22