Re: [S] model.frame.default() problem

John Thaden (
Thu, 25 Jun 1998 11:37:37 -0500

At 10:03 AM 6/24/1998 -0700, Robert Treder of StatSci wrote:
>Prof. Ripley pointed out a serious problem with the _new_ default behavior
>for model.frame.default(). The new argument, `drop.unused.levels', was
>added <snip>.

>It is preferable to us and many users that extra (unused) levels be dropped
>when fitting a model to prevent singular model matrices but that they should
>not be dropped for prediction <snip>.

>The next release will default this argument to FALSE so that unused
>levels are not dropped which is backward compatible with all previous
>beginning with 3.0. We will then proceed to modify existing model fitting
>functions to explicitly drop unused levels in model fitting to avoid the
>problem of singular model matrices. Changing the code in this way will not
>effect the way predictions are done.

To put things aright, you'll also need to do one of the following: Either
amend the help pages for `model.frame' and `model.frame.default' to include
a warning about the `drop.unused.levels' argument addressed to those doing
prediction, or much better, eliminate the `drop.unused.levels' argument
entirely. After you amend the model fitting functions, the
'drop.unused.levels' argument will be superfluous.

John Thaden
Little Rock, Arkansas

>In the mean time the work around suggested by Prof. Ripley will put
>back to where it was before we made this change. Make a local copy of the
>model.frame.default() function by doing
> fix(model.frame.default)
>and replacing the `drop.unused.levels = T' argument with
>`drop.unused.levels = F'.
>We are sorry for any inconvenience this may have caused (or will cause).
>Bob Treder
>MathSoft, DAPD
>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