ca_test {frailtyEM} | R Documentation |
Commenges-Andersen test for heterogeneity
ca_test(object, id = NULL)
object |
A |
id |
Optionally, a vector determining the grouping to be tested. See 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.
A named vector containing the test statistic, variance, and p-value
Commenges, D. and Andersen, P.K., 1995. Score test of homogeneity for survival data. Lifetime Data Analysis, 1(2), pp.145-156.
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)