LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Apr 2004 13:54:39 -0400
Reply-To:     Peter Flom <flom@NDRI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Flom <flom@NDRI.ORG>
Subject:      Re: Analysis of ordinal data
Content-Type: text/plain; charset=US-ASCII

I agree that Agresti is a great reference, in general. But not for this, in particular, as he does not cover the RC model. I think a very good reference for this particular model (and related ones, is Clogg and Shihadeh, Statistical Models for Ordinal Variables pub by Sage. I found it clearer than Goodman. However, they do not provide code in any computer language. They say it should be relatively easy to program them in GAUSS or S.

I asked a similar question to Boris's a while back on SAS-L, and found that no one had programed these models in SAS

I have a problem with the traditional loglinear models for data that is really ordinal, in that the loglinear model is not, strictly speaking, an ordinal one. When you assign 'an equally spaced score' you are implicitly stating a distance between the different levels, and this is precisely what ordinal models do NOT do.

For bivariate analysis where one variable is ordinal, I like PROC FREQ's Jonckheere Terpstra test, but AFAIK there's no equivalent in SAS for muliple predictors.

Peter

Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax)

>>> Agustin Calatroni <acalatr@UMICH.EDU> 4/6/2004 1:33:15 PM >>> Boris, You can perform loglinear modeling with proc genmod by fitting a Poisson regression model (the ML estimates for the Poisson parameters are identical to the corresponding ML estimates in the loglinar model). An excellent reference is "Categorical Data Analysis" second edition by Alan Agresti that describe in an appendix section the SAS code.

Using Agresti table 9.5 of political ideology data you can fit the row effect model as follows

data party; input party $ ideology $ score count; cards; democ 1liberal 1 143 democ 2moderate 2 156 democ 3conserv 3 100 indep 1liberal 1 119 indep 2moderate 2 210 indep 3conserv 3 141 repub 1liberal 1 15 repub 2moderate 2 72 repub 3conserv 3 127 run;

proc genmod data=party; class party ideology; model count = party ideology score*party /dist=poisson link=log; run;

In the above example party is treated as nominal and ideology as ordinal. For the ordinal ideology I created a equally space score and since party is nominal no score is needed. The SAS output uses dummy variables for the first two categories of each classification, and the interaction term is the product of the score for ideology and a parameter for party.

HTH Agustin Calatroni

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Boris Tawakoli Sent: Tuesday, April 06, 2004 9:05 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Analysis of ordinal data

Hello,

I have to analyze categorical data with an ordinal scale. I want to use loglinear models like the row effects model or the RC Model.

Using Proc Catmod by directly entering the design matrix allows me estimate the row effects model, but the programming of the design matrix is quite time consuming and error prone. Has anybody an idea of how to proceede more rapidly/ automatically? Does anybody know of any macro that helps on that issue?

Another thing is the RC Model (Row Column Model by Goodman (?)). I have no clue how to estimate that one. It seems there is no easy way because the model is not linear. Unfortunately I can't find any example in SAS. Can anybody help?

Best regards and many thanks in advance

Boris Tawakoli


Back to: Top of message | Previous page | Main SAS-L page