Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Changing the reference category


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Changing the reference category
Date   Wed, 20 Apr 2011 09:41:41 +0100 (BST)

--- On Wed, 20/4/11, Julia Martin wrote:
> I have created a reference category using the char varname[omit]#
> for regression analysis. I now do not want this reference category 
> - how do I get rid of it so it reverts back to the original 
> variable with NO reference categories. 

The default is not the absence of a reference category, as that 
does not make sense in most models under default conditions. Many
sources are available that explain this issue, here is one:
<http://www.stata.com/statalist/archive/2011-04/msg00472.html>

There are ways to make such models work, and they have their uses,
but they are not appropriate as a default. Below is an example.

*---------------- begin example ----------------------
sysuse auto, clear
recode rep78 1/2=3

// change the default reference catogory
char rep78[omit] 4
xi: reg mpg i.rep78

// restore the default
// note that there is still a reference category
char rep78[omit] 
xi: reg mpg i.rep78

// try to omit the reference category but
// that does not work as Stata will drop
// one category due to multicolinearity
xi, noomit : reg mpg i.rep78

// We need to remove the constant to 
// allow for a model without reference 
// category
xi, noomit : reg mpg i.rep78, nocons 
*------------------- end example -------------------
(For more on examples I sent to the Statalist see: 
http://www.maartenbuis.nl/example_faq )

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/


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