Page 1 of 1

ASC in WTP space or preference based space

Posted: 16 Dec 2022, 16:25
by chlob
Dear Stephane and David,

I have data from a choice experiment with 3 alternatives in each choice set, the third being the status quo.

I am running a mixed logit in WTP space. I have tried to run two models : (i) one with the ASC parameter estimated in WTP space (model 1), and (ii) the other with the ASC parameter estimated in preference-based space (model 2).

The list of utilities in model 1 is :
######################################################################################
V = list()
V[["alt1"]] = b_taxe * (taxe_alternative_1 + b_extinction0 * (extinction_alternative_1 == 0) +
b_extinction1 * (extinction_alternative_1 == 1) + b_extinction2 * (extinction_alternative_1 == 2) +
b_couleur0 *(couleur_alternative_1 == 0) + b_couleur1 *(couleur_alternative_1 == 1) +
b_intensite * intensite_alternative_1 )

V[["alt2"]] = b_taxe * (taxe_alternative_2 + b_extinction0 * (extinction_alternative_2 == 0) +
b_extinction1 * (extinction_alternative_2 == 1) + b_extinction2 * (extinction_alternative_2 == 2) +
b_couleur0 *(couleur_alternative_2 == 0) + b_couleur1 *(couleur_alternative_2 == 1) +
b_intensite * intensite_alternative_2 )

V[["alt3"]] =b_taxe * ( asc_3 + taxe_alternative_3 + b_extinction0 * (extinction_alternative_3 == 0) +
b_extinction1 * (extinction_alternative_3 == 1) + b_extinction2 * (extinction_alternative_3 == 2) +
b_couleur0 *(couleur_alternative_3 == 0) + b_couleur1 *(couleur_alternative_3 == 1) +
b_intensite * intensite_alternative_3 )
########################################################################################

The list of utilities in model 2 is :
######################################################################################
V = list()
V[["alt1"]] = b_taxe * (taxe_alternative_1 + b_extinction0 * (extinction_alternative_1 == 0) +
b_extinction1 * (extinction_alternative_1 == 1) + b_extinction2 * (extinction_alternative_1 == 2) +
b_couleur0 *(couleur_alternative_1 == 0) + b_couleur1 *(couleur_alternative_1 == 1) +
b_intensite * intensite_alternative_1 )

V[["alt2"]] = b_taxe * (taxe_alternative_2 + b_extinction0 * (extinction_alternative_2 == 0) +
b_extinction1 * (extinction_alternative_2 == 1) + b_extinction2 * (extinction_alternative_2 == 2) +
b_couleur0 *(couleur_alternative_2 == 0) + b_couleur1 *(couleur_alternative_2 == 1) +
b_intensite * intensite_alternative_2 )

V[["alt3"]] = asc_3 + b_taxe * ( taxe_alternative_3 + b_extinction0 * (extinction_alternative_3 == 0) +
b_extinction1 * (extinction_alternative_3 == 1) + b_extinction2 * (extinction_alternative_3 == 2) +
b_couleur0 *(couleur_alternative_3 == 0) + b_couleur1 *(couleur_alternative_3 == 1) +
b_intensite * intensite_alternative_3 )
########################################################################################

I find very different coefficients for three of the parameters (b_extinction1, b_extinction2 and b_couleur1). They are much lower in the second model, and b_couleur1's sign changes, which leads to very different interpretation of the results in term of willingness to pay for a change in these attributes.

Results in model 1
########################################################################################
Estimate s.e.
asc_3 28.80981 1.069300
b_extinction0 0.00000 NA
mu_log_b_extinction1 -6.34243 1.006076
sigma_log_b_extinction1 1.99290 0.153827
mu_log_b_extinction2 -3.13658 0.803015
sigma_log_b_extinction2 -15.98749 0.814401
mu_log_b_taxe -2.19824 0.099250
sigma_log_b_taxe -2.32408 0.123056
b_couleur0 0.00000 NA
mu_log_b_couleur1 1.38682 0.584745
sigma_log_b_couleur1 9.76106 0.500763
mu_log_b_intensite -0.09755 0.005926
sigma_log_b_intensite 0.15961 0.007274
##########################################################################################

