Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: -constraint define- syntax for constraining sum of coefficients to zero. |
Date | Fri, 25 Mar 2011 12:03:36 +0000 |
The same question was asked in a thread starting 6 days ago. <ttp://www.hsph.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1103/Subject/article-1195.html> See especially the suggestion that you don't do it this way in <http://www.hsph.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1103/Subject/article-1248.html> Nick On Fri, Mar 25, 2011 at 11:56 AM, Sam Brilleman <sam.brilleman@bristol.ac.uk> wrote: > I'm having trouble finding any documentation on how to add a simple > constraint for the fixed effect parameters of one categorical variable in a > GLM model. My model estimation command is: > > glm totalcost_modelfit i.practiceid i.age_cat i.gender i.imd_decile > i.QOF_MMscore_trunc6, exposure(daysdata) link(log) family(gamma) eform > > and I wish to constrain the sum of the 182 coefficients on the variable > i.practiceid to zero (rather than having the coefficient on the reference > category constrained to zero). What is the syntax needed for the -constraint > define- command? * * 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/