[R] glm for nominal X ordinal

Gang Chen gangchen at mail.nih.gov
Fri Jan 4 22:08:20 CET 2008


Suppose I have a two-way table of nominal category (party  
affiliation) X ordinal category (political ideology):

party affiliation X (3 levels) - democratic, independent, and republic
political ideology Y (3 levels) - liberal, moderate, and conservative

The dependent variable is the frequency (or count) for all the two- 
way cells sampled from the voters. I want to test whether there is  
any party affiliation effect, and, if there is, the pair-wise  
contrasts. I have never used glm (I assume this the program I should  
use) before, so I am not so sure how I can code the two independent  
variables reflecting the fact that one is nominal while the other is  
ordinal and how to formulate the model.

Any help is highly appreciated,
Gang




More information about the R-help mailing list