[R] Help - linear regression
S Ellison
S.Ellison at lgc.co.uk
Fri Jan 25 15:49:04 CET 2008
a*b is not an interaction term. An interaction term looks like a:b.
y~age*race means
y~age+race+age:race.
For
TB> model1<-lm(lavi~age+sex+race+diabetes+hypertension, data=tb1)
TB> model2<-lm(lavi~age+sex+age*race+diabetes+hypertension, data=tb1)
both main effects are present in model 2 (below) as well as the
interaction. You should be able to see this in anova(model2), which will
also show you the order in which terms are added to the model.
If the * was just an email typo, though, forget it.
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
More information about the R-help
mailing list