Dear all,
I am trying to estimate the change in the predicted probability of selecting an outcome for different values of an alternative-specific variable after asclogit. That is, I want to estimate how likely it is than an outcome is selected at different values of a continous alternative specific variable. I know how to do this for case-specific variables but I cannot do it for alternative-specific variables.
Here you have an example of how I am trying to do it with the "choice" example dataset. In this case I would like to estimate the probability of an outcome being selected for different values of the alternative-specific variable dealer, which ranges between 1 and 24. The way I am doing it is the following:
However, when I do this the predicted probabilities are the same for each of the three possible outcomes at each level of the variable dealer. Here you see the first part of the dataset that is created to estimate the predicted probabilities with the predicted probabilities in the last column.
Is there a way to do this or it is simply impossible/incorrect to estimate predicted probabilities for alternative-specific variables?
I am trying to estimate the change in the predicted probability of selecting an outcome for different values of an alternative-specific variable after asclogit. That is, I want to estimate how likely it is than an outcome is selected at different values of a continous alternative specific variable. I know how to do this for case-specific variables but I cannot do it for alternative-specific variables.
Here you have an example of how I am trying to do it with the "choice" example dataset. In this case I would like to estimate the probability of an outcome being selected for different values of the alternative-specific variable dealer, which ranges between 1 and 24. The way I am doing it is the following:
Code:
webuse choice, clear asclogit choice dealer, case(id) alternatives(car) casevars(sex) drop _all set obs 24 gen sex = 0.73 // set sex to its mean value gen dealer = _n // create values for dealer from 1 to 24 gen id = _n // create case id expand 3 sort id by id: gen car = _n label values car nation predict p
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(sex dealer id car p) .73 1 1 1 .52017343 .73 1 1 2 .27786776 .73 1 1 3 .2019588 .73 2 2 1 .52017343 .73 2 2 2 .27786776 .73 2 2 3 .2019588 .73 3 3 1 .52017343 .73 3 3 2 .27786776 .73 3 3 3 .2019588 .73 4 4 1 .52017343 .73 4 4 2 .27786776 .73 4 4 3 .2019588 .73 5 5 1 .52017343 .73 5 5 2 .27786776 .73 5 5 3 .2019588 .73 6 6 1 .52017343 .73 6 6 2 .27786776 .73 6 6 3 .2019588 .73 7 7 1 .52017343 .73 7 7 2 .27786776 .73 7 7 3 .2019588 .73 8 8 1 .52017343 .73 8 8 2 .27786776 .73 8 8 3 .2019588 end label values car nation label def nation 1 "American", modify label def nation 2 "Japan", modify label def nation 3 "Europe", modify
Is there a way to do this or it is simply impossible/incorrect to estimate predicted probabilities for alternative-specific variables?
Comment