Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: How to constraint the sum of the coefficients to zero for a factor variable.
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: How to constraint the sum of the coefficients to zero for a factor variable.
Date
Fri, 5 Aug 2011 14:19:42 +0200
On Fri, Aug 5, 2011 at 1:28 PM, Sam Brilleman wrote:
> Does anyone know how to change the constraint on the coefficients for 'var4'
> so that the sum of the coefficients is zero (i.e. sum(b4i) = 0) rather than
> treating one of the factor levels as a reference category (i.e. b4i = 0 for
> some given i). Note that the latter is the standard parameter constraint
> used by STATA's estimation commands.
I don't know of a way to do this in Stata's factor variable notation.
You can however create the necesary variables using -xi3-, where they
are called "effect coding", see -findit xi3-.
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/