from Part III - The suite of choice models
Published online by Cambridge University Press: 05 June 2015
An economist is an expert who will know tomorrow why the things he predicted yesterday didn’t happen today.
(Laurance J. Peter 1919–90)Introduction
In this chapter we demonstrate, through the use of a labeled mode choice data set (summarized in Appendix 11A to this chapter), how to model choice data by means of Nlogit. In writing this chapter we have been very specific. We demonstrate line by line the commands necessary to estimate a model in Nlogit. We do likewise with the output, describing in detail what each line of output means in practical terms. Knowing that “one must learn to walk before one runs,” we begin with estimation of the most basic of choice models, the multinomial logit (MNL). We devote Chapter 12 to additional output that may be obtained for the basic MNL model and later chapters (especially Chapters 21–22) to more advanced models.
Modeling choice in Nlogit: the MNL command
The basic commands necessary for the estimation of choice models in Nlogit are as follows:
NLOGIT
;lhs = choice, cset, altij
;choices =<names of alternatives>
;Model:
U(alternative 1 name) = <utility function 1>/
U(alternative 2 name) = <utility function 2>/
…
U(alternative i name) = <utility function i>$
We will use this command syntax with the labeled mode choice data described in Chapter 10, shown here as:
Nlogit
;lhs = choice, cset, altij
;choices = bs,tn,bw,cr
;model:
u(bs) = bs + actpt*act + invcpt*invc + invtpt*invt2 + egtpt*egt + trpt*trnf /
u(tn) = tn + actpt*act + invcpt*invc + invtpt*invt2 + egtpt*egt + trpt*trnf /
u(bw) = bw + actpt*act + invcpt*invc + invtpt*invt2 + egtpt*egt + trpt*trnf /
u(cr) = invccr*invc + invtcar*invt + TC*TC + PC*PC + egtcar*egt $
While other command structures are possible (e.g., using RHS and RH2 instead of specifying the utility functions – we do not describe these here and refer the interested reader to Nlogit’s help references), the above format provides the analyst with the greatest flexibility in specifying choice models. It is for this reason that we use this command format over the other formats available.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.