Hi Josh,
Thanks for your reply. You're right about letting R's method dispatch system
choose the method for summary and inserting more spaces in the code. I was just
messing around with the code in the former case and forgot to change it back.
As far as not having enough whitespace goes, I've
Hi Paul,
Changing the factor levels will work (as you saw). In this case, you
could also edit the contrast matrix.
## look at default contrasts
contrasts(gad$dosegrp)
model1 <- lm(hama ~ dosegrp, data = gad)
summary(model1)
## choose group 3 as base (comparison)
contrasts(gad$dosegrp) <- contr.
Hello Everyone,
Figured out one part of the code. Setting the reference level for a factor is
accomplished using the relevel funtion (pg. 383 of MASS; pg. 70 of Data
Manipulation with R):
gad$dosegrp <- relevel(gad$dosegrp,3)
This works very well. Much better than using a format in SAS proc
Hello Everyone,
I've been learning to use R in my spare time over the past several months. I've
read about 7-8 books on the subject. Lately I've been testing what I've learned
by trying to replicate the analyses from some of my SAS books. This helps me
make sure I know how to use R properly an
4 matches
Mail list logo