[Rd] Two apparent bugs in aov(y~ *** -1 + Error(***)), with (PR#6523)

b-h at mevik.net b-h at mevik.net
Mon Feb 2 16:18:16 MET 2004


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> I believe you are right, but can you please explain why anyone would want=
=20
> to fit this model?

When analysing data from mixture designs, the variables add up to a
constant, and it is often preferrable to fit models without intercept
term.  We often have experiments where a mixture design (typically raw
materials) is combined with a factorial design (typically process
settings), and these are often modelled as the product of a
polynomial in the mixture components (without intercept) and a
polynomial in the factorial components.(*)

More often than not, either the raw materials or the process settings
cannot be completely randomised, leading to models with error terms.
It is also quite common that the experiment has to be run over several
days, leading to an error term for day.

> There is a much simpler fix: in the line
>
>         if(intercept) nmstrata <- c("(Intercept)", nmstrata)
>
> remove the condition (and drop the empty stratum later if you want).

You are right.  I didn't see that one.


---
(*) In these models, we have to manually code the factorial terms into
continuous variables, in order to circumvent the coding logic in
model.matrix() (when there is no intercept term, the first factor is
coded as dummy variables, one variable per level of the factor,
which makes these models overparametrised), but that is perhaps a
different story. :-)

--=20
Bj=F8rn-Helge Mevik, dr.scient.



More information about the R-devel mailing list