> Therneau, Terry M , Ph D
> on Fri, 15 Apr 2016 06:58:22 -0500 writes:
> I'd like to get interaction terms in a model to be in
> another form. Namely, suppose I had variables age and
> group, the latter a factor with levels A, B, C, with age *
>
I was right that there is an easy answer!
Thanks for the 3 quick answers, all three correct and useful.
Terry Therneau
On 04/15/2016 07:15 AM, Thierry Onkelinx wrote:
Dear Terry,
Does fitting group + age:group instead of age*group solves your problem?
Best regards,
ir. Thierry Onkelinx
Try using
~ group/age
or even
~ 0 + group/age
Both have all three group-specific slopes but differ with respect to the
intercept codings. The latter has three group-specific intercepts as well.
But the former has an intercept corresponding to the reference group A and
then the usual
Dear Terry,
Does fitting group + age:group instead of age*group solves your problem?
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070
I'd like to get interaction terms in a model to be in another form. Namely, suppose I had
variables age and group, the latter a factor with levels A, B, C, with age * group in the
model. What I would like are the variables "age:group=A", "age:group=B" and
"age:group=C" (and group itself of
5 matches
Mail list logo