[R] lmrob gives NA coefficients
David Winsemius
dwinsemius at comcast.net
Sun Mar 4 00:52:17 CET 2018
> On Mar 3, 2018, at 3:04 PM, Christien Kerbert <christienkerbert at gmail.com> wrote:
>
> Dear list members,
>
> I want to perform an MM-regression. This seems an easy task using the
> function lmrob(), however, this function provides me with NA coefficients.
> My data generating process is as follows:
>
> rho <- 0.15 # low interdependency
> Sigma <- matrix(rho, d, d); diag(Sigma) <- 1
> x.clean <- mvrnorm(n, rep(0,d), Sigma)
Which package are you using for mvrnorm?
> beta <- c(1.0, 2.0, 3.0, 4.0)
> error <- rnorm(n = n, mean = 0, sd = 1)
> y <- as.data.frame(beta[1]*rep(1, n) + beta[2]*x.clean[,1] +
> beta[3]*x.clean[,2] + beta[4]*x.clean[,3] + error)
> xy.clean <- cbind(x.clean, y)
> colnames(xy.clean) <- c("x1", "x2", "x3", "y")
>
> Then, I pass the following formula to lmrob: f <- y ~ x1 + x2 + x3
>
> Finally, I run lmrob: lmrob(f, data = data, cov = ".vcov.w")
> and this results in NA coefficients.
It would also be more courteous to specify the package where you are getting lmrob.
>
> It would be great if anyone can help me out. Thanks in advance.
>
> Regards,
> Christien
>
> [[alternative HTML version deleted]]
This is a plain text mailing list although it doesn't seem to have created problems this time.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
David Winsemius
Alameda, CA, USA
'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law
More information about the R-help
mailing list