Result in model 2

##########################################################################################
Estimate s.e.
asc_3 -0.5774 0.13483
b_extinction0 0.0000 NA
mu_log_b_extinction1 -23.4695 3.80097
sigma_log_b_extinction1 49.3734 3.14467
mu_log_b_extinction2 -15.6152 2.76656
sigma_log_b_extinction2 -71.8881 4.78631
mu_log_b_taxe -2.7443 0.06511
sigma_log_b_taxe -0.7647 0.06211
b_couleur0 0.0000 NA
mu_log_b_couleur1 -15.5147 2.21077
sigma_log_b_couleur1 29.8669 2.01442
mu_log_b_intensite -0.2406 0.02580
sigma_log_b_intensite -0.4885 0.03036
#########################################################################################

I have two questions about these results :
1. Why are these coefficients so different ?
2. Which of these two models should I prefer ?

Thanks a lot,
ChloƩ

Complete script (model 1)
############################################################################################

# ################################################################# #
#### DEFINE MODEL PARAMETERS ####
# ################################################################# #

### Vector of parameters, including any that are kept fixed in estimation
apollo_beta = c(asc_3 = 0,
b_extinction0 = 0,
mu_log_b_extinction1 = 1,
sigma_log_b_extinction1 = 2,
mu_log_b_extinction2 = 0,
sigma_log_b_extinction2 = -3,
mu_log_b_taxe = -2,
sigma_log_b_taxe = -1,
b_couleur0 = 0,
mu_log_b_couleur1 = 0,
sigma_log_b_couleur1 = 1,
mu_log_b_intensite = 0,
sigma_log_b_intensite = 0
)

### Vector with names (in quotes) of parameters to be kept fixed at their starting value in apollo_beta, use apollo_beta_fixed = c() if none
apollo_fixed = c("b_extinction0", "b_couleur0")

# ################################################################# #
#### DEFINE RANDOM COMPONENTS ####
# ################################################################# #

### Set parameters for generating draws
apollo_draws = list(
interDrawsType = "halton",
interNDraws = 500,
interUnifDraws = c(),
interNormDraws = c("draws_extinction1","draws_extinction2","draws_couleur1", "draws_intensite", "draws_taxe"),
intraDrawsType = "halton",
intraNDraws = 0,
intraUnifDraws = c(),
intraNormDraws = c()
)

### Create random parameters
apollo_randCoeff = function(apollo_beta, apollo_inputs){
randcoeff = list()

randcoeff[["b_taxe"]] = -exp( mu_log_b_taxe + sigma_log_b_taxe * draws_taxe )
randcoeff[["b_extinction1"]] = mu_log_b_extinction1 + sigma_log_b_extinction1 * draws_extinction1
randcoeff[["b_extinction2"]] = mu_log_b_extinction2 + sigma_log_b_extinction2 * draws_extinction2
randcoeff[["b_couleur1"]] = mu_log_b_couleur1 + sigma_log_b_couleur1 * draws_couleur1
randcoeff[["b_intensite"]] = mu_log_b_intensite + sigma_log_b_intensite * draws_intensite

return(randcoeff)
}

# ################################################################# #
#### GROUP AND VALIDATE INPUTS ####
# ################################################################# #

apollo_inputs = apollo_validateInputs()

# ################################################################# #
#### DEFINE MODEL AND LIKELIHOOD FUNCTION ####
# ################################################################# #

apollo_probabilities=function(apollo_beta, apollo_inputs, functionality="estimate"){

### Function initialisation: do not change the following three commands
### Attach inputs and detach after function exit
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))

### Create list of probabilities P
P = list()

