0

I want to get the confidence interval of diet4(=diet D) so I made a code below.

data(coagulation,package="faraway")
options(contrasts=c("contr.sum","contr.poly"))
fit.coag <- aov(coag ~ diet,data= coagulation)
summary(fit.coag)
confint(fit.coag)

The results show only up to diet3(=diet C).

                 2.5 %     97.5 %

(Intercept) 62.9613731 65.0386269
diet1       -5.0309151 -0.9690849
diet2        0.2366719  3.7633281
diet3        2.2366719  5.7633281

How can I calculate diet4's interval?

zephryl
  • 14,633
  • 3
  • 11
  • 30
Anne
  • 1
  • 1
  • The fourth level doesn’t appear because it’s the reference category against. i.e., the effects for the other factor levels are giving you the effect of `diet1` vs. `diet4`, `diet2` v. `diet4`, etc. See [https://stackoverflow.com/questions/48949490/one-level-of-factor-missing-from-glm-output](https://stackoverflow.com/questions/48949490/one-level-of-factor-missing-from-glm-output) for details. – zephryl Nov 23 '22 at 02:33
  • Also see https://stackoverflow.com/a/72820729/17303805. – zephryl Nov 23 '22 at 02:36

0 Answers0