因此,Age.Category
是一个分类变量,其可能值为Young Adult, Adult, Middle Age, and Senior.
所以我想做这样的事情:
myModel = lm(Brozek ~ Weight + Age.CategorySenior:Thigh + Age.CategoryMiddle Age:Forearm + Age.CategorySenior:Wrist + Weight:Thigh + Abdomen:Thigh + Abdomen:Wrist, data = bodyfat)
但当然不行,所以我该如何实现呢?