### List of utilities: these must use the same names as in mnl_settings, order is irrelevant
V = list()
V[["alt1"]] = b_taxe * (taxe_alternative_1 + b_extinction0 * (extinction_alternative_1 == 0) +
b_extinction1 * (extinction_alternative_1 == 1) + b_extinction2 * (extinction_alternative_1 == 2) +
b_couleur0 *(couleur_alternative_1 == 0) + b_couleur1 *(couleur_alternative_1 == 1) +
b_intensite * intensite_alternative_1 )

V[["alt2"]] = b_taxe * (taxe_alternative_2 + b_extinction0 * (extinction_alternative_2 == 0) +
b_extinction1 * (extinction_alternative_2 == 1) + b_extinction2 * (extinction_alternative_2 == 2) +
b_couleur0 *(couleur_alternative_2 == 0) + b_couleur1 *(couleur_alternative_2 == 1) +
b_intensite * intensite_alternative_2 )

V[["alt3"]] = b_taxe * ( asc_3 + taxe_alternative_3 + b_extinction0 * (extinction_alternative_3 == 0) +
b_extinction1 * (extinction_alternative_3 == 1) + b_extinction2 * (extinction_alternative_3 == 2) +
b_couleur0 *(couleur_alternative_3 == 0) + b_couleur1 *(couleur_alternative_3 == 1) +
b_intensite * intensite_alternative_3 )

### Define settings for MNL model component
mnl_settings = list(
alternatives = c(alt1=1, alt2=2, alt3 = 3),
avail = list(alt1=1, alt2=1, alt3 = 1),
choiceVar = choix,
utilities = V
)

### Compute probabilities using MNL model
P[["model"]] = apollo_mnl(mnl_settings, functionality)

### Take product across observation for same individual
P = apollo_panelProd(P, apollo_inputs, functionality)

### Average across inter-individual draws
P = apollo_avgInterDraws(P, apollo_inputs, functionality)

### Prepare and return outputs of function
P = apollo_prepareProb(P, apollo_inputs, functionality)
return(P)
}


# ################################################################# #
#### MODEL ESTIMATION ####
# ################################################################# #

model = apollo_estimate(apollo_beta, apollo_fixed,apollo_probabilities, apollo_inputs)

# ################################################################# #
#### MODEL OUTPUTS ####
# ################################################################# #

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO SCREEN) ----
# ----------------------------------------------------------------- #
modelOutput_settings <- list(printPVal = 2)
apollo_modelOutput(model, modelOutput_settings)

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO FILE, using model name) ----
# ----------------------------------------------------------------- #

apollo_saveOutput(model)

Re: ASC in WTP space or preference based space

Posted: 20 Jan 2023, 13:50
by stephanehess
Hi

what happens in terms of log-likelihood?

Also, despite what some people think, you should also include an additional ASC here as there may be order effects. So you should have 2 ASCs

Stephane

Re: ASC in WTP space or preference based space

Posted: 23 Jan 2023, 17:07
by chlob
Hi,

Thank you for your answer.

The log-likelihood equals -7959.72 in model 1, and -7571.1 in model 2.
When I include an additional ASC as you suggest, the LL equals -7954.46 in model 1 and -7540.53 in model 2.
Could you specify what order effects are ?

Thank you,

ChloƩ

Re: ASC in WTP space or preference based space

Posted: 02 Feb 2023, 11:07
by stephanehess
Chloe

first, regarding order effects, let me explain. If you only include an asc for option 3, then you're saying that all else being equal (i.e. at the same attribute levels), alternative 1 and 2 have the same probability. But we often see that people choose the option on the left more often (that's what an order effect is), and that's what you're capturing with the new constant, which is why the fit is better.

In relation to preference space vs WTP space, this also makes sense.

In your WTP space model, the impact of the ASC on utility is constant across individuals, at a value of asc_3 for example, while in WTP space, you are multiplying it by a random coefficient, and in your present case, that seems to give you a better explanation of the data. You could of course instead try to make the asc a random coefficient directly.

Stephane