0
$\begingroup$

I have the example data below. I wonder how I should interpret the BL value from the ANOVA table, 0.0194391. It means it is significantly different from zero, but putting that into the context, does it mean that it is significantly different from the treatments (trt)?. Does anyone have a good explanation? Thanks in advance! :)

id <- rep(c(300,450), each=6)
visit <- rep(1:6,2)
trt <- rep(c(0,"A",0,"B",0,"C"),2)
q1 <- c(20,100,40,89,30, 60,50,85,10,40,15, 20)
df <- data.frame(id,visit,trt,q1)
dfnoll <- df[df$trt==0,]
meanBL <- tapply(dfnoll$q1, dfnoll$id, mean, na.rm=TRUE)  # funkar bara när det är numreriskt
BL <- rep(meanBL, each=3)
dftrt <- df[!df$trt==0,]
dftrt$BL <- BL
dftrt
    id visit trt  q1 BL
2  300     2   A 100 30
4  300     4   B  89 30
6  300     6   C  60 30
8  450     2   A  85 25
10 450     4   B  40 25
12 450     6   C  20 25
str(dftrt)
'data.frame':   6 obs. of  5 variables:
 $ id   : num  300 300 300 450 450 450
 $ visit: int  2 4 6 2 4 6
 $ trt  : Factor w/ 4 levels "0","A","B","C": 2 3 4 2 3 4
 $ q1   : num  100 89 60 85 40 20
 $ BL   : num  30 30 30 25 25 25
dftrt$id <- as.factor(dftrt$id)
dftrt$visit <- as.factor(dftrt$visit)
dftrt$BL <- as.numeric(as.character(dftrt$BL))
library(lme4)
df.lm <- lmer(formula =q1 ~ trt + BL +(1|id), data=dftrt)
library(car)
Anova(df.lm)
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: q1
      Chisq Df Pr(>Chisq)    
trt 17.7895  2  0.0001371 ***
BL   5.4616  1  0.0194391 *
$\endgroup$

1 Answer 1

0
$\begingroup$

No, it does not mean that BL is significantly different from treatment. Treatment and BL are two different variables, the first is a factor the second is numeric. An ANOVA tells you, that a model with both variables treatment and BL is a significantly better model than a simpler model with just treatment variable (in terms of fit).

These two variables cannot be directly compared since they represent different concepts. If you want to compare the slopes for BL for the various treatments in trt then you need a linear model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.