-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
@mattansb I need your help again
data <- iris
data$Petal.Length_factor <- ifelse(data$Petal.Length < 4.2, "A", "B")
model <- lm(Petal.Length ~ Species * Petal.Length_factor, data = data)Let's say I want to get the refgrid/means at the "A" level of Petal.Length_factor.
I'd have expected the following to work, yet:
at <- list("Species"=c("setosa", "versicolor", "virginica"), "Petal.Length_factor"=c("A"))
emmeans::ref_grid(model, at = at)
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
contrasts can be applied only to factors with 2 or more levelsAny ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels