Simulating WTP for normal dist. param when price is negative log normal/
Posted: 22 Mar 2024, 10:24
Hi,
I estimated a MMNL which converged successfully. I am trying to simulate WTP for the ASC (ASC_low) which is normally distributed. My cost parameter is negatively log-normal distributed.
this is the code:
I received:
[1] NaN
[1] NA
I'm not sure what could be the reason for this.
These are the estimated values:
b_log_cost_mu = 1.186
b_log_cost_sig = -1.579
asc_low_mu = 1.5071
asc_low_sig = 2.7057
Thanks,
Anat
I estimated a MMNL which converged successfully. I am trying to simulate WTP for the ASC (ASC_low) which is normally distributed. My cost parameter is negatively log-normal distributed.
this is the code:
Code: Select all
N <- 10000
b_low = rnorm(N, mean=model$estimate["asc_low_mu"], sd=model$estimate["asc_low_sig"])
b_cost = exp(rlnorm(N, mean=model$estimate["b_log_cost_mu "], sd=model$estimate["b_log_cost_sig"] ))
wtp_low = b_low/b_cost
mean(wtp_low); sd(wtp_low)[1] NaN
[1] NA
I'm not sure what could be the reason for this.
These are the estimated values:
b_log_cost_mu = 1.186
b_log_cost_sig = -1.579
asc_low_mu = 1.5071
asc_low_sig = 2.7057
Thanks,
Anat