*! version 1.0.0 21apr2022

Title

mixrandregret -- Mixed Random Regret Minimization Model

Syntax

mixrandregret
depvar
[indepvars] [if] [in] [weight] ,
id(varname)
group(varname)
rand(varlist)
alternatives(varname)
[basealternative(#)
noconstant
cluster(varname)
robust
ln(#)
nrep(#)
burn(#)
level(#)
maximize_options]

mixrpred
newvar [if] [in]
[,
proba
nrep(#)
burn(#)]

mixrbeta
varlist [if] [in]
, saving(filename)
[plot
nrep(#)
burn(#)
replace]

depvar equal to 1 identifies the chosen alternatives,
whereas a 0 indicates the alternatives that were not chosen.
There can be only one chosen alternative for each case.

fweights, iweights, and pweights are allowed (see weight),
but they are interpreted to apply to decision-makers, not to individual observations.

Description

mixrandregret utilizes the mixed random regret minimization model described in Hensher et al. (2016), which is a mixed version of the classic random regret minimization model introduced in Chorus. C. (2010). mixrandregret extends the randregret (Gutiérrez-Vargas et al, 2021) and allows to specify normal and log-normally distributed taste parameters inside the regret function. The command uses maximum simulated likelihood for estimation (Train. K., 2003).

mixrpred can be used following mixrandregret to obtain the predicted probabilities.

mixrbeta can be used following mixrandregret to calculate
individual-level parameters corresponding to the variables in the specified
varname using the method proposed by Train. K. (2003) chap. 11. The individual-level parameters are stored in a data
file specified by the user.

Options

mixrandregret

Model
* id(varname) is required and specifies a numeric identifier variable for the decision makers.

* group(varname) is required and specifies a numeric identifier variable (varname) for the choice occasions.

* rand(varlist) is required and specifies the independent variables whose coefficients are random. The random coefficients can be specified to be normally or lognormally distributed (see the ln() option). The variables immediately following the dependent variable in the syntax are specified to have fixed coefficients.

* alternatives(varname) use varname to identify the
alternatives available for each case.

basealternative(#) sets base Alternative Specific Constants (ASC).

noconsant suppress the alternative specific constants.

robust, cluster see estimation options. The cluster variable must be numeric.

ln(#) specifies that the last # variables in rand() have lognormally rather than normally distributed coefficients. The default is ln(0).

Simulation
nrep(#) specifies the number of Halton draws used for the simulation. The default is nrep(50).

burn(#) specifies the number of initial sequence elements to drop when creating the Halton sequences. The default is burn(15).
Specifying this option helps reduce the correlation between the sequences in each dimension.

Reporting
level(#) set confidence level; default is level(95).

Maximization
maximize_options
difficult,
technique(algorithm_spec),
iterate(#), trace, gradient,
showstep, hessian, tolerance(#),
ltolerance(#) gtolerance(#), nrtolerance(#),
from(init_specs); see maximize.

mixrpred

proba calculate the choice probabilities; the default

nrep(#) specifies the number of Halton draws used for the simulation. The default is nrep(50).

burn(#) specifies the number of initial sequence elements to drop when creating the Halton sequences. The default is burn(15).
Specifying this option helps reduce the correlation between the sequences in each dimension.

mixrbeta

* saving(filename) saves individual-level parameters to filename.

plot save conditional distribution graphs (histogram and Kdensity) for betas.

nrep(#) specifies the number of Halton draws used for the simulation. The default is nrep(50).

burn(#) specifies the number of initial sequence elements to drop when creating the Halton sequences. The default is burn(15).
Specifying this option helps reduce the correlation between the sequences in each dimension.

replace overwrites filename.

Examples

Consider the following toy example that contains the data for two individuals who makes two choices. On each choice occasion, the individual has three alternatives. choice is the dependent variable, and x_rnd and x_fix are the independent variables or alternative attributes:

id_ind id_cs choice_set alt x_rnd x_fix choice
1 1 1 1 -4.17 -0.83 0
1 1 1 2 1.39 -0.87 0
1 1 1 3 2.63 -0.37 1
1 2 2 1 -0.45 1.12 1
1 2 2 2 2.98 1.07 0
1 2 2 3 1.37 0.75 0
2 3 1 1 2.88 -0.25 0
2 3 1 2 -3.12 -0.52 1
2 3 1 3 -1.44 0.39 0
2 4 2 1 -0.56 0.51 0
2 4 2 2 -1.03 0.02 0
2 4 2 3 0.99 -2.22 1

A mixed random regret model where x_rnd has a normally distributed coefficient and x_fix has a fixed coefficient, and ASCs are suppressed can be specified as follows:

. mixrandregret choice x_fix, group(id_cs) id(id_ind) rand(x_rnd) alternatives(alt) nocons

A model where x_rnd has a lognormally distributed coefficient can be specified as follows:

. mixrandregret choice x_fix, group(id_cs) id(id_ind) rand(x_rnd) alternatives(alt) ln(1) nocons

Use alternative 1 as base alternative to calculate ASC can be specified as follows:

. mixrandregret choice x_fix, group(id_cs) id(id_ind) rand(x_rnd) alternatives(alt) ln(1) basealternative(1)

Warning: initial values not provided. We highly advise the users to use starting values from randregret estimates for the means of the distributions of the random coefficients.

An example of setting starting values (2 parameters from fixed effects, 2 parameters from random effects - mean and SD, and 2 parameters from ASC):

. mixrandregret choice x_fix, group(id_cs) id(id_ind) rand(x_rnd) alternatives(alt) ln(1) basealternative(1) from(1 1 1 1 1 1)

Predict choice probabilities and save values in a variable named p:

. mixrpred p, proba

Obtain the individual-level parameters, generate the plot, and save in the file named ind_rnd:

. mixrbeta x_rnd, plot saving(ind_rnd) replace

Authors

Ziyue Zhu

Faculty of Science

KU Leuven

Leuven, Belgium

ziyue.zhu@student.kuleuven.be

Álvaro A. Gutiérrez Vargas

Faculty of Economics and Business

KU Leuven

Research Centre for Operations Research and Statistics (ORSTAT)

Leuven, Belgium

alvaro.gutierrezvargas@kuleuven.be

Martina Vandebroek

Faculty of Economics and Business

KU Leuven

Research Centre for Operations Research and Statistics (ORSTAT)

Leuven, Belgium

martina.vandebroek@kuleuven.be>

References

Hensher, David A and Greene, William H and Ho, Chinh Q. 2016
Random regret minimization and random utility maximization in the presence of preference heterogeneity: an empirical contrast.
Journal of Transportation Engineering Volume 142 Number 4: pp. 04016009.

Chorus. C. 2010.
A New Model of Random Regret Minimization.
European Journal of Transport and Infrastructure Research 10: pp. 181-196.

Gutiérrez-Vargas. Á., Meulders. M., and Vandebroek. M. 2021.
randregret: A command for fitting random regret minimization models using Stata.
The Stata Journal Volume 21 Number 3: pp. 626-658.

Train. K. 2003.
Discrete Choice Methods with Simulation.
Cambridge University Press.