1
$\begingroup$

All is in the title, but here are the details:

> str(data)
'data.frame':   54 obs. of  3 variables:
 $ time     : int  3 5 10 15 20 25 3 5 10 15 ...
 $ treatment: Factor w/ 10 levels "factor1","factor10",..: 9 9 9 9 9 9 10 10 10 10 ...
 $ weight   : num  98.2 92.1 243 353.1 445.8 ...

> head(data)
  time treatment   weight
1    3   factor8  98.1546
2    5   factor8  92.1294
3   10   factor8 242.9712
4   15   factor8 353.1204
5   20   factor8 445.8420
6   25   factor8 515.3832

> model1<- lm(weight ~ time*treatment, data= data)
> model2<- lm(weight ~ time+treatment, data= data)
> model3<- lm(weight ~ time, data= data)

summary(model1) : shows that none of the interaction contrasts are significant (p>0.05); anova(model1, model2) : Not significant, I can remove the interaction

> summary(model2)# Two treatments are significant (p<0.05)

Call:
lm(formula = weight ~ time + treatment, data = data)

Residuals:
    Min      1Q  Median      3Q     Max 
-59.169 -17.661   3.025  17.797  83.584 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)       -20.9945    12.4326  -1.689   0.0985 .  
time               21.3419     0.4814  44.330   <2e-16 ***
treatmentfactor10  19.0771    15.1921   1.256   0.2160    
treatmentfactor2   -4.9841    21.9174  -0.227   0.8212    
treatmentfactor3   16.8312    14.2110   1.184   0.2428    
treatmentfactor4  -14.0341    21.9663  -0.639   0.5263    
treatmentfactor5    5.9784    15.1921   0.394   0.6959    
treatmentfactor6    7.5999    15.1921   0.500   0.6194    
treatmentfactor7   21.7281    15.1921   1.430   0.1599    
treatmentfactor8   34.8160    15.1921   2.292   0.0269 *  
treatmentfactor9   35.8421    15.1921   2.359   0.0229 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 26.31 on 43 degrees of freedom
Multiple R-squared:  0.9808,    Adjusted R-squared:  0.9763 
F-statistic: 219.3 on 10 and 43 DF,  p-value: < 2.2e-16


> anova(model3, model2)
Analysis of Variance Table

Model 1: weight ~ time
Model 2: weight ~ time + treatment
  Res.Df   RSS Df Sum of Sq      F Pr(>F)
1     52 39749                           
2     43 29773  9    9975.7 1.6008 0.1456

So two treatments have a significant effect on the weight as compared to the reference treatment group (controls). However, the result of anova(model3, model2) suggests that the addition of the treatment in predictors does not improve significantly the fit. What model should I finally chose? For me, I would choose the model 2 with the Treatment factor because the study is designed to test the effect of the treatment and we see that two have an effect. But I am confused by the non-significance of the anova(model3, model2) results. If I remove the Treatment effect, I am concerned about false-negative.

Thank you very much for any help, reply or comments. The best,

$\endgroup$
3
  • $\begingroup$ The problem may be just that you need more degrees of freedom to detect significance. The coefficients of 8 and 9 are nearly the same and similarly for 5 and 6 and for 3 and 10. If you combined each of those pairs into single levels that would get you 3 more degrees of freedom and wouldn't change the model much. $\endgroup$ Commented Apr 6, 2020 at 23:30
  • $\begingroup$ Thanks. But I think I cannot because they are different conditions and then I would have more replicates in some groups than others. $\endgroup$
    – SkyR
    Commented Apr 7, 2020 at 9:46
  • $\begingroup$ lm itself imposes no such restriction. $\endgroup$ Commented Apr 7, 2020 at 12:20

1 Answer 1

0
$\begingroup$

The Anova table shows whether effect of the individual treatment methods significantly differ from that of the rest of the treatment methods as a whole. In other words. the F values is calculated as a ratio between the average of the sum of the squares of individual treatment methods to the average of the squares of the residual.

The intercept in the linear regression denotes treatment factor 1. I would suggest the model with the treatment factor would of good fit. I would also suggest you to group the treatment factors other than 8 and 9 into a single factor and rerun the analysis. It may give you some clarity.

$\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.