[R] model specification issue

Miles O'Brien e144436 at drdrb.com
Mon Feb 10 07:07:44 CET 2014

Hi all,
I'm reviewing a paper and ran into a mystery (hopefully not to you) trying
to reproduce the stats. The authors uploaded their data to a repository.

I've created a similar (though random) data set for confidentiality reasons.

So the authors include one four-level treatment variable, but report results
about the significance of the interaction, which seems incongruous. In the
methods section, they also mention using Tukey's after ANOVA. 

I figured they might have included the treatment variable as a convenience
to plot. Here, I split it into two new variables so I can create an

So the authors mention lot was nested within the interaction. I thought that
nesting would not have to be specified in the model explicitly, since R can
tell whether, in this case, lots contain multiple treatment groups or
whether there is no such replication. However,

does not contain results for the interaction term (treat1:treat2) in the
anova table. The following does work:

Could anyone explain why the former doesn't work?

BTW: the latter anova table is exactly the following as the following two.
Curious also that, when you use the four-level treatment variable lot can be
added as is or as an interaction term with the treatment variable only. This
seems to be the flexibility that I expected R to have in the above model

Any insights welcome!

code.r <http://r.789695.n4.nabble.com/file/n4685011/code.r>  

View this message in context: http://r.789695.n4.nabble.com/model-specification-issue-tp4685011.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list