Jon Heron wrote in his original query:
> I discovered yesterday that Stata permitted
>(indeed had a specific command for) the inclusion of an interaction between
> a factor and a continuous variable withOUT the factor's main effect.
Nick Cox surmised this was the xi command (interaction expansion), a very powerful feature of the Stata language. Having followed the allstat exchanges, I've just been disconcerted to get a series of messages while using Stata to fit a GLM. I duly included main effects:
xi: glm npos year i.location i.location*year , family(binomial samplen)
and got a series of warnings
note: _Ilocation_3 dropped due to collinearity
note: _Ilocation_4 dropped due to collinearity
note: _Ilocation_2 dropped due to collinearity
note: year dropped due to collinearity
but all the main effect and interaction parameters were reported! The reason is that Stata's default *is* to include all interactions and main effects, so
xi: glm npos i.location*year , family(binomial samplen)
is sufficient and would appear to meet general approval as a starting point.
The notation Jon refers to would be i.location|year, which would fit a separate slope for each location but a common intercept.
Allan
***********************************************************************************
This email and any attachments are intended for the named recipient only. Its unauthorised use, distribution, disclosure, storage or copying is not permitted. If you have received it in error, please destroy all copies and notify the sender. In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent. All emails may be subject to monitoring.
***********************************************************************************
|