Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specifying alternative-specific coefficients in conditional choice model cmclogit

    Hello Stata wizards,

    I am using Stata 18 to estimate conditional logit choice models using the cmclogit command.

    I have choice data with 4 alternatives (vehicle types) and 9 attributes. Respondents choose between vehicle types: a conventional gasoline vehicle, a hybrid vehicle, a plug-in hybrid vehicle (PHEV), and battery electric vehicle (BEV). However, some of the attributes only apply to 2 of the alternatives. For example, I have several attributes related to recharging access and driving range for the PHEV and BEV alternatives (i.e., access to charge a vehicle at home, kms of electric driving range) - so these kinds of attributes do not apply for the conventional and hybrid alternatives. In the data, the conventional and hybrid vehicle alternatives can have either missing values or 0s for the alternative-specific attributes. As such, I need to specify a model where the PHEV and BEV alternatives have beta coefficients that are not present for the conventional and hybrid alternatives (i.e., different utility function equations for the alternatives). It is panel data, as respondents complete 6 choice sets. All alternatives are labelled.

    When I try estimating a model using cmclogit I get the following output:

    cmclogit choice price_shown fuel_cost_shown, prange_shown brange_shown basealternative(1)
    note: data were cmset as panel data, and the default vcetype for panel data is
    vce(cluster subjnumid); see cmclogit.
    option prange_shown not allowed
    r(198);

    Note that the 'prange_shown' variable has values for the PHEV alternative, and 0s for all other alternatives. I get the same error and when I remove this variable but keep 'brange_shown'. The same error happens when I include other alternative-specific indepvars (such as those for charging access explained above). I do not get the error when I include only indepvars that have values for all alternatives - the model will estimate in that case.

    I'm not sure that the cmclogit command allows for alternative-specific utility function estimation, but I'd love to know if I am wrong, or if there is another choice model command that does. I see that this question came up in 2016 (https://www.statalist.org/forums/for...tinomial-logit) and there was no posted solution then. I am wondering if perhaps a solution has come up since then, before I switch to another software. I am aware of the asclogit command as well, but I'm not sure that it allows for the estimation I am looking for either.

    Thank you in advance for any insight!
    Zoe
    Last edited by Zoe Long; 02 Nov 2023, 13:06.
Working...
X