Dear Group,
I am trying to superimpose lines computed with different strategies on a data set using rlm and lqs from the package MASS. I can get the lm and rlm lines to show up in the graph but need some help figuring out what the object “weight” is… Here is what I am doing on a different data set that gives the same problem:
library(MASS)
p <- ggplot(data = msleep, aes(x = brainwt, y = bodywt))
#
lqs(bodywt~brainwt, data = msleep)
lm(bodywt~brainwt, data = msleep)
rlm(bodywt~brainwt, data = msleep)
pq <- p + geom_point() + stat_smooth(method = rlm, se = FALSE)
pq
pq1 <- pq + stat_smooth(method = lm, se = FALSE)
pq1
# No problems until the next line….
pq1 + stat_smooth(method = lqs, se = FALSE)
# Partial output:
> pq1 + stat_smooth(method = lqs, se = FALSE)
Error in lqs.control(...) : object 'weight' not found
In addition: Warning messages:
Any pointers to what lqs wants ….or how to superimpose a line fit using lqs would be most appreciated. Thanks in advance.
Alan-
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2