Re: [R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-31 Thread Max Kuhn
This is failing because it is a saturated model and the contrast package tries to do a t-test (instead of a z test). I can add code to do this, but it will take a few days. Max On Fri, Oct 28, 2011 at 2:16 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Forgive my resending this post. To

Re: [R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-29 Thread Mark Difford
John, There is a good example of one way of doing this in multcomp-examples.pdf of package multcomp. See pages 8 to 10. Regards, Mark. - Mark Difford (Ph.D.) Research Associate Botany Department Nelson Mandela Metropolitan University Port Elizabeth, South Africa -- View this message in

[R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-28 Thread John Sorkin
Forgive my resending this post. To data I have received only one response (thank you Bert Gunter), and I still do not have an answer to my question. Respectfully, John Windows XP R 2.12.1 contrast package. I am trying to understand how to create contrasts for a model that contatains an

Re: [R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-28 Thread Daniel Malter
Is there a specific reason why you insist on using the contrast library? If not: # Create 2x2 contingency table. counts=c(50,50,30,70) row -gl(2,2,4) column - gl(2,1,4) mydata - data.frame(row,column,counts) print(mydata) #Create contrasts row-factor(row) column-factor(column)

Re: [R] Contrasts with an interaction. How does one specify the dummy variables for the interaction

2011-10-28 Thread John Sorkin
Daniel, I want to use the contrast library because I want to be able to specify any arbitrary post-hoc contrast, e.g. Given a 3x2 table describing smoking (never, former, current) by sex (male,female), I can use a post-hoc contrast to compare the fraction of female former smokers to the