Hi Roger,
take a look at the functions: "add.scope", "drop.scope" and
"factor.scope".
Best,
Dimitris
p.s., if you want to code it in R why did you sent an e-mail to
s-news?
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Roger Gill" <R.C.GILL@soton.ac.uk>
To: <s-news@lists.biostat.wustl.edu>
Sent: Thursday, January 27, 2005 3:24 PM
Subject: [S] Proposing models
Dear All,
I would like to do the following.
Given factors x1,x2,......,xn I define a model in terms of its
generators.
For example y~x1*x2*x3+x4+....+xn. Given this model I would like to
move to
a neighbouring model ensuring that any model is hierarchical. So
for the
given model I could add any two way interaction not already in the
model, or
choose to remove the three way interaction from the current model.
Clearly
I would not want to remove any two way interaction if the three way
is
present.
I would initially like to code this in R, eventually moving to C,
and hence
would like some inspiration as to how I could achieve my goal.
Any ideas would be much appreciated
Best Wishes
Roger Gill
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with
the BODY of the message: unsubscribe s-news
|