Re: [R] car::linearHypothesis fails to constrain factor to zero

2012-08-15 Thread John Fox
Pr(>F) 1 45 322.54 2 44 311.97 110.567 1.4903 0.2287 Best, John > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Iuri Gavronski > Sent: August-15-12 4:47 AM > To: r-help >

[R] car::linearHypothesis fails to constrain factor to zero

2012-08-15 Thread Iuri Gavronski
Hi, I am trying to test whether a factor (coded as a set of dummy variables) is equal to zero, using linearHypothesis. I get an error. See a reproducible example: data(swiss) my_swiss = swiss my_swiss$fake = factor(sample(c("A","B"),47,rep=T)) my_lm <- lm(Infant.Mortality ~ Fertility + fake, data