R-alpha: model.frame improvements

Thomas Lumley (thomas@biostat.washington.edu)
Mon, 28 Oct 1996 11:21:29 -0800 (PST)


Date: Mon, 28 Oct 1996 11:21:29 -0800 (PST)
From: Thomas Lumley <thomas@biostat.washington.edu>
To: r-testers <r-testers@stat.math.ethz.ch>
Subject: R-alpha: model.frame improvements
In-Reply-To: <Pine.SUN.3.91.961021110733.1652A-100000@avon>

  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.

--1918950298-1617557818-846530489=:22228
Content-Type: TEXT/PLAIN; charset=US-ASCII


Attached to this message is a file containing revisions to terms.formula(),
model.frame() and some support functions. There are two major and a few 
minor improvements.

1. The offset() function can now be used in model formulae
eg glm(y~x+offset(tt),data=a) rather than glm(y~x,offset=a$tt)
The offset appears in the model.frame exactly as if the offset= argument 
had been used, and doesn't end up in the model matrix. It should work 
with any function; it has been tested with glm and anova.glm.

2. model.frame() now takes arbitrary extra arguments specifying things to 
be added to the frame (rather than just weights= and offset=). This 
provides more compatibility with S-PLUS and in particular is necessary 
for the gee() function, which has to put a group identifier in the model 
frame.

Other differences are described in the attached file. In order to use the 
functions you must fix the bug in sapply() reported in a previous message
[change lapply(X   to lapply(as.list(X)  near the middle of the sapply() 
function]


thomas lumley
UW Biostat
--1918950298-1617557818-846530489=:22228
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="newmodelframe.R"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SUN.3.91.961028112129.22228F@chekov>
Content-Description: 

Iw0KIyBOZXcgYW5kIHJldmlzZWQgY29kZSB0byBpbXByb3ZlIHRoZSBoYW5k
bGluZyBvZiBleHRyYSBhcmd1bWVudHMgdG8gbW9kZWwgZnVuY3Rpb25zDQoj
DQojIG1vZGVsLmZyYW1lKCkgbm93IGhhbmRsZXMgYXJiaXRyYXJ5IGFyZ3Vt
ZW50cyBpbnN0ZWFkIG9mIGp1c3Qgd2VpZ2h0cz0gY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gICMjIHRlcm1zLmZvcm11bGEg
ZG9lc24ndCBjb3VudCB0aGUgcmVzcG9uc2Ugd2hlbiBpdCBjb3VudHMgcG9z
aXRpb25zDQoJICBpZiAobGVuZ3RoKHgpID09IDMpIA0KCSAgICBhdHRyaWIk
b2Zmc2V0IDwtIGF0dHJpYiRvZmZzZXQgKyAxDQoJfQ0KCWVsc2Ugew0KCQlu
ZXcudGVybXMgPC0gYWxsLnRlcm1zDQoJfQ0KCWlmICghaGFkLm9mZnNldCkg
DQoJCWF0dHJpYiRzcGVjaWFscyRvZmZzZXQgPC0gTlVMTA0KCW5ldy5hdHRy
aWIgPC0gYXR0cmlidXRlcyhuZXcudGVybXMpDQoJbmV3LmF0dHJpYiRvZmZz
ZXQgPC0gYXR0cmliJG9mZnNldA0KCW5ldy5hdHRyaWIkc3BlY2lhbHMgPC0g
YXR0cmliJHNwZWNpYWxzDQoJbmV3LmF0dHJpYiR2YXJpYWJsZXMgPC0gYXR0
cmliJHZhcmlhYmxlcw0KCW5ldy5hdHRyaWIkZm9ybXVsYSA8LSBhdHRyaWIk
Zm9ybXVsYQ0KCW5ldy5hdHRyaWIkaW50ZXJjZXB0PC1hdHRyaWIkaW50ZXJj
ZXB0DQoJbmV3LmF0dHJpYiRmYWN0b3JzPC1hdHRyaWIkZmFjdG9ycw0KCWF0
dHJpYnV0ZXMoYWxsLnRlcm1zKSA8LSBuZXcuYXR0cmliDQoJYWxsLnRlcm1z
DQp9DQogDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0K
--1918950298-1617557818-846530489=:22228--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-