Page 1 of 1

how to make probability plot in E MDCEV MODEL

Posted: 23 Apr 2024, 06:54
by NiluCapgi
SIR I WAS TRYING EMDCEV MODLES FOR DIFFERENT VEHICLE TYPE AND DISTANCE TRAVELLED. CAR-1 , CAR 2 AND CAR 3 , HOW TO PLOT THEIR PROBABILITIES PLOT WITH DISTANCE TRAVELLED. OR WITH ANY OTHER VARIBLES???

the figure shows five different type of vehicle choice probabilities and their variation with distance
IMG20240423201802 (1) (1) (1)-min.jpg

Re: how to make probability plot in E MDCEV MODEL

Posted: 24 Apr 2024, 15:26
by stephanehess
Hi

you can make predictions from a model in Apollo. This will produce a prediction for each row in the data, and then you can of course use standard R functions to product plots

Stephane

Re: how to make probability plot in E MDCEV MODEL

Posted: 25 Apr 2024, 20:09
by NiluCapgi
Thank you, sir, for your response.

After running the prediction model with the code

apollo_prediction(
model,
apollo_probabilities,
apollo_inputs,
prediction_settings = list(),

)

Re: how to make probability plot in E MDCEV MODEL

Posted: 28 May 2024, 13:35
by NiluCapgi
sir if i want to plot or calculate the prob change for trip length for Choice L1,M1,H1 how to do?.

Re: how to make probability plot in E MDCEV MODEL

Posted: 09 Sep 2024, 20:46
by stephanehess
So when running apollo_prediction with mdcev, you will have a predicted outcome for each observation, and you could plot that against the observed distances. Or you could make different predictions at different (equal) distances for each person, and then produce the plot. That latter approach would remove any impact of correlation between distance and other covariates in your data

Re: how to make probability plot in E MDCEV MODEL

Posted: 25 Dec 2024, 05:40
by NiluCapgi
Thank you, sir. I still have some doubts. I have attached my predicted values. in this pic we can see the outcomes for car choices are l1,m1,h1, and if I and taking trip distance as an independent variable. How do we make probability plots for trip lengths 0 to 500km for different vehicle types l1,m1,h1? do I need to consider the mean l1,m1,h1 column I:e for example the first trip length is 116 km and l1= .12, m1= .52, and H1 = .48 . so do I need to plot these three with trip length or are these the predicted values I need to calculate probability?

Re: how to make probability plot in E MDCEV MODEL

Posted: 23 Jan 2025, 17:44
by dpalma
Hi,

Sorry for taking long to answer.

Before answering your question, I want to make sure I understand your modelling approach. Your dependent variable seems to be the distance travelled using three different kinds of cars (L1, M1 and H1). The total length of the trip seems to be exogenously determined (e.g. the first trip is 116 km long). Nonetheless, you seem to be using the version of the eMDC with unobserved budget, because I see that the forecast for the first trip does not add up to 116.

The way you measure the impact of the trip length on the forecast will depend on whether you included the length of the trip as an explanatory variable in your model or not. Given that you are using the eMDC with unobserved budget, the most natural way to include the total length of the trip would be in the utility of the outside good (utilityOutside = b_totalLength*totalLength). If you did not include the total length as an explanatory variable, then your model will not be sensible to a change in it.

If you want more detailed help, please share your code with us, as that will allow us to provide more specific advice.

Best wishes,
David

Re: how to make probability plot in E MDCEV MODEL

Posted: 06 Feb 2025, 05:19
by NiluCapgi
Thank you, sir for your valuable answer; however, I still have some doubts
my dependent variables are time taken by the vehicle (l,m,h). So in joint modeling, I have modeled the time to deliver by different types of vehicle. My dependent variable are trip length and other variables. My only concern is how can find change in distance will make a change in the time for different 3 vehicle type.

Although the prediction is giving some columns but adding their probability is greater than one or I am not sure how to interpret the predicted probability results.
My question is what these prediction plots are indicating:

for example L1_EDisc = .12 , M1_EDisc= .52, H1_EDisc=.48 so these are not adding to one. Are these giving joint probability? I am not able to interpret properly.

Re: how to make probability plot in E MDCEV MODEL

Posted: 10 Mar 2025, 14:45
by dpalma
Hi,

The eMDC model is used to predict joint consumption of multiple alternatives. So for example, when you go to a supermarket, there are many different products, and you can buy any combination of them, each in any amount. For example, you could buy $3 of apples, $4 of bread, and $5 of cheese. The "EDisc" predicted by the model is the probability of you buying each of these products, so the probability of buying apples, bread and cheese, respectively. There is no reason to expect these probabilities to add up to 1, as you may have high (or low) probability of buying each product separately.

I believe what you are modelling is different. It looks like what you want to do is a two-stage model, where first the person chooses what vehicle to use (L1, M1, H1), and then how long it will take them to travel in that vehicle. You might want to look at a different kind of model for that. Maybe a joint estimation of an MNL and a linear regression.

I hope this helps.

Best wishes,
David