Re: [R] lme nesting/interaction advice

From: Federico Calboli <>
Date: Sun, 11 May 2008 19:52:50 +0100

On 10 May 2008, at 07:36, Kingsford Jones wrote:
> Federico,
> I think you'll be more likely to receive the type of response you're
> looking for if you formulate your question more clearly. The
> inclusion of "commented, minimal, self-contained, reproducible code"
> (as is requested at the bottom of every email sent by r-help) is an
> effective way to clarify the issues. Also, when asking a question
> about fitting a model it's helpful to describe the specific research
> questions you want the model to answer.


I apprecciate that my description of the *full* model is not 100% clear, but my main beef was another.

The main point of my question is, having a 3 way anova (or ancova, if you prefer), with *no* nesting, 2 fixed effects and 1 random effect, why is it so boneheaded difficult to specify a bog standard fully crossed model? I'm not talking about some rarified esoteric model here, we're talking about stuff tought in a first year Biology Stats course here[1].

Now, to avoid any chances of being misunderstood in my use of the words 'fully crossed model', what I mean is a simple

y ~ effect1 * effect2 * effect3

with effect3 being random (all all the jazz that comes from this fact). I fully apprecciate that the only reasonable F-tests would be for effect1, effect2 and effect1:effect2, but there is no way I can use lme to specify such simple thing without getting the *wrong* denDF. I need light on this topic and I'd say it's a general enough question not to need much more handholding than this.

Having said that, I did look at the mixed-effects mailing list before posting here, and it looks like it was *not* the right place to post anyway:

'This mailing list is primarily for useRs and programmeRs interested in *development* and beta-testing of the lme4 package.'

although the R-Me is now CC'd in this.

I fully apprecciate that R is developed for love, not money, and if I knew how to write an user friendly frontend for nlme and lme4 (and I knew how to actually get the model I want) I'd be pretty happy to do so and submit it as a library. In any case, I feel my complaint is pefectly valid, because specifying such basic model should ideally not such a chore, and I think the powers that be might actually find some use from user feedback.

Once I have sorted how to specify such trivial model I'll face the horror of the nesting, in any case I attach a toy dataset I created especially to test how to specify the correct model (silly me).


Federico Calboli

[1] So much bog standard that the Zar, IV ed, gives a nice table of how to compute the F-tests correctly, taking into account that one of the 3 effects is randon (I'll send the exact page and table number tomorrow, I don't have the book at home).

Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t]
f.calboli [.a.t]

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code.

Received on Sun 11 May 2008 - 18:55:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 12 May 2008 - 09:30:37 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive