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

Re: st: problems with xi3

From   Maarten buis <>
Subject   Re: st: problems with xi3
Date   Tue, 15 Apr 2008 11:01:31 +0100 (BST)

--- "E. Michael Foster" <> wrote:
> I'm trying to impose the normalizing constraint on a set of dummy
> variables representing a set of mutually exclusive categories.
> A common identification constraint is to set the sum of the dummies
> to zero. 

This constraint is sometimes referred to as effect coding, and is
already implemented in -xi3- so you do not need to add a user defined
contrast. When you do that, the results from a model using your
manually created variables correspond to the results from a model using
the variables created by -xi3-. See the example below:

*-------------- begin example ----------------
sysuse auto, clear

sort mpg
gen mpgg=group(3)
xi i.mpgg, prefix(D)
for var D*: replace X=-1 if mpgg==1
regress weight D*

xi3: reg weight e.mpgg
*------------- end example -------------------
(For more on how to use examples I sent to the Statalist, see )

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Yahoo! For Good helps you make a difference
*   For searches and help try:

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