0

I'm trying to conduct a post-hoc (multiple comparison) analysis on the data (bmt), (KMsurv) and focusing on the variables t2 and d3 only.

Here is the code used:

library(KMsurv)
data(bmt)
bmt
library(survival)

# run the ANOVA and print out the ANOVA table:
anova1 <- aov( (t2,d3) ~ group, data = bmt )
summary(anova1)


TukeyHSD(anova1)

I got this error message: 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?

Heidi
  • 25
  • 5
  • your formula in `aov` contains a syntax error: anything like `(1, 2)` will give that error – rawr Mar 24 '20 at 03:11
  • How can I fix that? – Heidi Mar 24 '20 at 14:37
  • 1
    i'm not sure what model you are trying to get, the `aov` formula should look like `y ~ v1 + v2 + ...` – rawr Mar 24 '20 at 15:03
  • There is no T2 or D3 column in the `bmt` dataset just as there is no `group` column in the `burn` dataset. So your formula is attempting to test for the association of variables in two different and unrelated datasets. So your question is incoherent on several levels. Voting to close as not reproducible. – IRTFM Mar 25 '20 at 19:38
  • Sorry, that was a mistake. I meant to write (bmt) instead of (burn) – Heidi Mar 25 '20 at 23:21

0 Answers0