|
Examples
Setup
. webuse restaurant
Generate a new categorical variable named type that identifies the first-level set of alternatives based on the
variable named restaurant
. nlogitgen type = restaurant(fast: Freebirds | MamasPizza, family: CafeEccell | LosNortenos | WingsNmore,
fancy: Christophers | MadCows)
Examine the tree structure
. nlogittree restaurant type, choice(chosen)
Perform nested logit regression
. nlogit chosen cost distance rating || type: income kids, base(family) || restaurant:, noconst
case(family_id)
看看人家的数据就知道了
|