[R] simple interactions
thierry.onkelinx at inbo.be
Fri Apr 15 14:15:40 CEST 2016
Does fitting group + age:group instead of age*group solves your problem?
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
2016-04-15 13:58 GMT+02:00 Therneau, Terry M., Ph.D. <therneau op mayo.edu>:
> 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 course). The coefficients of the model will then be the age effect in
> group A, the age effect in group B and the age effect in C rather than the
> standard ones of an overall age effect followed by contrasts. These is
> often a better format for tables in a publication.
> Yes, I can reconstruct these from the original fit, but I have a lot of
> variables for several models and it would be easier to have an automatic
> form. I suspect that there is an easy answer, but I don't see it.
> Terry Therneau
> R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help