Bookmark and Share

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]

st: How to constraint the sum of the coefficients to zero for a factor variable.


From   Sam Brilleman <sam.brilleman@bristol.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to constraint the sum of the coefficients to zero for a factor variable.
Date   Fri, 05 Aug 2011 12:28:20 +0100

Dear Statalisters,

I have a GLM regression of the form:

glm outcome var1 var2 i.var3 i.var4, link(log) fam(gamma) eform

where the factor variable 'var4' has 20 levels.

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 assume the -constraint- command does this, but if it is possible I can't seem to work out what the syntax would look like.

Many thanks,
Sam.


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index