[R] Specifying weird models
(Ted Harding)
Ted.Harding at nessie.mcc.ac.uk
Mon Aug 4 11:12:05 CEST 2003
[re-sending this one since it apparently didn't get through yesterday]
Hi Folks,
I'm pondering the following type of question in the context
of specifying a linear model formula. Basically, it's a matter
of specifying a "non-homogeneous" model. The following example
(not a real case, and over-simplified, but it illustrates the
point cleanly) shows what I mean.
There are 3 factors, A, B and C. B and C are at two levels (1,2)
and A is at 3 levels (1,2,3). Suppose I have good reason to believe
that:
-- at level 1 of A, no main effects nor interactions of B and C
-- at level 2 of A, main effects of B and C but no interactions
-- at level 3 of A, B and C come in with a full model (main
effects plus interactions).
Furthermore, the main effects of B and C at A=2 are to be the same
as at A=3.
In order to squeeze maximum efficiency from the data, I want to
suppress unnecessary parameters from the estimation, so want to
specify a model which incorporates the above structure.
Fundamentally, this could be written as a full-interaction model
for A, B and C with explicit linear constraints on the coefficients.
In the above example, there are not many combinations of levels
(12 only), so writing special-purpose code could be feasible.
I'm wondering how to present such a situation _in general_ to standard
linear modelling functions (and, indeed, how the results might come back
if one could succeed in getting the functions to address the problem).
With thanks for any comments or suggestions,
Best wishes to all,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 03-Aug-03 Time: 09:38:23
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list