?=============================================================== ? Basic Multinomial Choice Models. ? Data set = mnc.lpj ?=============================================================== ? First part based on shoe brand choice ?--------------------------------------------------------------- SAMPLE ; 1 - 12800 $ ? ?--------------------------------------------------------------- ? Basic functional form ?--------------------------------------------------------------- NLOGIT ; Lhs = choice ; Choices = brand1,brand2,brand3,none ; Rhs = fash, qual, price, pricesq,asc4 $ ?--------------------------------------------------------------- ? Expand the functional form by adding variables. Add this to ? your model command. ? ******************>>> Based on the LR test, are these three ? ******************>>> variables significant? ?--------------------------------------------------------------- ; Rh2 = male, age24, age39 ? ?--------------------------------------------------------------- ? Test for age difference in preferences ? ******************>>> What is the result of the test? ? ******************>>> Repeat the test for gender difference. ? ******************>>> Use MALE instead of YOUNG in the test. ?--------------------------------------------------------------- CREATE ; young = age25 $ NLOGIT ; For[(test) young =*,0,1] ; your model specification (must not include age25) $ ?--------------------------------------------------------------- ? Partial effects ? ******************>>> Interpret the cross brand elasticities. ? ******************>>> Do these elasticities make sense? ?--------------------------------------------------------------- NLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4 ; Effects : Price (*) ; full$ ?--------------------------------------------------------------- ? Simulate a general price increase to examine effects. ? The simulator does not know that pricesq = price squared. ? In order to get the simulation right, it is necessary to ? change both price and its square. ?******************>>> Try increasing the price change to ?******************>>> 40%. How do the choices change ?--------------------------------------------------------------- NLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Pricesq,Asc4 $ NLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Pricesq,Asc4 ; Simulate = * ; Scenario: price (brand*) = [*] 1.1/ pricesq(brand*)= [*]1.21 $ ?--------------------------------------------------------------- ? Simulate price increase for one brand to examine effects ?******************>>> Is BRAND2 different from BRAND1? ?--------------------------------------------------------------- CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4 ; Effects : Price (*) $ CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4 ; Simulation = * ; Scenario: Price (Brand1) = [*] 1.5 $ ?--------------------------------------------------------------- ? Testing for IIA ?******************>>> What is the result of the test? ?--------------------------------------------------------------- SAMPLE ; All $ CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4 $ CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4 ; IAS = Brand3 $ ?--------------------------------------------------------------- ? Do men pay different attention to fashion than women? ? Is the difference statistically significant? ? The simulator includes the MALE effect in the FASHion part ? of the utility function. The simulation compares the case ? in which males care differently about fashion to the case in ? which they don't. ?******************>>> What is the effect? ?--------------------------------------------------------------- Create ; MaleFash = Male*Fash $ CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4,MaleFash $ CLOGIT ; Lhs = Choice ; Choices=Brand1,Brand2,Brand3,None ; Rhs = Fash,Qual,Price,Asc4,MaleFash ; Simulation = * ; Scenario: MaleFash(*) = [*] 0 $ ?=============================================================== ? Basic Multinomial Choice Models. ? Data set = mnc.lpj ?=============================================================== ? Second part based on travel mode choice ?--------------------------------------------------------------- SAMPLE ; 1 - 840 $ ?--------------------------------------------------------------- ? Multinomial Probit Model ?******************>>> Compare the elasticities produced by the ?******************>>> two models ?--------------------------------------------------------------- NLOGIT ; Lhs = Mode ; output=ic ; Choices = Air,Train,Bus,Car ; Rhs = TTME,INVC,INVT,GC; Rh2=One,Hinc ; Effects: invc (*) $ NLOGIT ; Lhs = Mode ; MNP ; PTS = 5 ; Maxit = 5 ; Halton ; Choices = Air,Train,Bus,Car ; Rhs = TTME,INVC,INVT,GC; Rh2=One,Hinc ; Effects: invc (*) $ ?--------------------------------------------------------------- ? Nested Logit Model ?******************>>> Try a few different nest structures ?--------------------------------------------------------------- NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; Tree = Private(Air,Car),Public(Train,Bus) ; Show Tree $ CALC ; LOGLU = LOGL $ ?--------------------------------------------------------------- ? Constrain IV parameters to produce MNL model ?******************>>> What is the result of the test of IIA? ?--------------------------------------------------------------- NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; Tree = Private(Air,Car),Public(Train,Bus) ; IVSET:(Private,Public)=[1] $ CALC ; LOGLR = LOGL $ CALC ; List ; LRTEST = 2*(LOGLU - LOGLR) $ ?--------------------------------------------------------------- ? Degenerate branch. Two normalizations ?--------------------------------------------------------------- NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; Tree = Fly(Air),Ground(Car,Train,Bus) $ NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; Tree = Fly(Air),Ground(Car,Train,Bus) ; RU2 $ ?--------------------------------------------------------------- ? Use nested logit to reveal scaling. ?--------------------------------------------------------------- NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; Tree = Fly(Air),Drive(Car),Rail(Train),Ride(Bus) ; IVSET: (Ride) = [1] ; Par $ NLOGIT ; Lhs = Mode ; Choices=Air,Train,Bus,Car ; Rhs = One,GC,TTME,INVT,INVC ; HET ; SDV = SA,ST,1.0,SC $