[R] contrast {Design} question

Greg Tarpinian sasprog474 at yahoo.com
Fri Aug 5 19:00:39 CEST 2005


Sorry about the previous email, hadn't finished
editing yet....

Here is some code that I have been trying to get
to work:

A.quant <- 
quantile(foo.frame$A, 
         probs=seq(from=0.05, to=0.95, by=0.05))
B.quant <- 
quantile(foo.frame$B, 
         probs=seq(from=0.05, to=0.95, by=0.05))
gender <- levels(foo.frame$GENDER)

contrast.1 <- 
contrast(Model.1,
         list(TREAT= 'A', A= A.quant, 
	      B = B.quant, 
              GENDER = gender),
         list(TREAT= 'D', A= A.quant, 
              B = B.quant, 
              GENDER = gender),
	 type = 'average', weights = table(gender))

My goal is to obtain a set of "average" Type II
contrasts over the levels of GENDER, but not over the
levels of A and B.  R keeps telling me that 
"weights" needs to be 722 elements, but this is the
total number of contrasts over all levels of A,
B, and GENDER....

Any suggestions would be greatly appreciated,

      Greg




More information about the R-help mailing list