aov with Error Strata

Jim Robison-Cox jimrc@mathfs.math.montana.edu
Wed, 29 Jul 1998 17:19:27 -0600 (MDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-488534781-901753860=:6003
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.NEB.4.00.9807291716501.6003@mathfs.math.montana.edu>


  Attached is R code for an aov function which handles multiple error
strata.  
  I took a different approach from that suggested in the model.c code of
R&R.  Rather than modify model.c, I did all of the functions as
interpreted R code.  They work on the examples in Chambers & Hastie _Stat
models in S_.  So far I don't have the projections working.  I have a
crude alias() function which I'm not including. I modified print.mlm and
summary.mlm because they didn't work for me.

  print.aov and summary.aov are basically the same because I don't like
the print.aov in S which strings out sums of squares on one line.

  Comments and testing on various datasets are needed.  Please let me know
what you think.

Jim Robison-Cox                 ____________            
Department of Math Sciences    |            |           phone: (406)994-5340
2-214 Wilson Hall               \   BZN, MT |           FAX:   (406)994-1789
Montana State University         |  *_______|
Bozeman, MT 59717                 \_|         e-mail: jimrc@math.montana.edu 



--0-488534781-901753860=:6003
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="aov.R"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.00.9807291711000.6003@mathfs.math.montana.edu>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME="aov.R"

YW92IDwtIGZ1bmN0aW9uIChmb3JtdWxhLCBkYXRhID0gbGlzdCgpLCBzdWJz
ZXQsIHdlaWdodHM9TlVMTCwgbmEuYWN0aW9uLCANCiAgICAgICAgbWV0aG9k
ID0gInFyIiwgbW9kZWwgPSBUUlVFLCBrZWVwLm9yZGVyPUZBTFNFLCBwcm9q
PUZBTFNFLCBvbmVkZj1GQUxTRSwNCiAgICAgICAgICAgICAgICAgdG9sPSBz
cXJ0KC5NYWNoaW5lJGRvdWJsZS5lcHMpLCAuLi4pIA0Kew0KICBpcy56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tyb3cu
bmR4LCxkcm9wPUZBTFNFXSwyLA0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgZnVuY3Rpb24oeCkgIWFsbChpcy56ZXJvKHgsIHRvbD10b2wpKSld
DQogICAgICBsY24gPC0gbGVuZ3RoKGNvbC5uZHgpDQogICAgICBpZiggbGNu
ID4gMCl7DQogICAgICAgIGlmKGxjbiA+IGRmLmVycm9yW1tpXV0pDQogICAg
ICAgICAgIGNvbC5uZHggPC0gY29sLm5keFsxOmRmLmVycm9yW1tpXV1dDQog
ICAgICAgIHggPC0gdFFlLk1bcm93Lm5keCxjb2wubmR4LGRyb3A9RkFMU0Vd
DQogICAgICAgIGF0dHIoeCwiYXNzaWduIikgPC0gYXR0cih0UWUuTSwiYXNz
aWduIilbY29sLm5keF0NCiAgICAgICAgemkgPC0gaWYoaXMubnVsbCh3ZWln
aHRzKSkgbG0uZml0KHgsIHlbcm93Lm5keF0pDQogICAgICAgICAgICAgIGVs
c2UgbG0uZml0KHgsIHlbcm93Lm5keF0sd2VpZ2h0c1tyb3cubmR4XSkNCiAg
ICAgICAgemkkcmVzaWQuYXNzaWduIDwtICh6aSRxciRyYW5rKzEpOiBkaW0o
eClbMV0NCiAgICAgICAgc3RydC5jb2VmIDwtIHppJGNvZWZmaWNpZW50c1sh
aXMubmEoemkkY29lZmZpY2llbnRzKV0NCiAgICAgICAgaWYoYW55KGlzLm5h
KHppJGNvZWZmaWNpZW50cykpKQ0KICAgICAgICAgIGNvbC5uZHggPC0gY29s
Lm5keFshaXMubmEoemkkY29lZmZpY2llbnRzKV0NCiAgICAgICAgICAgIyAo
Tm90IG5lZWRlZCBmb3IgaGVsbWVydCBjb250cmFzdHMpDQogICAgICAgIHpp
JHRlcm1zIDwtIG10DQogICAgICAgIGF0dHIoemkkdGVybXMsInRlcm0ubGFi
ZWxzIikgPC0gdW5pcXVlKGF0dHIoemkkdGVybXMsDQogICAgICAgICAgICAg
ICAgICAgICAgICJ0ZXJtLmxhYmVscyIpW2F0dHIodFFlLk0sImFzc2lnbiIp
W2NvbC5uZHhdXSkNCiAgICAgICAgYXR0cih6aSR0ZXJtcywiZmFjdG9ycyIp
IDwtICBhdHRyKHppJHRlcm1zLA0KICAgICAgICAgICAgICAgICAgICAgICJm
YWN0b3JzIilbLGF0dHIoemkkdGVybXMsInRlcm0ubGFiZWxzIiksZHJvcD1G
QUxTRV0NCiAgICAgICAgYXR0cih6aSR0ZXJtcywiaW50ZXJjZXB0IikgPC0g
MA0KICAgICAgICBjbGFzcyh6aSkgPC0gYygiYW92IiwgImxtIikNCiAgICAg
ICAgICAjIyMgU2V0IHVwIGNvbnRyYXN0cw0KICAgICAgICBjb250ciA8LSAg
YXR0cih6aSR0ZXJtcywidGVybS5sYWJlbHMiKQ0KICAgICAgICBjb250ciA8
LSBhcy5saXN0KGNvbnRyW3VubGlzdChsYXBwbHkoc3Ryc3BsaXQoY29udHIs
IjoiKSxsZW5ndGgpKT09IDFdKQ0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICMgcmVtb3ZlIGludGVyYWN0aW9ucw0KICAgICAg
ICBuYW1lcyhjb250cikgPC0gdW5saXN0KGNvbnRyKQ0KICAgICAgICBmb3Ig
KGogaW4gMTpsZW5ndGgoY29udHIpKQ0KICAgICAgICAgIGNvbnRyW1tqXV0g
PC0gY29udHJhc3RzKGRhdGFbLGNvbnRyW1tqXV0gXSkNCiAgICAgICAgemkk
Y29udHJhc3RzIDwtIGNvbnRyDQogICAgICAgIGlmKHByb2opDQogICAgICAg
ICAgemkkcHJvaiA8LSBwcm9qLmFvdih4LHksb25lZGY9b25lZGYpDQogICAg
ICB9DQogICAgICBlbHNlIHsgICAgICAjIyBObyB0ZXJtcyB0byBmaXQgaW4g
dGhpcyBlcnJvciBzdHJhdHVtDQogICAgICAgICB6aSA8LSBsaXN0KGNvZWZm
aWNpZW50cz0gTkEsICAgIHJlc2lkdWFscyA9IHlbcm93Lm5keF0sDQogICAg
ICAgICAgICA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uIFNxIiwgIkYiLCAiUHIoPkYpIikpDQogIH0NCiAgICBp
Zighb25lLm9mLm1hbnkpDQogICAgICBjYXQocGFzdGUoIkFuYWx5c2lzIG9m
IFZhcmlhbmNlIFRhYmxlXG5SZXNwb25zZToiLCBmb3JtdWxhKG9iamVjdClb
WzJdXSksDQogICAgICAgICJcbiIpDQogIHJlc3VsdCA8LSBsaXN0KHRhYmxl
ID0gdGFibGUpDQogIGNsYXNzKHJlc3VsdCkgPC0gInRhYnVsYXIiDQogIHJl
c3VsdA0KfQ0K
--0-488534781-901753860=:6003--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._