search for: motb

Displaying 1 result from an estimated 1 matches for "motb".

Did you mean: mob
2011 Mar 04
2
glht: Problem with symbolic contrast for factors with number-levels
...t having to redefine the factor levels? Example: #A is a factor with 'number' levels #B similar factor with 'letter' levels dat<-data.frame(y=1:4,A=factor(c(1,1,2,2)), B=factor(c('e','e','f','f')) ) motA<-lm(y~A,data=dat) motB<-lm(y~B,data=dat) library(multcomp) #does not work glht(motA,linfct=mcp(A=c("2 - 1 = 0 "))) #the error message is # Error in coefs(ex[[3]]) : # cannot interpret expression '1' as linear function #works glht(motB,linfct=mcp(B=c("f - e = 0"))) regards Ulrich Hal...