You rm is of class summary.lm
Is that what allEffects is expecting?

On 19/08/2015 01:49, Robert Zimbardo wrote:
Hi

I cannot figure out why the effects package throws me error messages
with the following simple code:


rm(list=ls(all=TRUE)); set.seed(1); library(effects)
# set up data
x <- factor(rep(letters[1:3], each=100))
y <- c(rnorm(100, 3, 3), rnorm(100, 4, 3), rnorm(100, 5, 3))


# fit linear model
m <- summary(lm(y~x)) # no problem

# now the problem
plot(allEffects(m))
# Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,  :
#   ‘range’ not meaningful for factors
plot(effect("x", m))
# Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,  :
#   ‘range’ not meaningful for factors


Any ideas? It's go to be something superobvious, but I don't get it. Thanks,
RZ

______________________________________________
R-help@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.


--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
R-help@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.

Reply via email to