Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Effects coding with interactions: references


From   Jesper Kjr Hansen <kjaer.hansen@get2net.dk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Effects coding with interactions: references
Date   Thu, 1 Jun 2006 01:32:17 +0200

I hope that someone on the list is able and willing to help
me with references to books or articles on 'effects coding'
(deviation coding), i.e. recoding categorical variables to
compare the mean of the variable for a given level to the grand
mean of the variable.

I am interested in references describing how to code as well as
how interpret the effects, especially how to code interactions
with other variables.

Thanks in advance.

----

A more detailed description of the context in which I am using
effects coding: I am exploring different ways to specify what in
the economics literature is known as Discrete Choice Experiments
(or Conjoint Analysis), usually estimated by models in the probit
or logit family.

Given a survey on services in child day care: panel data setup,
with J choice sets for each individual (i).
Individuals are parents with children in day care.

A choice specific attribute with 3 levels could be:
"Lunch served in the institution",

and the (effects) coding would be:

             |   Var1:       |  Var2:
Level:      |   Cold lunch  |  Hot lunch
------------|---------------|-------------
Cold lunch  |      1        |     0
Hot lunch   |      0        |     1
No lunch    |     -1        |    -1

where "no lunch" is the reference level (status quo).

Now, suppose that you want to interact this with the individual
specific dichotomous variable "Single parent" (sp).

I suppose you would code something like:

Level:              |  Var1:   |  Var2:   |  Var3:   |  Var4:
--------------------|----------|----------|----------|----------
sp,     Cold lunch  |     1    |     0    |     0    |     0
sp,     Hot lunch   |     0    |     1    |     0    |     0
not sp, Cold lunch  |     0    |     0    |     1    |     0
not sp, Hot lunch   |     0    |     0    |     0    |     1
No lunch            |    -1    |    -1    |    -1    |    -1

where "no lunch" is the reference level (status quo).

Is the above coding acceptable(?) In cases where the variable had
only two levels (-1, 1), I have also seen examples in which
interactions were coded in the same way as with dummy coded
variables, e.g. effectvar*sp (of course with a different
interpretation).

I already have a couple of good references on how to specify
effects coding of categorical variables, e.g. Louviere et al.
(2000); but these do not provide a very good description of how
to interpret the effects, nor do they provide explanation on how
to interact the effects with other variables. Btw., I am aware of
the -devcon- and -xi3- packages on ssc, but I want to code data
myself in this instance.

Reference:  Louviere, J., Hensher, D. A., & Swait, J. (2000),
             "Stated Choice Methods, analysis and application",
             Cambridge University Press, U.K.


- Jesper K. Hansen
   mailto:kjaer.hansen@oncable.dk


P.S.:   If anyone have already set up a program for deriving
         variance estimates of willingness to pay measures (e.g.
         beta_lunch/beta_day_care_costs) by simulation, I would
         be very much interested in that too.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index