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 (November 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 25 Nov 2002 09:26:38 -0800
Reply-To:     Dale McLerran <stringplayer_2@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: wly <perfectle@HOTMAIL.COM>
From:         Dale McLerran <stringplayer_2@YAHOO.COM>
Subject:      Re: Need help on nested logit model!!
In-Reply-To:  <7a5ed11d.0211240030.1e497974@posting.google.com>
Content-Type: text/plain; charset=us-ascii

The following datastep will construct a dataset which can be passed into the MDC procedure.

data newdata; set olddata; array choices {4} brand1-brand4; array pricebrand {4}; id = _n_'; do brand=1 to 4; select = choices{brand}; price = pricebrand{brand}; output; end; keep id select brand price; run;

The result will be a dataset which looks like this:

ID SELECT BRAND PRICE 1 1 1 3 1 0 2 4 1 0 3 1 1 0 4 2 2 0 1 ... 2 ... 2 ... 2 ... 3 ... 2 ... 4 ...

As far as providing you detail as to how to construct the code for the MDC procedure, I prefer to allow students to look at the documentation and puzzle over things for a while, consult with other students as the situation warrants, or confess to their professors that they just don't know how to complete the assignment and would the professor be so kind as to spend a little time clarifying some confusion or suggest what the student might look at to get a better understanding of how to proceed. I will point you to the online PDF documentation for the MDC procedure:

http://www.sas.com/rnd/app/papers/mdc.pdf

The online PDF documentation for the QLIM procedure is at:

http://www.sas.com/rnd/app/papers/qlim.pdf

By the way, I was not aware of the (relatively) new MDC or QLIM procedures, and so I searched the SAS web site for these keywords. It took me all of 5 minutes to perform the search and read enough of the documentation to answer the first of your questions. I have fitted my own multinomial discrete choice models in the past, and know enough about the structure of such models that it did not take me long to review the documentation. I would caution that the MDC procedure does not allow you to fit models in which there are multiple instances of the response for each subject, but I don't think that you will be getting into such complexities right away.

Dale

--- wly <perfectle@HOTMAIL.COM> wrote: > hi,there, > i got a data arranged as the following form: > > brand1 brand2 brand3 brand4 pricebrand1 pricebrand2 pricebrand3 > pricebrand4 > 1 0 0 0 3 4 1 2 > 0 . . . . . . . > . . . . . . . . > > because it seems to me that it's very diffcult to rearrange this data > for the form needed in SAS, anybody can tell me how to do that and > analysis this daat with PROC MDC or PROC QLIM ?? examples in detail > will be deeply appreciated! > > thanks a lot!!

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

__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mailplus.yahoo.com


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