fit$contrasts <- attr(x, "contrasts")
fit$xlevels <- .getXlevels(mt, mf)
fit$na.action <- attr(mf, "na.action")
if (model)
fit$model <- mf
if (!x.ret)
fit$x <- NULL
if (y.ret)
fit$y <- y
fit
}
-Original
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Vadim Ogranovich
> Sent: Monday, March 14, 2011 10:37 AM
> To: 'r-devel@r-project.org'
> Subject: [Rd] discrepancy between lm and MASS:rlm
>
&
Dear R-devel,
There seems to be a discrepancy in the order in which lm and rlm evaluate their
arguments. This causes rlm to sometimes produce an error where lm is just fine.
Here is a little script that illustrate the issue:
> library(MASS)
> ## create data
> n <- 100
> dat <- data.frame(x=rep(