Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Categorical variable in regression

From   John Ataguba <>
To   Statalist statalist mailing <>
Subject   st: Categorical variable in regression
Date   Wed, 23 Jan 2013 11:22:09 +0000 (GMT)

Dear Statalist members

I have a problem trying to let Stata display coefficients for all the categories of a categorical variable in a regression.

Consider the example below:

set obs 200
set seed 12345
gen region = 1+int((4-1+1)*runiform())
gen y = 10+(56-10)*runiform()
xi: reg  y  i.region, noconst noomit

I expect Stata to display the coefficients for all the four categories of the categorical variable named "region".  However, Stata still omits one category.  Is there something I am doing wrong?

I am running Stata 12.1 (SE) on Windows 7 platform.  I also tried this in Stata 11.2 (IC) on Windows 7 platform and I obtained the same result.

I will appreciate your assistance.



*   For searches and help try:

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