help eaalogit

Title

eaalogit -- Endogenous attribute attendance model

Syntax

eaalogit
depvar
[indepvars] [if] [in] ,
group(varname)
id(varname)
keaa(#)
eaaspec(string)
[zvars(varlist)
level(#)
constraints(numlist)
vce(vcetype)
maximize_options]

eaapred
newvar [if] [in]

Description

eaalogit fits the endogenous attribute attendance model described in Hole (2011).

eaapred calculates predicted probabilities after eaalogit. The predictions are available
both in and out of sample; type eaapred ... if e(sample) ... if
predictions are wanted for the estimation sample only.

Options for eaalogit

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

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

keaa(#) is required and specifies the number of non-attendance parameters to be estimated.

eaaspec(string) is required and specifies the non-attendance pattern. This option is best
explained by using an example - see below.

zvars(varlist) specifies the variables to model the non-attendance (if any).

level(#); see estimation options.

constraints(numlist); see estimation options.

vce(vcetype); vcetype may be oim,
robust, cluster clustvar, or opg.

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

Examples

The following examples use traindata.dta, which is described in Hole (2007).

. use http://fmwww.bc.edu/repec/bocode/t/traindata.dta

. eaalogit y price contract local wknown tod seasonal, group(gid) id(pid) keaa(3) eaaspec(one x1 x2 x2 x3 x3)

This estimates an EAA model with full attendance to price (the "one" in eaaspec), and allows for non-attendance to the
remaining attributes. It is assumed that local is ignored when wknown is ignored (the repeated "x2" in eaaspec)
and that tod is ignored when seasonal is ignored (the repeated "x3" in eaaspec).

The non-attendance probabilities can be calculated using nlcom:

. nlcom (ANA_contract: invlogit(-[Gamma1]_cons))

. nlcom (ANA_local_wknown: invlogit(-[Gamma2]_cons))

. nlcom (ANA_tod_seasonal: invlogit(-[Gamma3]_cons))

The results show that the probability of non-attendance to contract is 0.62, the probability of non-attendance to local/wknown
is 0.48 and the probability of non-attendance to tod/seasonal is 0.01 (the latter probability is insignificantly different from zero).

A model in which a separate non-attendance probability is estimated for each attribute is specified as:

. eaalogit y price contract local wknown tod seasonal, group(gid) id(pid) keaa(6) eaaspec(x1 x2 x3 x4 x5 x6)

As before the non-attendance probabilities can be calculated using nlcom, e.g.:

. nlcom (ANA_price: invlogit(-[Gamma1]_cons))

References

Hole AR. 2007. Fitting mixed logit models by using maximum simulated likelihood. The Stata Journal 7(3): 388-401.

Hole AR. 2011. A discrete choice model with endogenous attribute attendance. Economics Letters 110(3): 203-205.

Author

This command was written by Arne Risa Hole (a.r.hole@sheffield.ac.uk).
Comments and suggestions are welcome.

Also see

Manual: [R] clogit

Online: [R] clogit