UPDATE – May 2014
The site I was originally using to store the script and data has since closed, and I’ve had a few requests for it. So, the code is now available on github here: https://raw.githubusercontent.com/nzcoops/blog_code/master/2011-10-02_lcmm_post_upload
And the .Rdata file can be downloaded below.
NOTE: you will need to change the extension from .doc to .Rdata.
Apologies that the output isn’t showing well as far as spacing and alignment is concerned. Am working on fixing that!
Generally when we have a set of data, we have known groupings. Be that three different treatment groups, two sex groups, 4 ethnicity groups etc. There is also the possibility of unobserved groupings within your data, some examples (I’m clutching at straws here) are those who are vegetarians and those who aren’t, those who regularly exercise and those who don’t, or those who have a family history of a certain condition and those who don’t (assuming those data were not collected). There is an approach to look into this.