Re: [S] Re: bug in predict()

Frank E Harrell Jr (
Sun, 17 May 1998 11:23:10 -0400

-----Original Message-----
From: Gerhard Koop <>
To: <>
Cc: <>; <>
Date: Saturday, May 16, 1998 8:06 AM
Subject: [S] Re: bug in predict()

>see my 'Bug in predict()'- mail to S-news
>"One man's serious bug is another woman's handy feature... "
>This is not quite a bug, but should be part of the examples section (e.g. SAS has a big
>sample- section ... although not all quirky features of the predict- option in
>proc glm,e.g., are written down explicitly)
>Thanks a lot for responding to my confusion about the treament of factors
>within S- Plus: Charles C. Berry, Brian D. Ripley, Gardar Johannesson and Bill Venables
>A "subset" of a factor, e.g. factor(c("a1","a2","a2","a1")) on the last observation, is
>factor("a1", levels=c("a1", "a2")), rather than factor("a1"). A "subset" must always retain
>the attributes of the "superset" factor. In this case the levels attribute.
>This is the price to pay to work in an OOP environment.

Not necessarily. In me Design library I go to great pains so that the
user doesn't need to worry about this problem at all. predict.Design
re-maps factor levels back to the way they were in the original fit.

Frank E Harrell Jr
Professor of Biostatistics and Statistics
Director, Division of Biostatistics and Epidemiology
Dept of Health Evaluation Sciences
University of Virginia School of Medicine

>Charles C. Berry added:
>When reporting a problem like this one, always include the version info.
>e.g.: Version 4.0 Release 3 for Microsoft Windows : 1997
>This message was distributed by To unsubscribe
>send e-mail to with the BODY of the
>message: unsubscribe s-news

This message was distributed by To unsubscribe
send e-mail to with the BODY of the
message: unsubscribe s-news