I'm trying to a Tukey test on the data (bmt), (KMsurv) and focusing on the variables t2 and d3 only. t2: the disease free survival time (time to relapse, death or end of study) d3: indicator variable for disease free. d3 = 1 if dead or relapsed, or d3 = 0 if alive or disease free. The data can be obtained using the KMsurv package. The patients have been grouped into risk categories or groups, represented by the variable g in the data set.
g = 1; ALL (acute lymphoblastic leukemia) 38 patients
g = 2; AML low risk (acute myeloctic leukemia) 54 patients
g = 3; AML high risk (acute myeloctic leukemia) 45 patients
library(KMsurv)
data(bmt)
bmt
library(survival)
# run the ANOVA and print out the ANOVA table:
anova1 <- aov( group ~ t2+d3, data = bmt )
summary(anova1)
TukeyHSD(anova1)
But there is an error message appears
Error in TukeyHSD.aov(anova1) :no factors in the fitted model In addition: Warning messages: 1: In replications(paste("~", xx), data = mf) : non-factors ignored: t2 2: In replications(paste("~", xx), data = mf) : non-factors ignored: d3
I have installed the package multcomp
but I'm not sure if this package is necessary.
How can I fix that error?