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 (May 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 7 May 2008 13:53:41 -0700
Reply-To:     Dale McLerran <stringplayer_2@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dale McLerran <stringplayer_2@YAHOO.COM>
Subject:      Re: Logistic Regression
In-Reply-To:  <6fb23108-82cf-4229-b9e4-74a64b4e7754@26g2000hsk.googlegroups.com>
Content-Type: text/plain; charset=iso-8859-1

--- sasworks <xuzengpj@GMAIL.COM> wrote:

> On May 6, 5:08 pm, clown...@HOTMAIL.COM (Adam) wrote: > > I know that Logistic Regression can be accomplished a few different > ways > > using SAS, but I'm not sure which approach (PROC LOGISTIC, GENMOD, > PROBIT, > > etc...) is best suited to my situation -- or if they all accomplish > the same > > task. I'm hoping that someone out there may be able to make a > suggestion, > > and, since I haven't used these procedures before, perhaps offer a > quick > > explanation of why/how to use that procedure. > > > > I am generally working with consumer data. In this case suppose > there are 3 > > products and that each consumer evaluates all three and expresses > their > > interest in purchasing the product. This is a 5 point scale 1 = > definitely > > wouldn't ... 5 = definitely would, but it is looked at as a > collapsed > > binomial yes/no response based upon interest. I would like to test > > significance using logistic regression, and if appropriate conduct > pairwise > > comparisons of the products, and test for order bias. A "typical" > example > > of my data is: > > > > Consumer Product InterestYes/No Trial Order > > 1 1 2 0 1 > > 1 2 4 1 2 > > 1 3 4 1 3 > > 2 1 1 0 2 > > 2 2 3 0 3 > > 2 3 4 1 1 > > 3 1 5 1 3 > > 3 2 2 0 1 > > 3 3 3 0 2 > > . > > . > > . > > > > I'd like to thank anyone that might have some suggestions in > advance! > > you should use proc logistic since the response is 0/1. go to SAS > online help document for proc logistic (examples) and Example 42.2: > Logistic Modeling with Categorical Predictors seems similar to what > you want to do. for pairwise comparison, you can follow the example > to > use "contrast". >

I'm sorry, but I cannot agree with this advice. Since each person rates multiple products, then there are random subject effects to consider. One person may be a pessimist and rank every product low while another person may be an optimist and rank every product high. These are person random effects and must be properly accounted for in the analysis. The procedures GLIMMIX (obtainable as a download from http://support.sas.com/rnd/app/download.html) and NLMIXED can both fit random effects models. The procedure GENMOD could also be used to fit a GEE model to account for correlated responses.

Using any of these procedures, one would need a separate row of data for each person by product. Thus, if there are three products which are ranked, then one would need three rows of data for each person. So, the data are already constructed as needed for any of these procedures except that the data shown previously use the ordinal scale instead of a binary response. (Note that with any of these procedures, you can also fit an ordered logits regression model using the data as shown above. I would actually encourage fitting such a model for these data. There may be much more information in the rankings than in just a yes/no version of the response.)

GLIMMIX code for fitting a random effects regression for a Bernoulli response would be something like the following:

proc glimmix data=mydata; class consumer product order; model response = product|order / s dist=binary; random intercept / subject=consumer; lsmeans product*order / slice=order; run;

This model assumes that there is a product by order interaction effect. You will get an F-test that examines whether the interaction is significant. The LSMEANS statement requests that the effect of product be tested in all of the different order assignments. These effects are interpretable even in the presence of a significant interaction.

There are many other options that one could specify. You will have to examine the GLIMMIX documentation to determine if there are other options that you wish to invoke. The above code is merely a skeletal outline of the most basic analysis.

Dale

--------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


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